001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link MBCategoryLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       MBCategoryLocalService
030     * @generated
031     */
032    public class MBCategoryLocalServiceUtil {
033            public static com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
034                    com.liferay.portlet.messageboards.model.MBCategory mbCategory)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addMBCategory(mbCategory);
037            }
038    
039            public static com.liferay.portlet.messageboards.model.MBCategory createMBCategory(
040                    long categoryId) {
041                    return getService().createMBCategory(categoryId);
042            }
043    
044            public static void deleteMBCategory(long categoryId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteMBCategory(categoryId);
048            }
049    
050            public static void deleteMBCategory(
051                    com.liferay.portlet.messageboards.model.MBCategory mbCategory)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteMBCategory(mbCategory);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
087                    long categoryId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getMBCategory(categoryId);
091            }
092    
093            public static com.liferay.portlet.messageboards.model.MBCategory getMBCategoryByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getMBCategoryByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getMBCategories(start, end);
104            }
105    
106            public static int getMBCategoriesCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getMBCategoriesCount();
109            }
110    
111            public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
112                    com.liferay.portlet.messageboards.model.MBCategory mbCategory)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateMBCategory(mbCategory);
115            }
116    
117            public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
118                    com.liferay.portlet.messageboards.model.MBCategory mbCategory,
119                    boolean merge)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().updateMBCategory(mbCategory, merge);
122            }
123    
124            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
125                    long userId, long parentCategoryId, java.lang.String name,
126                    java.lang.String description, java.lang.String emailAddress,
127                    java.lang.String inProtocol, java.lang.String inServerName,
128                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
129                    java.lang.String inPassword, int inReadInterval,
130                    java.lang.String outEmailAddress, boolean outCustom,
131                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
132                    java.lang.String outUserName, java.lang.String outPassword,
133                    boolean mailingListActive,
134                    com.liferay.portal.service.ServiceContext serviceContext)
135                    throws com.liferay.portal.kernel.exception.PortalException,
136                            com.liferay.portal.kernel.exception.SystemException {
137                    return getService()
138                                       .addCategory(userId, parentCategoryId, name, description,
139                            emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
140                            inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
141                            outServerName, outServerPort, outUseSSL, outUserName, outPassword,
142                            mailingListActive, serviceContext);
143            }
144    
145            public static void addCategoryResources(long categoryId,
146                    boolean addCommunityPermissions, boolean addGuestPermissions)
147                    throws com.liferay.portal.kernel.exception.PortalException,
148                            com.liferay.portal.kernel.exception.SystemException {
149                    getService()
150                            .addCategoryResources(categoryId, addCommunityPermissions,
151                            addGuestPermissions);
152            }
153    
154            public static void addCategoryResources(long categoryId,
155                    java.lang.String[] communityPermissions,
156                    java.lang.String[] guestPermissions)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    getService()
160                            .addCategoryResources(categoryId, communityPermissions,
161                            guestPermissions);
162            }
163    
164            public static void addCategoryResources(
165                    com.liferay.portlet.messageboards.model.MBCategory category,
166                    boolean addCommunityPermissions, boolean addGuestPermissions)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    getService()
170                            .addCategoryResources(category, addCommunityPermissions,
171                            addGuestPermissions);
172            }
173    
174            public static void addCategoryResources(
175                    com.liferay.portlet.messageboards.model.MBCategory category,
176                    java.lang.String[] communityPermissions,
177                    java.lang.String[] guestPermissions)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    getService()
181                            .addCategoryResources(category, communityPermissions,
182                            guestPermissions);
183            }
184    
185            public static void deleteCategories(long groupId)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    getService().deleteCategories(groupId);
189            }
190    
191            public static void deleteCategory(long categoryId)
192                    throws com.liferay.portal.kernel.exception.PortalException,
193                            com.liferay.portal.kernel.exception.SystemException {
194                    getService().deleteCategory(categoryId);
195            }
196    
197            public static void deleteCategory(
198                    com.liferay.portlet.messageboards.model.MBCategory category)
199                    throws com.liferay.portal.kernel.exception.PortalException,
200                            com.liferay.portal.kernel.exception.SystemException {
201                    getService().deleteCategory(category);
202            }
203    
204            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
205                    long groupId)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getService().getCategories(groupId);
208            }
209    
210            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
211                    long groupId, long parentCategoryId, int start, int end)
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    return getService().getCategories(groupId, parentCategoryId, start, end);
214            }
215    
216            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
217                    long groupId, long[] parentCategoryIds, int start, int end)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getService().getCategories(groupId, parentCategoryIds, start, end);
220            }
221    
222            public static int getCategoriesCount(long groupId)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getService().getCategoriesCount(groupId);
225            }
226    
227            public static int getCategoriesCount(long groupId, long parentCategoryId)
228                    throws com.liferay.portal.kernel.exception.SystemException {
229                    return getService().getCategoriesCount(groupId, parentCategoryId);
230            }
231    
232            public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getService().getCategoriesCount(groupId, parentCategoryIds);
235            }
236    
237            public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
238                    long categoryId)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    return getService().getCategory(categoryId);
242            }
243    
244            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCompanyCategories(
245                    long companyId, int start, int end)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getService().getCompanyCategories(companyId, start, end);
248            }
249    
250            public static int getCompanyCategoriesCount(long companyId)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getService().getCompanyCategoriesCount(companyId);
253            }
254    
255            public static java.util.List<java.lang.Long> getSubcategoryIds(
256                    java.util.List<java.lang.Long> categoryIds, long groupId,
257                    long categoryId)
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
260            }
261    
262            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
263                    long groupId, long userId, int start, int end)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getService().getSubscribedCategories(groupId, userId, start, end);
266            }
267    
268            public static int getSubscribedCategoriesCount(long groupId, long userId)
269                    throws com.liferay.portal.kernel.exception.SystemException {
270                    return getService().getSubscribedCategoriesCount(groupId, userId);
271            }
272    
273            public static void subscribeCategory(long userId, long groupId,
274                    long categoryId)
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    getService().subscribeCategory(userId, groupId, categoryId);
278            }
279    
280            public static void unsubscribeCategory(long userId, long groupId,
281                    long categoryId)
282                    throws com.liferay.portal.kernel.exception.PortalException,
283                            com.liferay.portal.kernel.exception.SystemException {
284                    getService().unsubscribeCategory(userId, groupId, categoryId);
285            }
286    
287            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
288                    long categoryId, long parentCategoryId, java.lang.String name,
289                    java.lang.String description, java.lang.String emailAddress,
290                    java.lang.String inProtocol, java.lang.String inServerName,
291                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
292                    java.lang.String inPassword, int inReadInterval,
293                    java.lang.String outEmailAddress, boolean outCustom,
294                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
295                    java.lang.String outUserName, java.lang.String outPassword,
296                    boolean mailingListActive, boolean mergeWithParentCategory,
297                    com.liferay.portal.service.ServiceContext serviceContext)
298                    throws com.liferay.portal.kernel.exception.PortalException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    return getService()
301                                       .updateCategory(categoryId, parentCategoryId, name,
302                            description, emailAddress, inProtocol, inServerName, inServerPort,
303                            inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
304                            outCustom, outServerName, outServerPort, outUseSSL, outUserName,
305                            outPassword, mailingListActive, mergeWithParentCategory,
306                            serviceContext);
307            }
308    
309            public static MBCategoryLocalService getService() {
310                    if (_service == null) {
311                            _service = (MBCategoryLocalService)PortalBeanLocatorUtil.locate(MBCategoryLocalService.class.getName());
312                    }
313    
314                    return _service;
315            }
316    
317            public void setService(MBCategoryLocalService service) {
318                    _service = service;
319            }
320    
321            private static MBCategoryLocalService _service;
322    }