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