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  import com.liferay.taglib.util.IncludeTag;
19  
20  import java.util.LinkedHashMap;
21  
22  import javax.portlet.PortletURL;
23  
24  import javax.servlet.http.HttpServletRequest;
25  
26  /**
27   * <a href="UserSearchTag.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Brian Wing Shun Chan
30   */
31  public class UserSearchTag extends IncludeTag {
32  
33      public void setPortletURL(PortletURL portletURL) {
34          _portletURL = portletURL;
35      }
36  
37      public void setRowChecker(RowChecker rowChecker) {
38          _rowChecker = rowChecker;
39      }
40  
41      public void setUserParams(LinkedHashMap<String, Object> userParams) {
42          _userParams = userParams;
43      }
44  
45      protected void cleanUp() {
46          _portletURL = null;
47          _rowChecker = null;
48          _userParams = 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:user-search:portletURL", _portletURL);
62          request.setAttribute(
63              "liferay-ui:user-search:rowChecker", _rowChecker);
64          request.setAttribute(
65              "liferay-ui:user-search:userParams", _userParams);
66      }
67  
68      private static final String _END_PAGE =
69          "/html/taglib/ui/user_search/end.jsp";
70  
71      private static final String _START_PAGE =
72          "/html/taglib/ui/user_search/start.jsp";
73  
74      private PortletURL _portletURL;
75      private RowChecker _rowChecker;
76      private LinkedHashMap<String, Object> _userParams;
77  
78  }