001    /**
002     * Copyright (c) 2000-2013 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.Tuple;
018    import com.liferay.portlet.messageboards.model.MBMessage;
019    import com.liferay.taglib.util.IncludeTag;
020    
021    import java.util.List;
022    
023    import javax.servlet.http.HttpServletRequest;
024    
025    /**
026     * @author Eudaldo Alonso
027     */
028    public class AppViewSearchEntryTag extends IncludeTag {
029    
030            @Override
031            public int doStartTag() {
032                    return EVAL_BODY_INCLUDE;
033            }
034    
035            public void setActionJsp(String actionJsp) {
036                    _actionJsp = actionJsp;
037            }
038    
039            public void setContainerIcon(String containerIcon) {
040                    _containerIcon = containerIcon;
041            }
042    
043            public void setContainerName(String containerName) {
044                    _containerName = containerName;
045            }
046    
047            public void setContainerSrc(String containerSrc) {
048                    _containerSrc = containerSrc;
049            }
050    
051            public void setContainerType(String containerType) {
052                    _containerType = containerType;
053            }
054    
055            public void setCssClass(String cssClass) {
056                    _cssClass = cssClass;
057            }
058    
059            public void setDescription(String description) {
060                    _description = description;
061            }
062    
063            public void setFileEntryTuples(List<Tuple> fileEntryTuples) {
064                    _fileEntryTuples = fileEntryTuples;
065            }
066    
067            public void setLocked(boolean locked) {
068                    _locked = locked;
069            }
070    
071            public void setMbMessages(List<MBMessage> mbMessages) {
072                    _mbMessages = mbMessages;
073            }
074    
075            public void setQueryTerms(String[] queryTerms) {
076                    _queryTerms = queryTerms;
077            }
078    
079            public void setRowCheckerId(String rowCheckerId) {
080                    _rowCheckerId = rowCheckerId;
081            }
082    
083            public void setRowCheckerName(String rowCheckerName) {
084                    _rowCheckerName = rowCheckerName;
085            }
086    
087            public void setShowCheckbox(boolean showCheckbox) {
088                    _showCheckbox = showCheckbox;
089            }
090    
091            public void setStatus(int status) {
092                    _status = status;
093            }
094    
095            public void setThumbnailSrc(String thumbnailSrc) {
096                    _thumbnailSrc = thumbnailSrc;
097            }
098    
099            public void setTitle(String title) {
100                    _title = title;
101            }
102    
103            public void setUrl(String url) {
104                    _url = url;
105            }
106    
107            public void setVersions(List<String> versions) {
108                    _versions = versions;
109            }
110    
111            @Override
112            protected void cleanUp() {
113                    _actionJsp = null;
114                    _containerIcon = null;
115                    _containerName = null;
116                    _containerSrc = null;
117                    _containerType = null;
118                    _cssClass = null;
119                    _description = null;
120                    _fileEntryTuples = null;
121                    _locked = false;
122                    _mbMessages = null;
123                    _queryTerms = null;
124                    _rowCheckerId = null;
125                    _rowCheckerName = null;
126                    _showCheckbox = false;
127                    _status = 0;
128                    _thumbnailSrc = null;
129                    _title = null;
130                    _url = null;
131                    _versions = null;
132            }
133    
134            @Override
135            protected String getPage() {
136                    return _PAGE;
137            }
138    
139            @Override
140            protected boolean isCleanUpSetAttributes() {
141                    return _CLEAN_UP_SET_ATTRIBUTES;
142            }
143    
144            @Override
145            protected void setAttributes(HttpServletRequest request) {
146                    request.setAttribute(
147                            "liferay-ui:app-view-search-entry:actionJsp", _actionJsp);
148                    request.setAttribute(
149                            "liferay-ui:app-view-search-entry:containerIcon", _containerIcon);
150                    request.setAttribute(
151                            "liferay-ui:app-view-search-entry:containerName", _containerName);
152                    request.setAttribute(
153                            "liferay-ui:app-view-search-entry:containerSrc", _containerSrc);
154                    request.setAttribute(
155                            "liferay-ui:app-view-search-entry:containerType", _containerType);
156                    request.setAttribute(
157                            "liferay-ui:app-view-search-entry:cssClass", _cssClass);
158                    request.setAttribute(
159                            "liferay-ui:app-view-search-entry:description", _description);
160                    request.setAttribute(
161                            "liferay-ui:app-view-search-entry:fileEntryTuples",
162                            _fileEntryTuples);
163                    request.setAttribute(
164                            "liferay-ui:app-view-search-entry:locked", _locked);
165                    request.setAttribute(
166                            "liferay-ui:app-view-search-entry:mbMessages", _mbMessages);
167                    request.setAttribute(
168                            "liferay-ui:app-view-search-entry:queryTerms", _queryTerms);
169                    request.setAttribute(
170                            "liferay-ui:app-view-search-entry:rowCheckerId", _rowCheckerId);
171                    request.setAttribute(
172                            "liferay-ui:app-view-search-entry:rowCheckerName", _rowCheckerName);
173                    request.setAttribute(
174                            "liferay-ui:app-view-search-entry:showCheckbox", _showCheckbox);
175                    request.setAttribute(
176                            "liferay-ui:app-view-search-entry:status", _status);
177                    request.setAttribute(
178                            "liferay-ui:app-view-search-entry:thumbnailSrc", _thumbnailSrc);
179                    request.setAttribute("liferay-ui:app-view-search-entry:title", _title);
180                    request.setAttribute("liferay-ui:app-view-search-entry:url", _url);
181                    request.setAttribute(
182                            "liferay-ui:app-view-search-entry:versions", _versions);
183            }
184    
185            private static final boolean _CLEAN_UP_SET_ATTRIBUTES = true;
186    
187            private static final String _PAGE =
188                    "/html/taglib/ui/app_view_search_entry/page.jsp";
189    
190            private String _actionJsp;
191            private String _containerIcon;
192            private String _containerName;
193            private String _containerSrc;
194            private String _containerType;
195            private String _cssClass;
196            private String _description;
197            private List<Tuple> _fileEntryTuples;
198            private boolean _locked;
199            private List<MBMessage> _mbMessages;
200            private String[] _queryTerms;
201            private String _rowCheckerId;
202            private String _rowCheckerName;
203            private boolean _showCheckbox = false;
204            private int _status = 0;
205            private String _thumbnailSrc;
206            private String _title;
207            private String _url;
208            private List<String> _versions;
209    
210    }