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("liferay-ui:tags_summary:message", _message);
38          request.setAttribute("liferay-ui:tags_summary:portletURL", _portletURL);
39  
40          return EVAL_BODY_BUFFERED;
41      }
42  
43      public void setClassName(String className) {
44          _className = className;
45      }
46  
47      public void setClassPK(long classPK) {
48          _classPK = classPK;
49      }
50  
51      public void setMessage(String message) {
52          _message = message;
53      }
54  
55      public PortletURL getPortletURL() {
56          return _portletURL;
57      }
58  
59      public void setPortletURL(PortletURL portletURL) {
60          _portletURL = portletURL;
61      }
62  
63      protected String getDefaultPage() {
64          return _PAGE;
65      }
66  
67      private static final String _PAGE = "/html/taglib/ui/tags_summary/page.jsp";
68  
69      private String _className;
70      private long _classPK;
71      private String _message;
72      private PortletURL _portletURL;
73  
74  }