001    /**
002     * Copyright (c) 2000-2010 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.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    }