001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.taglib.ui;
016    
017    import com.liferay.taglib.util.IncludeTag;
018    
019    import javax.portlet.PortletURL;
020    
021    import javax.servlet.http.HttpServletRequest;
022    
023    /**
024     * @author Brian Wing Shun Chan
025     * @author Jorge Ferrer
026     */
027    public class AssetCategoriesSummaryTag extends IncludeTag {
028    
029            public PortletURL getPortletURL() {
030                    return _portletURL;
031            }
032    
033            public void setClassName(String className) {
034                    _className = className;
035            }
036    
037            public void setClassPK(long classPK) {
038                    _classPK = classPK;
039            }
040    
041            public void setMessage(String message) {
042                    _message = message;
043            }
044    
045            public void setPortletURL(PortletURL portletURL) {
046                    _portletURL = portletURL;
047            }
048    
049            protected void cleanUp() {
050                    _className = null;
051                    _classPK = 0;
052                    _message = null;
053                    _portletURL = null;
054            }
055    
056            protected String getPage() {
057                    return _PAGE;
058            }
059    
060            protected void setAttributes(HttpServletRequest request) {
061                    request.setAttribute(
062                            "liferay-ui:asset-categories-summary:className", _className);
063                    request.setAttribute(
064                            "liferay-ui:asset-categories-summary:classPK",
065                            String.valueOf(_classPK));
066                    request.setAttribute(
067                            "liferay-ui:asset-categories-summary:message", _message);
068                    request.setAttribute(
069                            "liferay-ui:asset-categories-summary:portletURL", _portletURL);
070            }
071    
072            private static final String _PAGE =
073                    "/html/taglib/ui/asset_categories_summary/page.jsp";
074    
075            private String _className;
076            private long _classPK;
077            private String _message;
078            private PortletURL _portletURL;
079    
080    }