1
22
23 package com.liferay.portlet.journal.search;
24
25 import com.liferay.portal.kernel.dao.search.DisplayTerms;
26 import com.liferay.portal.kernel.util.ParamUtil;
27 import com.liferay.portal.kernel.util.StringPool;
28 import com.liferay.portal.util.PortalUtil;
29
30 import java.util.Date;
31
32 import javax.portlet.RenderRequest;
33
34
40 public class ArticleDisplayTerms extends DisplayTerms {
41
42 public static final String GROUP_ID = "groupId";
43
44 public static final String ARTICLE_ID = "searchArticleId";
45
46 public static final String VERSION = "version";
47
48 public static final String TITLE = "name";
49
50 public static final String DESCRIPTION = "description";
51
52 public static final String CONTENT = "content";
53
54 public static final String TYPE = "type";
55
56 public static final String STRUCTURE_ID = "structureId";
57
58 public static final String TEMPLATE_ID = "templateId";
59
60 public static final String DISPLAY_DATE_GT = "displayDateGT";
61
62 public static final String DISPLAY_DATE_LT = "displayDateLT";
63
64 public static final String STATUS = "status";
65
66 public ArticleDisplayTerms(RenderRequest req) {
67 super(req);
68
69 groupId = ParamUtil.getLong(
70 req, GROUP_ID, PortalUtil.getPortletGroupId(req));
71 articleId = ParamUtil.getString(req, ARTICLE_ID);
72 version = ParamUtil.getDouble(req, VERSION);
73 title = ParamUtil.getString(req, TITLE);
74 description = ParamUtil.getString(req, DESCRIPTION);
75 content = ParamUtil.getString(req, CONTENT);
76 type = ParamUtil.getString(req, TYPE);
77 structureId = ParamUtil.getString(req, STRUCTURE_ID);
78 templateId = ParamUtil.getString(req, TEMPLATE_ID);
79 status = ParamUtil.getString(req, STATUS);
80 }
81
82 public long getGroupId() {
83 return groupId;
84 }
85
86 public String getArticleId() {
87 return articleId;
88 }
89
90 public double getVersion() {
91 return version;
92 }
93
94 public String getVersionString() {
95 if (version != 0) {
96 return String.valueOf(version);
97 }
98 else {
99 return StringPool.BLANK;
100 }
101 }
102
103 public String getTitle() {
104 return title;
105 }
106
107 public String getDescription() {
108 return description;
109 }
110
111 public String getContent() {
112 return content;
113 }
114
115 public String getType() {
116 return type;
117 }
118
119 public String getStructureId() {
120 return structureId;
121 }
122
123 public String getTemplateId() {
124 return templateId;
125 }
126
127 public Date getDisplayDateGT() {
128 return displayDateGT;
129 }
130
131 public Date getDisplayDateLT() {
132 return displayDateLT;
133 }
134
135 public String getStatus() {
136 return status;
137 }
138
139 public void setStatus(String status) {
140 this.status = status;
141 }
142
143 protected long groupId;
144 protected String articleId;
145 protected double version;
146 protected String title;
147 protected String description;
148 protected String content;
149 protected String type;
150 protected String structureId;
151 protected String templateId;
152 protected Date displayDateGT;
153 protected Date displayDateLT;
154 protected String status;
155
156 }