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="AssetCategoriesSummaryTag.java.html"><b><i>View Source</i></b></a>
25   *
26   * @author Brian Wing Shun Chan
27   * @author Jorge Ferrer
28   */
29  public class AssetCategoriesSummaryTag extends IncludeTag {
30  
31      public PortletURL getPortletURL() {
32          return _portletURL;
33      }
34  
35      public void setClassName(String className) {
36          _className = className;
37      }
38  
39      public void setClassPK(long classPK) {
40          _classPK = classPK;
41      }
42  
43      public void setMessage(String message) {
44          _message = message;
45      }
46  
47      public void setPortletURL(PortletURL portletURL) {
48          _portletURL = portletURL;
49      }
50  
51      protected void cleanUp() {
52          _className = null;
53          _classPK = 0;
54          _message = null;
55          _portletURL = null;
56      }
57  
58      protected String getPage() {
59          return _PAGE;
60      }
61  
62      protected void setAttributes(HttpServletRequest request) {
63          request.setAttribute(
64              "liferay-ui:asset-categories-summary:className", _className);
65          request.setAttribute(
66              "liferay-ui:asset-categories-summary:classPK",
67              String.valueOf(_classPK));
68          request.setAttribute(
69              "liferay-ui:asset-categories-summary:message", _message);
70          request.setAttribute(
71              "liferay-ui:asset-categories-summary:portletURL", _portletURL);
72      }
73  
74      private static final String _PAGE =
75          "/html/taglib/ui/asset_categories_summary/page.jsp";
76  
77      private String _className;
78      private long _classPK;
79      private String _message;
80      private PortletURL _portletURL;
81  
82  }