1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.tags.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="TagsVocabularyLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link TagsVocabularyLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       TagsVocabularyLocalService
39   * @generated
40   */
41  public class TagsVocabularyLocalServiceUtil {
42      public static com.liferay.portlet.tags.model.TagsVocabulary addTagsVocabulary(
43          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
44          throws com.liferay.portal.SystemException {
45          return getService().addTagsVocabulary(tagsVocabulary);
46      }
47  
48      public static com.liferay.portlet.tags.model.TagsVocabulary createTagsVocabulary(
49          long vocabularyId) {
50          return getService().createTagsVocabulary(vocabularyId);
51      }
52  
53      public static void deleteTagsVocabulary(long vocabularyId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteTagsVocabulary(vocabularyId);
57      }
58  
59      public static void deleteTagsVocabulary(
60          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
61          throws com.liferay.portal.SystemException {
62          getService().deleteTagsVocabulary(tagsVocabulary);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.tags.model.TagsVocabulary getTagsVocabulary(
96          long vocabularyId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getTagsVocabulary(vocabularyId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> getTagsVocabularies(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getTagsVocabularies(start, end);
105     }
106 
107     public static int getTagsVocabulariesCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getTagsVocabulariesCount();
110     }
111 
112     public static com.liferay.portlet.tags.model.TagsVocabulary updateTagsVocabulary(
113         com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
114         throws com.liferay.portal.SystemException {
115         return getService().updateTagsVocabulary(tagsVocabulary);
116     }
117 
118     public static com.liferay.portlet.tags.model.TagsVocabulary updateTagsVocabulary(
119         com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateTagsVocabulary(tagsVocabulary, merge);
122     }
123 
124     public static com.liferay.portlet.tags.model.TagsVocabulary addVocabulary(
125         long userId, java.lang.String name, boolean folksonomy,
126         com.liferay.portal.service.ServiceContext serviceContext)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService()
130                    .addVocabulary(userId, name, folksonomy, serviceContext);
131     }
132 
133     public static void addVocabularyResources(
134         com.liferay.portlet.tags.model.TagsVocabulary vocabulary,
135         boolean addCommunityPermissions, boolean addGuestPermissions)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         getService()
139             .addVocabularyResources(vocabulary, addCommunityPermissions,
140             addGuestPermissions);
141     }
142 
143     public static void addVocabularyResources(
144         com.liferay.portlet.tags.model.TagsVocabulary vocabulary,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         getService()
150             .addVocabularyResources(vocabulary, communityPermissions,
151             guestPermissions);
152     }
153 
154     public static void deleteVocabulary(long vocabularyId)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService().deleteVocabulary(vocabularyId);
158     }
159 
160     public static void deleteVocabulary(
161         com.liferay.portlet.tags.model.TagsVocabulary vocabulary)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         getService().deleteVocabulary(vocabulary);
165     }
166 
167     public static java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> getCompanyVocabularies(
168         long companyId, boolean folksonomy)
169         throws com.liferay.portal.SystemException {
170         return getService().getCompanyVocabularies(companyId, folksonomy);
171     }
172 
173     public static java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> getGroupVocabularies(
174         long groupId, boolean folksonomy)
175         throws com.liferay.portal.SystemException {
176         return getService().getGroupVocabularies(groupId, folksonomy);
177     }
178 
179     public static com.liferay.portlet.tags.model.TagsVocabulary getGroupVocabulary(
180         long groupId, java.lang.String name)
181         throws com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException {
183         return getService().getGroupVocabulary(groupId, name);
184     }
185 
186     public static com.liferay.portlet.tags.model.TagsVocabulary getVocabulary(
187         long vocabularyId)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         return getService().getVocabulary(vocabularyId);
191     }
192 
193     public static com.liferay.portlet.tags.model.TagsVocabulary updateVocabulary(
194         long vocabularyId, java.lang.String name, boolean folksonomy)
195         throws com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException {
197         return getService().updateVocabulary(vocabularyId, name, folksonomy);
198     }
199 
200     public static TagsVocabularyLocalService getService() {
201         if (_service == null) {
202             _service = (TagsVocabularyLocalService)PortalBeanLocatorUtil.locate(TagsVocabularyLocalService.class.getName());
203 
204             ReferenceRegistry.registerReference(TagsVocabularyLocalServiceUtil.class,
205                 "_service");
206             MethodCache.remove(TagsVocabularyLocalService.class);
207         }
208 
209         return _service;
210     }
211 
212     public void setService(TagsVocabularyLocalService service) {
213         MethodCache.remove(TagsVocabularyLocalService.class);
214 
215         _service = service;
216 
217         ReferenceRegistry.registerReference(TagsVocabularyLocalServiceUtil.class,
218             "_service");
219         MethodCache.remove(TagsVocabularyLocalService.class);
220     }
221 
222     private static TagsVocabularyLocalService _service;
223 }