1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.tags.service;
24  
25  
26  /**
27   * <a href="TagsVocabularyLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * {@link TagsVocabularyLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       TagsVocabularyLocalService
44   * @generated
45   */
46  public class TagsVocabularyLocalServiceUtil {
47      public static com.liferay.portlet.tags.model.TagsVocabulary addTagsVocabulary(
48          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
49          throws com.liferay.portal.SystemException {
50          return getService().addTagsVocabulary(tagsVocabulary);
51      }
52  
53      public static com.liferay.portlet.tags.model.TagsVocabulary createTagsVocabulary(
54          long vocabularyId) {
55          return getService().createTagsVocabulary(vocabularyId);
56      }
57  
58      public static void deleteTagsVocabulary(long vocabularyId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteTagsVocabulary(vocabularyId);
62      }
63  
64      public static void deleteTagsVocabulary(
65          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
66          throws com.liferay.portal.SystemException {
67          getService().deleteTagsVocabulary(tagsVocabulary);
68      }
69  
70      public static java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException {
73          return getService().dynamicQuery(dynamicQuery);
74      }
75  
76      public static java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException {
79          return getService().dynamicQuery(dynamicQuery, start, end);
80      }
81  
82      public static com.liferay.portlet.tags.model.TagsVocabulary getTagsVocabulary(
83          long vocabularyId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getTagsVocabulary(vocabularyId);
87      }
88  
89      public static java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> getTagsVocabularies(
90          int start, int end) throws com.liferay.portal.SystemException {
91          return getService().getTagsVocabularies(start, end);
92      }
93  
94      public static int getTagsVocabulariesCount()
95          throws com.liferay.portal.SystemException {
96          return getService().getTagsVocabulariesCount();
97      }
98  
99      public static com.liferay.portlet.tags.model.TagsVocabulary updateTagsVocabulary(
100         com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
101         throws com.liferay.portal.SystemException {
102         return getService().updateTagsVocabulary(tagsVocabulary);
103     }
104 
105     public static com.liferay.portlet.tags.model.TagsVocabulary updateTagsVocabulary(
106         com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary,
107         boolean merge) throws com.liferay.portal.SystemException {
108         return getService().updateTagsVocabulary(tagsVocabulary, merge);
109     }
110 
111     public static com.liferay.portlet.tags.model.TagsVocabulary addVocabulary(
112         long userId, java.lang.String name, boolean folksonomy,
113         com.liferay.portal.service.ServiceContext serviceContext)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         return getService()
117                    .addVocabulary(userId, name, folksonomy, serviceContext);
118     }
119 
120     public static void addVocabularyResources(
121         com.liferay.portlet.tags.model.TagsVocabulary vocabulary,
122         boolean addCommunityPermissions, boolean addGuestPermissions)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException {
125         getService()
126             .addVocabularyResources(vocabulary, addCommunityPermissions,
127             addGuestPermissions);
128     }
129 
130     public static void addVocabularyResources(
131         com.liferay.portlet.tags.model.TagsVocabulary vocabulary,
132         java.lang.String[] communityPermissions,
133         java.lang.String[] guestPermissions)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         getService()
137             .addVocabularyResources(vocabulary, communityPermissions,
138             guestPermissions);
139     }
140 
141     public static void deleteVocabulary(long vocabularyId)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         getService().deleteVocabulary(vocabularyId);
145     }
146 
147     public static void deleteVocabulary(
148         com.liferay.portlet.tags.model.TagsVocabulary vocabulary)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         getService().deleteVocabulary(vocabulary);
152     }
153 
154     public static java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> getCompanyVocabularies(
155         long companyId, boolean folksonomy)
156         throws com.liferay.portal.SystemException {
157         return getService().getCompanyVocabularies(companyId, folksonomy);
158     }
159 
160     public static java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> getGroupVocabularies(
161         long groupId, boolean folksonomy)
162         throws com.liferay.portal.SystemException {
163         return getService().getGroupVocabularies(groupId, folksonomy);
164     }
165 
166     public static com.liferay.portlet.tags.model.TagsVocabulary getGroupVocabulary(
167         long groupId, java.lang.String name)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         return getService().getGroupVocabulary(groupId, name);
171     }
172 
173     public static com.liferay.portlet.tags.model.TagsVocabulary getVocabulary(
174         long vocabularyId)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         return getService().getVocabulary(vocabularyId);
178     }
179 
180     public static com.liferay.portlet.tags.model.TagsVocabulary updateVocabulary(
181         long vocabularyId, java.lang.String name, boolean folksonomy)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException {
184         return getService().updateVocabulary(vocabularyId, name, folksonomy);
185     }
186 
187     public static TagsVocabularyLocalService getService() {
188         if (_service == null) {
189             throw new RuntimeException("TagsVocabularyLocalService is not set");
190         }
191 
192         return _service;
193     }
194 
195     public void setService(TagsVocabularyLocalService service) {
196         _service = service;
197     }
198 
199     private static TagsVocabularyLocalService _service;
200 }