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      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
91          long categoryId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getMBCategory(categoryId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getMBCategories(start, end);
101     }
102 
103     public static int getMBCategoriesCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getMBCategoriesCount();
106     }
107 
108     public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
109         com.liferay.portlet.messageboards.model.MBCategory mbCategory)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateMBCategory(mbCategory);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
115         com.liferay.portlet.messageboards.model.MBCategory mbCategory,
116         boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getService().updateMBCategory(mbCategory, merge);
119     }
120 
121     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
122         long userId, long parentCategoryId, java.lang.String name,
123         java.lang.String description, java.lang.String emailAddress,
124         java.lang.String inProtocol, java.lang.String inServerName,
125         int inServerPort, boolean inUseSSL, java.lang.String inUserName,
126         java.lang.String inPassword, int inReadInterval,
127         java.lang.String outEmailAddress, boolean outCustom,
128         java.lang.String outServerName, int outServerPort, boolean outUseSSL,
129         java.lang.String outUserName, java.lang.String outPassword,
130         boolean mailingListActive,
131         com.liferay.portal.service.ServiceContext serviceContext)
132         throws com.liferay.portal.kernel.exception.PortalException,
133             com.liferay.portal.kernel.exception.SystemException {
134         return getService()
135                    .addCategory(userId, parentCategoryId, name, description,
136             emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
137             inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
138             outServerName, outServerPort, outUseSSL, outUserName, outPassword,
139             mailingListActive, serviceContext);
140     }
141 
142     public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
143         java.lang.String uuid, long userId, long parentCategoryId,
144         java.lang.String name, java.lang.String description,
145         java.lang.String emailAddress, java.lang.String inProtocol,
146         java.lang.String inServerName, int inServerPort, boolean inUseSSL,
147         java.lang.String inUserName, java.lang.String inPassword,
148         int inReadInterval, java.lang.String outEmailAddress,
149         boolean outCustom, java.lang.String outServerName, int outServerPort,
150         boolean outUseSSL, java.lang.String outUserName,
151         java.lang.String outPassword, boolean mailingListActive,
152         com.liferay.portal.service.ServiceContext serviceContext)
153         throws com.liferay.portal.kernel.exception.PortalException,
154             com.liferay.portal.kernel.exception.SystemException {
155         return getService()
156                    .addCategory(uuid, userId, parentCategoryId, name,
157             description, emailAddress, inProtocol, inServerName, inServerPort,
158             inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
159             outCustom, outServerName, outServerPort, outUseSSL, outUserName,
160             outPassword, mailingListActive, serviceContext);
161     }
162 
163     public static void addCategoryResources(long categoryId,
164         boolean addCommunityPermissions, boolean addGuestPermissions)
165         throws com.liferay.portal.kernel.exception.PortalException,
166             com.liferay.portal.kernel.exception.SystemException {
167         getService()
168             .addCategoryResources(categoryId, addCommunityPermissions,
169             addGuestPermissions);
170     }
171 
172     public static void addCategoryResources(long categoryId,
173         java.lang.String[] communityPermissions,
174         java.lang.String[] guestPermissions)
175         throws com.liferay.portal.kernel.exception.PortalException,
176             com.liferay.portal.kernel.exception.SystemException {
177         getService()
178             .addCategoryResources(categoryId, communityPermissions,
179             guestPermissions);
180     }
181 
182     public static void addCategoryResources(
183         com.liferay.portlet.messageboards.model.MBCategory category,
184         boolean addCommunityPermissions, boolean addGuestPermissions)
185         throws com.liferay.portal.kernel.exception.PortalException,
186             com.liferay.portal.kernel.exception.SystemException {
187         getService()
188             .addCategoryResources(category, addCommunityPermissions,
189             addGuestPermissions);
190     }
191 
192     public static void addCategoryResources(
193         com.liferay.portlet.messageboards.model.MBCategory category,
194         java.lang.String[] communityPermissions,
195         java.lang.String[] guestPermissions)
196         throws com.liferay.portal.kernel.exception.PortalException,
197             com.liferay.portal.kernel.exception.SystemException {
198         getService()
199             .addCategoryResources(category, communityPermissions,
200             guestPermissions);
201     }
202 
203     public static void deleteCategories(long groupId)
204         throws com.liferay.portal.kernel.exception.PortalException,
205             com.liferay.portal.kernel.exception.SystemException {
206         getService().deleteCategories(groupId);
207     }
208 
209     public static void deleteCategory(long categoryId)
210         throws com.liferay.portal.kernel.exception.PortalException,
211             com.liferay.portal.kernel.exception.SystemException {
212         getService().deleteCategory(categoryId);
213     }
214 
215     public static void deleteCategory(
216         com.liferay.portlet.messageboards.model.MBCategory category)
217         throws com.liferay.portal.kernel.exception.PortalException,
218             com.liferay.portal.kernel.exception.SystemException {
219         getService().deleteCategory(category);
220     }
221 
222     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
223         long groupId)
224         throws com.liferay.portal.kernel.exception.SystemException {
225         return getService().getCategories(groupId);
226     }
227 
228     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
229         long groupId, long parentCategoryId)
230         throws com.liferay.portal.kernel.exception.SystemException {
231         return getService().getCategories(groupId, parentCategoryId);
232     }
233 
234     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
235         long groupId, long parentCategoryId, int start, int end)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getService().getCategories(groupId, parentCategoryId, start, end);
238     }
239 
240     public static int getCategoriesCount(long groupId)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getService().getCategoriesCount(groupId);
243     }
244 
245     public static int getCategoriesCount(long groupId, long parentCategoryId)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getService().getCategoriesCount(groupId, parentCategoryId);
248     }
249 
250     public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
251         long categoryId)
252         throws com.liferay.portal.kernel.exception.PortalException,
253             com.liferay.portal.kernel.exception.SystemException {
254         return getService().getCategory(categoryId);
255     }
256 
257     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCompanyCategories(
258         long companyId, int start, int end)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         return getService().getCompanyCategories(companyId, start, end);
261     }
262 
263     public static int getCompanyCategoriesCount(long companyId)
264         throws com.liferay.portal.kernel.exception.SystemException {
265         return getService().getCompanyCategoriesCount(companyId);
266     }
267 
268     public static void getSubcategoryIds(java.util.List<Long> categoryIds,
269         long groupId, long categoryId)
270         throws com.liferay.portal.kernel.exception.SystemException {
271         getService().getSubcategoryIds(categoryIds, groupId, categoryId);
272     }
273 
274     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
275         long groupId, long userId, int start, int end)
276         throws com.liferay.portal.kernel.exception.SystemException {
277         return getService().getSubscribedCategories(groupId, userId, start, end);
278     }
279 
280     public static int getSubscribedCategoriesCount(long groupId, long userId)
281         throws com.liferay.portal.kernel.exception.SystemException {
282         return getService().getSubscribedCategoriesCount(groupId, userId);
283     }
284 
285     public static com.liferay.portlet.messageboards.model.MBCategory getSystemCategory()
286         throws com.liferay.portal.kernel.exception.SystemException {
287         return getService().getSystemCategory();
288     }
289 
290     public static void subscribeCategory(long userId, long groupId,
291         long categoryId)
292         throws com.liferay.portal.kernel.exception.PortalException,
293             com.liferay.portal.kernel.exception.SystemException {
294         getService().subscribeCategory(userId, groupId, categoryId);
295     }
296 
297     public static void unsubscribeCategory(long userId, long groupId,
298         long categoryId)
299         throws com.liferay.portal.kernel.exception.PortalException,
300             com.liferay.portal.kernel.exception.SystemException {
301         getService().unsubscribeCategory(userId, groupId, categoryId);
302     }
303 
304     public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
305         long categoryId, long parentCategoryId, java.lang.String name,
306         java.lang.String description, java.lang.String emailAddress,
307         java.lang.String inProtocol, java.lang.String inServerName,
308         int inServerPort, boolean inUseSSL, java.lang.String inUserName,
309         java.lang.String inPassword, int inReadInterval,
310         java.lang.String outEmailAddress, boolean outCustom,
311         java.lang.String outServerName, int outServerPort, boolean outUseSSL,
312         java.lang.String outUserName, java.lang.String outPassword,
313         boolean mailingListActive, boolean mergeWithParentCategory,
314         com.liferay.portal.service.ServiceContext serviceContext)
315         throws com.liferay.portal.kernel.exception.PortalException,
316             com.liferay.portal.kernel.exception.SystemException {
317         return getService()
318                    .updateCategory(categoryId, parentCategoryId, name,
319             description, emailAddress, inProtocol, inServerName, inServerPort,
320             inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
321             outCustom, outServerName, outServerPort, outUseSSL, outUserName,
322             outPassword, mailingListActive, mergeWithParentCategory,
323             serviceContext);
324     }
325 
326     public static MBCategoryLocalService getService() {
327         if (_service == null) {
328             _service = (MBCategoryLocalService)PortalBeanLocatorUtil.locate(MBCategoryLocalService.class.getName());
329         }
330 
331         return _service;
332     }
333 
334     public void setService(MBCategoryLocalService service) {
335         _service = service;
336     }
337 
338     private static MBCategoryLocalService _service;
339 }