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.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="MBCategoryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link MBCategoryLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       MBCategoryLocalService
37   * @generated
38   */
39  public class MBCategoryLocalServiceUtil {
40      public static com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
41          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addMBCategory(mbCategory);
44      }
45  
46      public static com.liferay.portlet.messageboards.model.MBCategory createMBCategory(
47          long categoryId) {
48          return getService().createMBCategory(categoryId);
49      }
50  
51      public static void deleteMBCategory(long categoryId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteMBCategory(categoryId);
55      }
56  
57      public static void deleteMBCategory(
58          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteMBCategory(mbCategory);
61      }
62  
63      @SuppressWarnings("unchecked")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("unchecked")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("unchecked")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static long dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
94          long categoryId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getMBCategory(categoryId);
98      }
99  
100     public static com.liferay.portlet.messageboards.model.MBCategory getMBCategoryByUuidAndGroupId(
101         java.lang.String uuid, long groupId)
102         throws com.liferay.portal.kernel.exception.PortalException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getService().getMBCategoryByUuidAndGroupId(uuid, groupId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
108         int start, int end)
109         throws com.liferay.portal.kernel.exception.SystemException {
110         return getService().getMBCategories(start, end);
111     }
112 
113     public static int getMBCategoriesCount()
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getService().getMBCategoriesCount();
116     }
117 
118     public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
119         com.liferay.portlet.messageboards.model.MBCategory mbCategory)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updateMBCategory(mbCategory);
122     }
123 
124     public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
125         com.liferay.portlet.messageboards.model.MBCategory mbCategory,
126         boolean merge)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getService().updateMBCategory(mbCategory, merge);
129     }
130 
131     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
132         long userId, long parentCategoryId, java.lang.String name,
133         java.lang.String description, java.lang.String emailAddress,
134         java.lang.String inProtocol, java.lang.String inServerName,
135         int inServerPort, boolean inUseSSL, java.lang.String inUserName,
136         java.lang.String inPassword, int inReadInterval,
137         java.lang.String outEmailAddress, boolean outCustom,
138         java.lang.String outServerName, int outServerPort, boolean outUseSSL,
139         java.lang.String outUserName, java.lang.String outPassword,
140         boolean mailingListActive,
141         com.liferay.portal.service.ServiceContext serviceContext)
142         throws com.liferay.portal.kernel.exception.PortalException,
143             com.liferay.portal.kernel.exception.SystemException {
144         return getService()
145                    .addCategory(userId, parentCategoryId, name, description,
146             emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
147             inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
148             outServerName, outServerPort, outUseSSL, outUserName, outPassword,
149             mailingListActive, serviceContext);
150     }
151 
152     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
153         java.lang.String uuid, long userId, long parentCategoryId,
154         java.lang.String name, java.lang.String description,
155         java.lang.String emailAddress, java.lang.String inProtocol,
156         java.lang.String inServerName, int inServerPort, boolean inUseSSL,
157         java.lang.String inUserName, java.lang.String inPassword,
158         int inReadInterval, java.lang.String outEmailAddress,
159         boolean outCustom, java.lang.String outServerName, int outServerPort,
160         boolean outUseSSL, java.lang.String outUserName,
161         java.lang.String outPassword, boolean mailingListActive,
162         com.liferay.portal.service.ServiceContext serviceContext)
163         throws com.liferay.portal.kernel.exception.PortalException,
164             com.liferay.portal.kernel.exception.SystemException {
165         return getService()
166                    .addCategory(uuid, userId, parentCategoryId, name,
167             description, emailAddress, inProtocol, inServerName, inServerPort,
168             inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
169             outCustom, outServerName, outServerPort, outUseSSL, outUserName,
170             outPassword, mailingListActive, serviceContext);
171     }
172 
173     public static void addCategoryResources(long categoryId,
174         boolean addCommunityPermissions, boolean addGuestPermissions)
175         throws com.liferay.portal.kernel.exception.PortalException,
176             com.liferay.portal.kernel.exception.SystemException {
177         getService()
178             .addCategoryResources(categoryId, addCommunityPermissions,
179             addGuestPermissions);
180     }
181 
182     public static void addCategoryResources(long categoryId,
183         java.lang.String[] communityPermissions,
184         java.lang.String[] guestPermissions)
185         throws com.liferay.portal.kernel.exception.PortalException,
186             com.liferay.portal.kernel.exception.SystemException {
187         getService()
188             .addCategoryResources(categoryId, communityPermissions,
189             guestPermissions);
190     }
191 
192     public static void addCategoryResources(
193         com.liferay.portlet.messageboards.model.MBCategory category,
194         boolean addCommunityPermissions, boolean addGuestPermissions)
195         throws com.liferay.portal.kernel.exception.PortalException,
196             com.liferay.portal.kernel.exception.SystemException {
197         getService()
198             .addCategoryResources(category, addCommunityPermissions,
199             addGuestPermissions);
200     }
201 
202     public static void addCategoryResources(
203         com.liferay.portlet.messageboards.model.MBCategory category,
204         java.lang.String[] communityPermissions,
205         java.lang.String[] guestPermissions)
206         throws com.liferay.portal.kernel.exception.PortalException,
207             com.liferay.portal.kernel.exception.SystemException {
208         getService()
209             .addCategoryResources(category, communityPermissions,
210             guestPermissions);
211     }
212 
213     public static void deleteCategories(long groupId)
214         throws com.liferay.portal.kernel.exception.PortalException,
215             com.liferay.portal.kernel.exception.SystemException {
216         getService().deleteCategories(groupId);
217     }
218 
219     public static void deleteCategory(long categoryId)
220         throws com.liferay.portal.kernel.exception.PortalException,
221             com.liferay.portal.kernel.exception.SystemException {
222         getService().deleteCategory(categoryId);
223     }
224 
225     public static void deleteCategory(
226         com.liferay.portlet.messageboards.model.MBCategory category)
227         throws com.liferay.portal.kernel.exception.PortalException,
228             com.liferay.portal.kernel.exception.SystemException {
229         getService().deleteCategory(category);
230     }
231 
232     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
233         long groupId)
234         throws com.liferay.portal.kernel.exception.SystemException {
235         return getService().getCategories(groupId);
236     }
237 
238     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
239         long groupId, long parentCategoryId)
240         throws com.liferay.portal.kernel.exception.SystemException {
241         return getService().getCategories(groupId, parentCategoryId);
242     }
243 
244     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
245         long groupId, long parentCategoryId, int start, int end)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getService().getCategories(groupId, parentCategoryId, start, end);
248     }
249 
250     public static int getCategoriesCount(long groupId)
251         throws com.liferay.portal.kernel.exception.SystemException {
252         return getService().getCategoriesCount(groupId);
253     }
254 
255     public static int getCategoriesCount(long groupId, long parentCategoryId)
256         throws com.liferay.portal.kernel.exception.SystemException {
257         return getService().getCategoriesCount(groupId, parentCategoryId);
258     }
259 
260     public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
261         long categoryId)
262         throws com.liferay.portal.kernel.exception.PortalException,
263             com.liferay.portal.kernel.exception.SystemException {
264         return getService().getCategory(categoryId);
265     }
266 
267     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCompanyCategories(
268         long companyId, int start, int end)
269         throws com.liferay.portal.kernel.exception.SystemException {
270         return getService().getCompanyCategories(companyId, start, end);
271     }
272 
273     public static int getCompanyCategoriesCount(long companyId)
274         throws com.liferay.portal.kernel.exception.SystemException {
275         return getService().getCompanyCategoriesCount(companyId);
276     }
277 
278     public static java.util.List<java.lang.Long> getSubcategoryIds(
279         java.util.List<java.lang.Long> categoryIds, long groupId,
280         long categoryId)
281         throws com.liferay.portal.kernel.exception.SystemException {
282         return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
283     }
284 
285     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
286         long groupId, long userId, int start, int end)
287         throws com.liferay.portal.kernel.exception.SystemException {
288         return getService().getSubscribedCategories(groupId, userId, start, end);
289     }
290 
291     public static int getSubscribedCategoriesCount(long groupId, long userId)
292         throws com.liferay.portal.kernel.exception.SystemException {
293         return getService().getSubscribedCategoriesCount(groupId, userId);
294     }
295 
296     public static com.liferay.portlet.messageboards.model.MBCategory getSystemCategory()
297         throws com.liferay.portal.kernel.exception.SystemException {
298         return getService().getSystemCategory();
299     }
300 
301     public static void subscribeCategory(long userId, long groupId,
302         long categoryId)
303         throws com.liferay.portal.kernel.exception.PortalException,
304             com.liferay.portal.kernel.exception.SystemException {
305         getService().subscribeCategory(userId, groupId, categoryId);
306     }
307 
308     public static void unsubscribeCategory(long userId, long groupId,
309         long categoryId)
310         throws com.liferay.portal.kernel.exception.PortalException,
311             com.liferay.portal.kernel.exception.SystemException {
312         getService().unsubscribeCategory(userId, groupId, categoryId);
313     }
314 
315     public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
316         long categoryId, long parentCategoryId, java.lang.String name,
317         java.lang.String description, java.lang.String emailAddress,
318         java.lang.String inProtocol, java.lang.String inServerName,
319         int inServerPort, boolean inUseSSL, java.lang.String inUserName,
320         java.lang.String inPassword, int inReadInterval,
321         java.lang.String outEmailAddress, boolean outCustom,
322         java.lang.String outServerName, int outServerPort, boolean outUseSSL,
323         java.lang.String outUserName, java.lang.String outPassword,
324         boolean mailingListActive, boolean mergeWithParentCategory,
325         com.liferay.portal.service.ServiceContext serviceContext)
326         throws com.liferay.portal.kernel.exception.PortalException,
327             com.liferay.portal.kernel.exception.SystemException {
328         return getService()
329                    .updateCategory(categoryId, parentCategoryId, name,
330             description, emailAddress, inProtocol, inServerName, inServerPort,
331             inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
332             outCustom, outServerName, outServerPort, outUseSSL, outUserName,
333             outPassword, mailingListActive, mergeWithParentCategory,
334             serviceContext);
335     }
336 
337     public static MBCategoryLocalService getService() {
338         if (_service == null) {
339             _service = (MBCategoryLocalService)PortalBeanLocatorUtil.locate(MBCategoryLocalService.class.getName());
340         }
341 
342         return _service;
343     }
344 
345     public void setService(MBCategoryLocalService service) {
346         _service = service;
347     }
348 
349     private static MBCategoryLocalService _service;
350 }