1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
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="TagsSummaryTag.java.html"><b><i>View Source</i></b></a>
25   *
26   * @author Brian Wing Shun Chan
27   */
28  public class TagsSummaryTag extends IncludeTag {
29  
30      public int doStartTag() {
31          HttpServletRequest request =
32              (HttpServletRequest)pageContext.getRequest();
33  
34          request.setAttribute("liferay-ui:tags_summary:className", _className);
35          request.setAttribute(
36              "liferay-ui:tags_summary:classPK", String.valueOf(_classPK));
37          request.setAttribute(
38              "liferay-ui:tags_summary:folksonomy", String.valueOf(_folksonomy));
39          request.setAttribute("liferay-ui:tags_summary:message", _message);
40          request.setAttribute("liferay-ui:tags_summary:portletURL", _portletURL);
41  
42          return EVAL_BODY_BUFFERED;
43      }
44  
45      public void setClassName(String className) {
46          _className = className;
47      }
48  
49      public void setClassPK(long classPK) {
50          _classPK = classPK;
51      }
52  
53      public void setFolksonomy(boolean folksonomy) {
54          _folksonomy = folksonomy;
55      }
56  
57      public void setMessage(String message) {
58          _message = message;
59      }
60  
61      public PortletURL getPortletURL() {
62          return _portletURL;
63      }
64  
65      public void setPortletURL(PortletURL portletURL) {
66          _portletURL = portletURL;
67      }
68  
69      protected String getDefaultPage() {
70          return _PAGE;
71      }
72  
73      private static final String _PAGE = "/html/taglib/ui/tags_summary/page.jsp";
74  
75      private String _className;
76      private long _classPK;
77      private boolean _folksonomy = true;
78      private String _message;
79      private PortletURL _portletURL;
80  
81  }