1   /**
2    * Copyright (c) 2000-2008 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.messageboards.service;
24  
25  
26  /**
27   * <a href="MBCategoryLocalServiceUtil.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   * <code>com.liferay.portlet.messageboards.service.MBCategoryLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.messageboards.service.MBCategoryLocalService
45   *
46   */
47  public class MBCategoryLocalServiceUtil {
48      public static com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
49          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
50          throws com.liferay.portal.SystemException {
51          return _service.addMBCategory(mbCategory);
52      }
53  
54      public static void deleteMBCategory(long categoryId)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException {
57          _service.deleteMBCategory(categoryId);
58      }
59  
60      public static void deleteMBCategory(
61          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
62          throws com.liferay.portal.SystemException {
63          _service.deleteMBCategory(mbCategory);
64      }
65  
66      public static java.util.List<Object> dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return _service.dynamicQuery(dynamicQuery);
70      }
71  
72      public static java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
74          int end) throws com.liferay.portal.SystemException {
75          return _service.dynamicQuery(dynamicQuery, start, end);
76      }
77  
78      public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
79          long categoryId)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException {
82          return _service.getMBCategory(categoryId);
83      }
84  
85      public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
86          int start, int end) throws com.liferay.portal.SystemException {
87          return _service.getMBCategories(start, end);
88      }
89  
90      public static int getMBCategoriesCount()
91          throws com.liferay.portal.SystemException {
92          return _service.getMBCategoriesCount();
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
96          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
97          throws com.liferay.portal.SystemException {
98          return _service.updateMBCategory(mbCategory);
99      }
100 
101     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
102         long userId, long plid, long parentCategoryId, java.lang.String name,
103         java.lang.String description, boolean addCommunityPermissions,
104         boolean addGuestPermissions)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException {
107         return _service.addCategory(userId, plid, parentCategoryId, name,
108             description, addCommunityPermissions, addGuestPermissions);
109     }
110 
111     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
112         java.lang.String uuid, long userId, long plid, long parentCategoryId,
113         java.lang.String name, java.lang.String description,
114         boolean addCommunityPermissions, boolean addGuestPermissions)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return _service.addCategory(uuid, userId, plid, parentCategoryId, name,
118             description, addCommunityPermissions, addGuestPermissions);
119     }
120 
121     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
122         long userId, long plid, long parentCategoryId, java.lang.String name,
123         java.lang.String description, java.lang.String[] communityPermissions,
124         java.lang.String[] guestPermissions)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         return _service.addCategory(userId, plid, parentCategoryId, name,
128             description, communityPermissions, guestPermissions);
129     }
130 
131     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
132         java.lang.String uuid, long userId, long plid, long parentCategoryId,
133         java.lang.String name, java.lang.String description,
134         java.lang.Boolean addCommunityPermissions,
135         java.lang.Boolean addGuestPermissions,
136         java.lang.String[] communityPermissions,
137         java.lang.String[] guestPermissions)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         return _service.addCategory(uuid, userId, plid, parentCategoryId, name,
141             description, addCommunityPermissions, addGuestPermissions,
142             communityPermissions, guestPermissions);
143     }
144 
145     public static void addCategoryResources(long categoryId,
146         boolean addCommunityPermissions, boolean addGuestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         _service.addCategoryResources(categoryId, addCommunityPermissions,
150             addGuestPermissions);
151     }
152 
153     public static void addCategoryResources(
154         com.liferay.portlet.messageboards.model.MBCategory category,
155         boolean addCommunityPermissions, boolean addGuestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         _service.addCategoryResources(category, addCommunityPermissions,
159             addGuestPermissions);
160     }
161 
162     public static void addCategoryResources(long categoryId,
163         java.lang.String[] communityPermissions,
164         java.lang.String[] guestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         _service.addCategoryResources(categoryId, communityPermissions,
168             guestPermissions);
169     }
170 
171     public static void addCategoryResources(
172         com.liferay.portlet.messageboards.model.MBCategory category,
173         java.lang.String[] communityPermissions,
174         java.lang.String[] guestPermissions)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         _service.addCategoryResources(category, communityPermissions,
178             guestPermissions);
179     }
180 
181     public static void deleteCategories(long groupId)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException {
184         _service.deleteCategories(groupId);
185     }
186 
187     public static void deleteCategory(long categoryId)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         _service.deleteCategory(categoryId);
191     }
192 
193     public static void deleteCategory(
194         com.liferay.portlet.messageboards.model.MBCategory category)
195         throws com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException {
197         _service.deleteCategory(category);
198     }
199 
200     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
201         long groupId, long parentCategoryId)
202         throws com.liferay.portal.SystemException {
203         return _service.getCategories(groupId, parentCategoryId);
204     }
205 
206     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
207         long groupId, long parentCategoryId, int start, int end)
208         throws com.liferay.portal.SystemException {
209         return _service.getCategories(groupId, parentCategoryId, start, end);
210     }
211 
212     public static int getCategoriesCount(long groupId)
213         throws com.liferay.portal.SystemException {
214         return _service.getCategoriesCount(groupId);
215     }
216 
217     public static int getCategoriesCount(long groupId, long parentCategoryId)
218         throws com.liferay.portal.SystemException {
219         return _service.getCategoriesCount(groupId, parentCategoryId);
220     }
221 
222     public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
223         long categoryId)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         return _service.getCategory(categoryId);
227     }
228 
229     public static void getSubcategoryIds(java.util.List<Long> categoryIds,
230         long groupId, long categoryId)
231         throws com.liferay.portal.SystemException {
232         _service.getSubcategoryIds(categoryIds, groupId, categoryId);
233     }
234 
235     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
236         long groupId, long userId, int start, int end)
237         throws com.liferay.portal.SystemException {
238         return _service.getSubscribedCategories(groupId, userId, start, end);
239     }
240 
241     public static int getSubscribedCategoriesCount(long groupId, long userId)
242         throws com.liferay.portal.SystemException {
243         return _service.getSubscribedCategoriesCount(groupId, userId);
244     }
245 
246     public static com.liferay.portlet.messageboards.model.MBCategory getSystemCategory()
247         throws com.liferay.portal.SystemException {
248         return _service.getSystemCategory();
249     }
250 
251     public static void reIndex(java.lang.String[] ids)
252         throws com.liferay.portal.SystemException {
253         _service.reIndex(ids);
254     }
255 
256     public static com.liferay.portal.kernel.search.Hits search(long companyId,
257         long groupId, long[] categoryIds, long threadId,
258         java.lang.String keywords, int start, int end)
259         throws com.liferay.portal.SystemException {
260         return _service.search(companyId, groupId, categoryIds, threadId,
261             keywords, start, end);
262     }
263 
264     public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
265         long categoryId, long parentCategoryId, java.lang.String name,
266         java.lang.String description, boolean mergeWithParentCategory)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException {
269         return _service.updateCategory(categoryId, parentCategoryId, name,
270             description, mergeWithParentCategory);
271     }
272 
273     public static void subscribeCategory(long userId, long categoryId)
274         throws com.liferay.portal.PortalException,
275             com.liferay.portal.SystemException {
276         _service.subscribeCategory(userId, categoryId);
277     }
278 
279     public static void unsubscribeCategory(long userId, long categoryId)
280         throws com.liferay.portal.PortalException,
281             com.liferay.portal.SystemException {
282         _service.unsubscribeCategory(userId, categoryId);
283     }
284 
285     public static MBCategoryLocalService getService() {
286         return _service;
287     }
288 
289     public void setService(MBCategoryLocalService service) {
290         _service = service;
291     }
292 
293     private static MBCategoryLocalService _service;
294 }