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