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.PortletRequest;
33
34
39 public class ArticleDisplayTerms extends DisplayTerms {
40
41 public static final String GROUP_ID = "groupId";
42
43 public static final String ARTICLE_ID = "searchArticleId";
44
45 public static final String VERSION = "version";
46
47 public static final String TITLE = "title";
48
49 public static final String DESCRIPTION = "description";
50
51 public static final String CONTENT = "content";
52
53 public static final String TYPE = "type";
54
55 public static final String STRUCTURE_ID = "structureId";
56
57 public static final String TEMPLATE_ID = "templateId";
58
59 public static final String DISPLAY_DATE_GT = "displayDateGT";
60
61 public static final String DISPLAY_DATE_LT = "displayDateLT";
62
63 public static final String STATUS = "status";
64
65 public ArticleDisplayTerms(PortletRequest portletRequest) {
66 super(portletRequest);
67
68 groupId = ParamUtil.getLong(
69 portletRequest, GROUP_ID,
70 PortalUtil.getScopeGroupId(portletRequest));
71 articleId = ParamUtil.getString(portletRequest, ARTICLE_ID);
72 version = ParamUtil.getDouble(portletRequest, VERSION);
73 title = ParamUtil.getString(portletRequest, TITLE);
74 description = ParamUtil.getString(portletRequest, DESCRIPTION);
75 content = ParamUtil.getString(portletRequest, CONTENT);
76 type = ParamUtil.getString(portletRequest, TYPE);
77 structureId = ParamUtil.getString(portletRequest, STRUCTURE_ID);
78 templateId = ParamUtil.getString(portletRequest, TEMPLATE_ID);
79 status = ParamUtil.getString(portletRequest, 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 }