1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.PortalException,
52              com.liferay.portal.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 categoryId)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException {
64          getService().deleteCategory(categoryId);
65      }
66  
67      public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
68          long groupId, long parentCategoryId, int start, int end)
69          throws com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException {
71          return getService().getCategories(groupId, parentCategoryId, start, end);
72      }
73  
74      public static int getCategoriesCount(long groupId, long parentCategoryId)
75          throws com.liferay.portal.SystemException {
76          return getService().getCategoriesCount(groupId, parentCategoryId);
77      }
78  
79      public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
80          long categoryId)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException {
83          return getService().getCategory(categoryId);
84      }
85  
86      public static void subscribeCategory(long categoryId)
87          throws com.liferay.portal.PortalException,
88              com.liferay.portal.SystemException {
89          getService().subscribeCategory(categoryId);
90      }
91  
92      public static void unsubscribeCategory(long categoryId)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException {
95          getService().unsubscribeCategory(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         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException {
110         return getService()
111                    .updateCategory(categoryId, parentCategoryId, name,
112             description, emailAddress, inProtocol, inServerName, inServerPort,
113             inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
114             outCustom, outServerName, outServerPort, outUseSSL, outUserName,
115             outPassword, mailingListActive, mergeWithParentCategory);
116     }
117 
118     public static MBCategoryService getService() {
119         if (_service == null) {
120             _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
121         }
122 
123         return _service;
124     }
125 
126     public void setService(MBCategoryService service) {
127         _service = service;
128     }
129 
130     private static MBCategoryService _service;
131 }