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 int doStartTag() {
32          HttpServletRequest request =
33              (HttpServletRequest)pageContext.getRequest();
34  
35          request.setAttribute(
36              "liferay-ui:asset-categories-summary:className", _className);
37          request.setAttribute(
38              "liferay-ui:asset-categories-summary:classPK",
39              String.valueOf(_classPK));
40          request.setAttribute(
41              "liferay-ui:asset-categories-summary:message", _message);
42          request.setAttribute(
43              "liferay-ui:asset-categories-summary:portletURL", _portletURL);
44  
45          return EVAL_BODY_BUFFERED;
46      }
47  
48      public PortletURL getPortletURL() {
49          return _portletURL;
50      }
51  
52      public void setClassName(String className) {
53          _className = className;
54      }
55  
56      public void setClassPK(long classPK) {
57          _classPK = classPK;
58      }
59  
60      public void setMessage(String message) {
61          _message = message;
62      }
63  
64      public void setPortletURL(PortletURL portletURL) {
65          _portletURL = portletURL;
66      }
67  
68      protected String getDefaultPage() {
69          return _PAGE;
70      }
71  
72      private static final String _PAGE =
73          "/html/taglib/ui/asset_categories_summary/page.jsp";
74  
75      private String _className;
76      private long _classPK;
77      private String _message;
78      private PortletURL _portletURL;
79  
80  }