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="MBCategoryServiceUtil.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 MBCategoryService} 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       MBCategoryService
37   * @generated
38   */
39  public class MBCategoryServiceUtil {
40      public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
41          long parentCategoryId, java.lang.String name,
42          java.lang.String description, java.lang.String emailAddress,
43          java.lang.String inProtocol, java.lang.String inServerName,
44          int inServerPort, boolean inUseSSL, java.lang.String inUserName,
45          java.lang.String inPassword, int inReadInterval,
46          java.lang.String outEmailAddress, boolean outCustom,
47          java.lang.String outServerName, int outServerPort, boolean outUseSSL,
48          java.lang.String outUserName, java.lang.String outPassword,
49          boolean mailingListActive,
50          com.liferay.portal.service.ServiceContext serviceContext)
51          throws com.liferay.portal.kernel.exception.PortalException,
52              com.liferay.portal.kernel.exception.SystemException {
53          return getService()
54                     .addCategory(parentCategoryId, name, description,
55              emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
56              inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
57              outServerName, outServerPort, outUseSSL, outUserName, outPassword,
58              mailingListActive, serviceContext);
59      }
60  
61      public static void deleteCategory(long groupId, long categoryId)
62          throws com.liferay.portal.kernel.exception.PortalException,
63              com.liferay.portal.kernel.exception.SystemException {
64          getService().deleteCategory(groupId, categoryId);
65      }
66  
67      public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
68          long categoryId)
69          throws com.liferay.portal.kernel.exception.PortalException,
70              com.liferay.portal.kernel.exception.SystemException {
71          return getService().getCategory(categoryId);
72      }
73  
74      public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
75          long groupId, long parentCategoryId, int start, int end)
76          throws com.liferay.portal.kernel.exception.PortalException,
77              com.liferay.portal.kernel.exception.SystemException {
78          return getService().getCategories(groupId, parentCategoryId, start, end);
79      }
80  
81      public static int getCategoriesCount(long groupId, long parentCategoryId)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService().getCategoriesCount(groupId, parentCategoryId);
84      }
85  
86      public static void subscribeCategory(long groupId, long categoryId)
87          throws com.liferay.portal.kernel.exception.PortalException,
88              com.liferay.portal.kernel.exception.SystemException {
89          getService().subscribeCategory(groupId, categoryId);
90      }
91  
92      public static void unsubscribeCategory(long groupId, long categoryId)
93          throws com.liferay.portal.kernel.exception.PortalException,
94              com.liferay.portal.kernel.exception.SystemException {
95          getService().unsubscribeCategory(groupId, categoryId);
96      }
97  
98      public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
99          long categoryId, long parentCategoryId, java.lang.String name,
100         java.lang.String description, java.lang.String emailAddress,
101         java.lang.String inProtocol, java.lang.String inServerName,
102         int inServerPort, boolean inUseSSL, java.lang.String inUserName,
103         java.lang.String inPassword, int inReadInterval,
104         java.lang.String outEmailAddress, boolean outCustom,
105         java.lang.String outServerName, int outServerPort, boolean outUseSSL,
106         java.lang.String outUserName, java.lang.String outPassword,
107         boolean mailingListActive, boolean mergeWithParentCategory,
108         com.liferay.portal.service.ServiceContext serviceContext)
109         throws com.liferay.portal.kernel.exception.PortalException,
110             com.liferay.portal.kernel.exception.SystemException {
111         return getService()
112                    .updateCategory(categoryId, parentCategoryId, name,
113             description, emailAddress, inProtocol, inServerName, inServerPort,
114             inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
115             outCustom, outServerName, outServerPort, outUseSSL, outUserName,
116             outPassword, mailingListActive, mergeWithParentCategory,
117             serviceContext);
118     }
119 
120     public static MBCategoryService getService() {
121         if (_service == null) {
122             _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
123         }
124 
125         return _service;
126     }
127 
128     public void setService(MBCategoryService service) {
129         _service = service;
130     }
131 
132     private static MBCategoryService _service;
133 }