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="AssetCategoriesNavigationTag.java.html"><b><i>View Source</i></b>
23   * </a>
24   *
25   * @author Alvaro del Castillo
26   * @author Eduardo Lundgren
27   * @author Jorge Ferrer
28   */
29  public class AssetCategoriesNavigationTag extends IncludeTag {
30  
31      public void setHidePortletWhenEmpty(boolean hidePortletWhenEmpty) {
32          _hidePortletWhenEmpty = hidePortletWhenEmpty;
33      }
34  
35      public void setVocabularyIds(long[] vocabularyIds) {
36          _vocabularyIds = vocabularyIds;
37      }
38  
39      protected void cleanUp() {
40          _hidePortletWhenEmpty = false;
41          _vocabularyIds = null;
42      }
43  
44      protected String getPage() {
45          return _PAGE;
46      }
47  
48      protected void setAttributes(HttpServletRequest request) {
49          request.setAttribute(
50              "liferay-ui:asset-tags-navigation:hidePortletWhenEmpty",
51              String.valueOf(_hidePortletWhenEmpty));
52          request.setAttribute(
53              "liferay-ui:asset-tags-navigation:vocabularyIds", _vocabularyIds);
54      }
55  
56      private static final String _PAGE =
57          "/html/taglib/ui/asset_categories_navigation/page.jsp";
58  
59      private boolean _hidePortletWhenEmpty;
60      private long[] _vocabularyIds;
61  
62  }