1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.taglib.ui;
16  
17  import com.liferay.taglib.util.IncludeTag;
18  
19  import javax.portlet.PortletURL;
20  
21  import javax.servlet.http.HttpServletRequest;
22  
23  /**
24   * <a href="AssetTagsSummaryTag.java.html"><b><i>View Source</i></b></a>
25   *
26   * @author Brian Wing Shun Chan
27   */
28  public class AssetTagsSummaryTag extends IncludeTag {
29  
30      public PortletURL getPortletURL() {
31          return _portletURL;
32      }
33  
34      public void setClassName(String className) {
35          _className = className;
36      }
37  
38      public void setClassPK(long classPK) {
39          _classPK = classPK;
40      }
41  
42      public void setMessage(String message) {
43          _message = message;
44      }
45  
46      public void setPortletURL(PortletURL portletURL) {
47          _portletURL = portletURL;
48      }
49  
50      protected void cleanUp() {
51          _className = null;
52          _classPK = 0;
53          _message = null;
54          _portletURL = null;
55      }
56  
57      protected String getPage() {
58          return _PAGE;
59      }
60  
61      protected void setAttributes(HttpServletRequest request) {
62          request.setAttribute(
63              "liferay-ui:asset-tags-summary:className", _className);
64          request.setAttribute(
65              "liferay-ui:asset-tags-summary:classPK", String.valueOf(_classPK));
66          request.setAttribute("liferay-ui:asset-tags-summary:message", _message);
67          request.setAttribute(
68              "liferay-ui:asset-tags-summary:portletURL", _portletURL);
69      }
70  
71      private static final String _PAGE =
72          "/html/taglib/ui/asset_tags_summary/page.jsp";
73  
74      private String _className;
75      private long _classPK;
76      private String _message;
77      private PortletURL _portletURL;
78  
79  }