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.servlet.http.HttpServletRequest;
20  
21  /**
22   * <a href="SocialBookmarksTag.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   * @author Jorge Ferrer
26   */
27  public class SocialBookmarksTag extends IncludeTag {
28  
29      public void setTarget(String target) {
30          _target = target;
31      }
32  
33      public void setTitle(String title) {
34          _title = title;
35      }
36  
37      public void setTypes(String types) {
38          _types = types;
39      }
40  
41      public void setUrl(String url) {
42          _url = url;
43      }
44  
45      protected void cleanUp() {
46          _target = null;
47          _title = null;
48          _types = null;
49          _url = null;
50      }
51  
52      protected String getPage() {
53          return _PAGE;
54      }
55  
56      protected void setAttributes(HttpServletRequest request) {
57          request.setAttribute("liferay-ui:social-bookmark:target", _target);
58          request.setAttribute("liferay-ui:social-bookmark:title", _title);
59          request.setAttribute("liferay-ui:social-bookmark:types", _types);
60          request.setAttribute("liferay-ui:social-bookmark:url", _url);
61      }
62  
63      private static final String _PAGE =
64          "/html/taglib/ui/social_bookmarks/page.jsp";
65  
66      private String _target;
67      private String _title;
68      private String _types;
69      private String _url;
70  
71  }