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     */
026    public class AssetTagsSummaryTag extends IncludeTag {
027    
028            public String getAssetTagNames() {
029                    return _assetTagNames;
030            }
031    
032            public PortletURL getPortletURL() {
033                    return _portletURL;
034            }
035    
036            public void setClassName(String className) {
037                    _className = className;
038            }
039    
040            public void setClassPK(long classPK) {
041                    _classPK = classPK;
042            }
043    
044            public void setMessage(String message) {
045                    _message = message;
046            }
047    
048            public void setAssetTagNames(String assetTagNames) {
049                    _assetTagNames = assetTagNames;
050            }
051    
052            public void setPortletURL(PortletURL portletURL) {
053                    _portletURL = portletURL;
054            }
055    
056            protected void cleanUp() {
057                    _assetTagNames = null;
058                    _className = null;
059                    _classPK = 0;
060                    _message = null;
061                    _portletURL = null;
062            }
063    
064            protected String getPage() {
065                    return _PAGE;
066            }
067    
068            protected void setAttributes(HttpServletRequest request) {
069                    request.setAttribute(
070                            "liferay-ui:asset-tags-summary:assetTagNames", _assetTagNames);
071                    request.setAttribute(
072                            "liferay-ui:asset-tags-summary:className", _className);
073                    request.setAttribute(
074                            "liferay-ui:asset-tags-summary:classPK", String.valueOf(_classPK));
075                    request.setAttribute("liferay-ui:asset-tags-summary:message", _message);
076                    request.setAttribute(
077                            "liferay-ui:asset-tags-summary:portletURL", _portletURL);
078            }
079    
080            private static final String _PAGE =
081                    "/html/taglib/ui/asset_tags_summary/page.jsp";
082    
083            private String _assetTagNames;
084            private String _className;
085            private long _classPK;
086            private String _message;
087            private PortletURL _portletURL;
088    
089    }