1
14
15 package com.liferay.portlet.journal.search;
16
17 import com.liferay.portal.kernel.dao.search.DisplayTerms;
18 import com.liferay.portal.kernel.util.ParamUtil;
19 import com.liferay.portal.kernel.util.StringPool;
20 import com.liferay.portal.util.PortalUtil;
21
22 import java.util.Date;
23
24 import javax.portlet.PortletRequest;
25
26
31 public class ArticleDisplayTerms extends DisplayTerms {
32
33 public static final String GROUP_ID = "groupId";
34
35 public static final String ARTICLE_ID = "searchArticleId";
36
37 public static final String VERSION = "version";
38
39 public static final String TITLE = "title";
40
41 public static final String DESCRIPTION = "description";
42
43 public static final String CONTENT = "content";
44
45 public static final String TYPE = "type";
46
47 public static final String STRUCTURE_ID = "structureId";
48
49 public static final String TEMPLATE_ID = "templateId";
50
51 public static final String DISPLAY_DATE_GT = "displayDateGT";
52
53 public static final String DISPLAY_DATE_LT = "displayDateLT";
54
55 public static final String STATUS = "status";
56
57 public ArticleDisplayTerms(PortletRequest portletRequest) {
58 super(portletRequest);
59
60 groupId = ParamUtil.getLong(
61 portletRequest, GROUP_ID,
62 PortalUtil.getScopeGroupId(portletRequest));
63 articleId = ParamUtil.getString(portletRequest, ARTICLE_ID);
64 version = ParamUtil.getDouble(portletRequest, VERSION);
65 title = ParamUtil.getString(portletRequest, TITLE);
66 description = ParamUtil.getString(portletRequest, DESCRIPTION);
67 content = ParamUtil.getString(portletRequest, CONTENT);
68 type = ParamUtil.getString(portletRequest, TYPE);
69 structureId = ParamUtil.getString(portletRequest, STRUCTURE_ID);
70 templateId = ParamUtil.getString(portletRequest, TEMPLATE_ID);
71 status = ParamUtil.getString(portletRequest, STATUS);
72 }
73
74 public long getGroupId() {
75 return groupId;
76 }
77
78 public String getArticleId() {
79 return articleId;
80 }
81
82 public double getVersion() {
83 return version;
84 }
85
86 public String getVersionString() {
87 if (version != 0) {
88 return String.valueOf(version);
89 }
90 else {
91 return StringPool.BLANK;
92 }
93 }
94
95 public String getTitle() {
96 return title;
97 }
98
99 public String getDescription() {
100 return description;
101 }
102
103 public String getContent() {
104 return content;
105 }
106
107 public String getType() {
108 return type;
109 }
110
111 public String getStructureId() {
112 return structureId;
113 }
114
115 public String getTemplateId() {
116 return templateId;
117 }
118
119 public Date getDisplayDateGT() {
120 return displayDateGT;
121 }
122
123 public void setDisplayDateGT(Date displayDateGT) {
124 this.displayDateGT = displayDateGT;
125 }
126
127 public Date getDisplayDateLT() {
128 return displayDateLT;
129 }
130
131 public void setDisplayDateLT(Date displayDateLT) {
132 this.displayDateLT = 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 }