001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.taglib.ui;
016    
017    import com.liferay.portal.kernel.util.HtmlUtil;
018    import com.liferay.portal.kernel.util.StringPool;
019    import com.liferay.taglib.util.IncludeTag;
020    
021    import java.util.Date;
022    import java.util.Map;
023    
024    import javax.servlet.http.HttpServletRequest;
025    
026    /**
027     * @author Sergio Gonz??lez
028     */
029    public class AppViewEntryTag extends IncludeTag {
030    
031            @Override
032            public int doStartTag() {
033                    return EVAL_BODY_INCLUDE;
034            }
035    
036            public void setActionJsp(String actionJsp) {
037                    _actionJsp = actionJsp;
038            }
039    
040            public void setAssetCategoryClassName(String assetCategoryClassName) {
041                    _assetCategoryClassName = assetCategoryClassName;
042            }
043    
044            public void setAssetCategoryClassPK(long assetCategoryClassPK) {
045                    _assetCategoryClassPK = assetCategoryClassPK;
046            }
047    
048            public void setAssetTagClassName(String assetTagClassName) {
049                    _assetTagClassName = assetTagClassName;
050            }
051    
052            public void setAssetTagClassPK(long assetTagClassPK) {
053                    _assetTagClassPK = assetTagClassPK;
054            }
055    
056            public void setAuthor(String author) {
057                    _author = author;
058            }
059    
060            public void setClassTypeName(String classTypeName) {
061                    _classTypeName = classTypeName;
062            }
063    
064            public void setCreateDate(Date createDate) {
065                    _createDate = createDate;
066            }
067    
068            public void setCssClass(String cssClass) {
069                    _cssClass = cssClass;
070            }
071    
072            public void setData(Map<String, Object> data) {
073                    _data = data;
074            }
075    
076            public void setDescription(String description) {
077                    _description = HtmlUtil.unescape(description);
078            }
079    
080            public void setDisplayDate(Date displayDate) {
081                    _displayDate = displayDate;
082            }
083    
084            public void setDisplayStyle(String displayStyle) {
085                    _displayStyle = displayStyle;
086            }
087    
088            public void setExpirationDate(Date expirationDate) {
089                    _expirationDate = expirationDate;
090            }
091    
092            public void setFolder(boolean folder) {
093                    _folder = folder;
094            }
095    
096            public void setGroupId(long groupId) {
097                    _groupId = groupId;
098            }
099    
100            public void setIconCssClass(String iconCssClass) {
101                    _iconCssClass = iconCssClass;
102            }
103    
104            public void setLatestApprovedVersion(String latestApprovedVersion) {
105                    _latestApprovedVersion = latestApprovedVersion;
106            }
107    
108            public void setLatestApprovedVersionAuthor(
109                    String latestApprovedVersionAuthor) {
110    
111                    _latestApprovedVersionAuthor = latestApprovedVersionAuthor;
112            }
113    
114            public void setLocked(boolean locked) {
115                    _locked = locked;
116            }
117    
118            public void setModifiedDate(Date modifiedDate) {
119                    _modifiedDate = modifiedDate;
120            }
121    
122            public void setReviewDate(Date reviewDate) {
123                    _reviewDate = reviewDate;
124            }
125    
126            public void setRowCheckerId(String rowCheckerId) {
127                    _rowCheckerId = rowCheckerId;
128            }
129    
130            public void setRowCheckerName(String rowCheckerName) {
131                    _rowCheckerName = rowCheckerName;
132            }
133    
134            public void setShortcut(boolean shortcut) {
135                    _shortcut = shortcut;
136            }
137    
138            public void setShowCheckbox(boolean showCheckbox) {
139                    _showCheckbox = showCheckbox;
140            }
141    
142            public void setShowLinkTitle(boolean showLinkTitle) {
143                    _showLinkTitle = showLinkTitle;
144            }
145    
146            public void setStatus(int status) {
147                    _status = status;
148            }
149    
150            public void setThumbnailDivStyle(String thumbnailDivStyle) {
151                    _thumbnailDivStyle = thumbnailDivStyle;
152            }
153    
154            public void setThumbnailSrc(String thumbnailSrc) {
155                    _thumbnailSrc = thumbnailSrc;
156            }
157    
158            public void setThumbnailStyle(String thumbnailStyle) {
159                    _thumbnailStyle = thumbnailStyle;
160            }
161    
162            public void setTitle(String title) {
163                    _title = HtmlUtil.unescape(title);
164            }
165    
166            public void setUrl(String url) {
167                    _url = url;
168            }
169    
170            public void setVersion(String version) {
171                    _version = version;
172            }
173    
174            @Override
175            protected void cleanUp() {
176                    _actionJsp = null;
177                    _assetCategoryClassName = null;
178                    _assetCategoryClassPK = 0;
179                    _assetTagClassName = null;
180                    _assetTagClassPK = 0;
181                    _author = null;
182                    _classTypeName = null;
183                    _createDate = null;
184                    _cssClass = null;
185                    _data = null;
186                    _description = null;
187                    _displayDate = null;
188                    _displayStyle = null;
189                    _expirationDate = null;
190                    _folder = false;
191                    _groupId = 0;
192                    _iconCssClass = null;
193                    _latestApprovedVersion = null;
194                    _latestApprovedVersionAuthor = null;
195                    _locked = false;
196                    _modifiedDate = null;
197                    _reviewDate = null;
198                    _rowCheckerId = null;
199                    _rowCheckerName = null;
200                    _shortcut = false;
201                    _showCheckbox = false;
202                    _showLinkTitle = true;
203                    _status = 0;
204                    _thumbnailDivStyle = StringPool.BLANK;
205                    _thumbnailSrc = null;
206                    _thumbnailStyle = null;
207                    _title = null;
208                    _url = null;
209                    _version = null;
210            }
211    
212            @Override
213            protected String getPage() {
214                    return _PAGE;
215            }
216    
217            @Override
218            protected boolean isCleanUpSetAttributes() {
219                    return _CLEAN_UP_SET_ATTRIBUTES;
220            }
221    
222            @Override
223            protected void setAttributes(HttpServletRequest request) {
224                    request.setAttribute("liferay-ui:app-view-entry:actionJsp", _actionJsp);
225                    request.setAttribute(
226                            "liferay-ui:app-view-entry:assetCategoryClassName",
227                            _assetCategoryClassName);
228                    request.setAttribute(
229                            "liferay-ui:app-view-entry:assetCategoryClassPK",
230                            _assetCategoryClassPK);
231                    request.setAttribute(
232                            "liferay-ui:app-view-entry:assetTagClassName", _assetTagClassName);
233                    request.setAttribute(
234                            "liferay-ui:app-view-entry:assetTagClassPK", _assetTagClassPK);
235                    request.setAttribute("liferay-ui:app-view-entry:author", _author);
236                    request.setAttribute(
237                            "liferay-ui:app-view-entry:classTypeName", _classTypeName);
238                    request.setAttribute(
239                            "liferay-ui:app-view-entry:createDate", _createDate);
240                    request.setAttribute("liferay-ui:app-view-entry:cssClass", _cssClass);
241                    request.setAttribute("liferay-ui:app-view-entry:data", _data);
242                    request.setAttribute(
243                            "liferay-ui:app-view-entry:description", _description);
244                    request.setAttribute(
245                            "liferay-ui:app-view-entry:displayDate", _displayDate);
246                    request.setAttribute(
247                            "liferay-ui:app-view-entry:displayStyle", _displayStyle);
248                    request.setAttribute(
249                            "liferay-ui:app-view-entry:expirationDate", _expirationDate);
250                    request.setAttribute("liferay-ui:app-view-entry:folder", _folder);
251                    request.setAttribute("liferay-ui:app-view-entry:groupId", _groupId);
252                    request.setAttribute(
253                            "liferay-ui:app-view-entry:iconCssClass", _iconCssClass);
254                    request.setAttribute(
255                            "liferay-ui:app-view-entry:latestApprovedVersion",
256                            _latestApprovedVersion);
257                    request.setAttribute(
258                            "liferay-ui:app-view-entry:latestApprovedVersionAuthor",
259                            _latestApprovedVersionAuthor);
260                    request.setAttribute("liferay-ui:app-view-entry:locked", _locked);
261                    request.setAttribute(
262                            "liferay-ui:app-view-entry:modifiedDate", _modifiedDate);
263                    request.setAttribute(
264                            "liferay-ui:app-view-entry:reviewDate", _reviewDate);
265                    request.setAttribute(
266                            "liferay-ui:app-view-entry:rowCheckerId", _rowCheckerId);
267                    request.setAttribute(
268                            "liferay-ui:app-view-entry:rowCheckerName", _rowCheckerName);
269                    request.setAttribute("liferay-ui:app-view-entry:shortcut", _shortcut);
270                    request.setAttribute(
271                            "liferay-ui:app-view-entry:showCheckbox", _showCheckbox);
272                    request.setAttribute(
273                            "liferay-ui:app-view-entry:showLinkTitle", _showLinkTitle);
274                    request.setAttribute("liferay-ui:app-view-entry:status", _status);
275                    request.setAttribute(
276                            "liferay-ui:app-view-entry:thumbnailDivStyle", _thumbnailDivStyle);
277                    request.setAttribute(
278                            "liferay-ui:app-view-entry:thumbnailSrc", _thumbnailSrc);
279                    request.setAttribute(
280                            "liferay-ui:app-view-entry:thumbnailStyle", _thumbnailStyle);
281                    request.setAttribute("liferay-ui:app-view-entry:title", _title);
282                    request.setAttribute("liferay-ui:app-view-entry:version", _version);
283                    request.setAttribute("liferay-ui:app-view-entry:url", _url);
284            }
285    
286            private static final boolean _CLEAN_UP_SET_ATTRIBUTES = true;
287    
288            private static final String _PAGE =
289                    "/html/taglib/ui/app_view_entry/page.jsp";
290    
291            private String _actionJsp;
292            private String _assetCategoryClassName;
293            private long _assetCategoryClassPK;
294            private String _assetTagClassName;
295            private long _assetTagClassPK;
296            private String _author;
297            private String _classTypeName;
298            private Date _createDate;
299            private String _cssClass;
300            private Map<String, Object> _data;
301            private String _description;
302            private Date _displayDate;
303            private String _displayStyle;
304            private Date _expirationDate;
305            private boolean _folder;
306            private long _groupId;
307            private String _iconCssClass;
308            private String _latestApprovedVersion;
309            private String _latestApprovedVersionAuthor;
310            private boolean _locked;
311            private Date _modifiedDate;
312            private Date _reviewDate;
313            private String _rowCheckerId;
314            private String _rowCheckerName;
315            private boolean _shortcut;
316            private boolean _showCheckbox = false;
317            private boolean _showLinkTitle = true;
318            private int _status = 0;
319            private String _thumbnailDivStyle = StringPool.BLANK;
320            private String _thumbnailSrc;
321            private String _thumbnailStyle;
322            private String _title;
323            private String _url;
324            private String _version;
325    
326    }