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