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.portal.kernel.dao.search.RowChecker;
18  
19  import java.util.LinkedHashMap;
20  
21  import javax.portlet.PortletURL;
22  
23  import javax.servlet.http.HttpServletRequest;
24  import javax.servlet.jsp.tagext.TagSupport;
25  
26  /**
27   * <a href="GroupSearchTag.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Brian Wing Shun Chan
30   */
31  public class GroupSearchTag extends TagSupport {
32  
33      public void setGroupParams(LinkedHashMap<String, Object> groupParams) {
34          _groupParams = groupParams;
35      }
36  
37      public void setPortletURL(PortletURL portletURL) {
38          _portletURL = portletURL;
39      }
40  
41      public void setRowChecker(RowChecker rowChecker) {
42          _rowChecker = rowChecker;
43      }
44  
45      protected void cleanUp() {
46          _groupParams = null;
47          _portletURL = null;
48          _rowChecker = null;
49      }
50  
51      protected String getEndPage() {
52          return _END_PAGE;
53      }
54  
55      protected String getStartPage() {
56          return _START_PAGE;
57      }
58  
59      protected void setAttributes(HttpServletRequest request) {
60          request.setAttribute(
61              "liferay-ui:group-search:groupParams", _groupParams);
62          request.setAttribute("liferay-ui:group-search:portletURL", _portletURL);
63          request.setAttribute("liferay-ui:group-search:rowChecker", _rowChecker);
64      }
65  
66      private static final String _END_PAGE =
67          "/html/taglib/ui/group_search/end.jsp";
68  
69      private static final String _START_PAGE =
70          "/html/taglib/ui/group_search/start.jsp";
71  
72      private LinkedHashMap<String, Object> _groupParams;
73      private PortletURL _portletURL;
74      private RowChecker _rowChecker;
75  
76  }