001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for MBCategory. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBCategoryServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see MBCategoryService
032     * @see com.liferay.portlet.messageboards.service.base.MBCategoryServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBCategoryServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBCategoryServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBCategoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
044                    long parentCategoryId, java.lang.String name,
045                    java.lang.String description, java.lang.String displayStyle,
046                    java.lang.String emailAddress, java.lang.String inProtocol,
047                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
048                    java.lang.String inUserName, java.lang.String inPassword,
049                    int inReadInterval, java.lang.String outEmailAddress,
050                    boolean outCustom, java.lang.String outServerName, int outServerPort,
051                    boolean outUseSSL, java.lang.String outUserName,
052                    java.lang.String outPassword, boolean mailingListActive,
053                    boolean allowAnonymousEmail,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException {
056                    return getService()
057                                       .addCategory(parentCategoryId, name, description,
058                            displayStyle, emailAddress, inProtocol, inServerName, inServerPort,
059                            inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
060                            outCustom, outServerName, outServerPort, outUseSSL, outUserName,
061                            outPassword, mailingListActive, allowAnonymousEmail, serviceContext);
062            }
063    
064            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
065                    long userId, long parentCategoryId, java.lang.String name,
066                    java.lang.String description,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    return getService()
070                                       .addCategory(userId, parentCategoryId, name, description,
071                            serviceContext);
072            }
073    
074            public static void deleteCategory(long categoryId,
075                    boolean includeTrashedEntries)
076                    throws com.liferay.portal.kernel.exception.PortalException {
077                    getService().deleteCategory(categoryId, includeTrashedEntries);
078            }
079    
080            public static void deleteCategory(long groupId, long categoryId)
081                    throws com.liferay.portal.kernel.exception.PortalException {
082                    getService().deleteCategory(groupId, categoryId);
083            }
084    
085            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
086                    long groupId) {
087                    return getService().getCategories(groupId);
088            }
089    
090            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
091                    long groupId, long excludedCategoryId, long parentCategoryId,
092                    int status, int start, int end) {
093                    return getService()
094                                       .getCategories(groupId, excludedCategoryId,
095                            parentCategoryId, status, start, end);
096            }
097    
098            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
099                    long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
100                    int status, int start, int end) {
101                    return getService()
102                                       .getCategories(groupId, excludedCategoryIds,
103                            parentCategoryIds, status, start, end);
104            }
105    
106            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
107                    long groupId, long parentCategoryId, int start, int end) {
108                    return getService().getCategories(groupId, parentCategoryId, start, end);
109            }
110    
111            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
112                    long groupId, long parentCategoryId, int status, int start, int end) {
113                    return getService()
114                                       .getCategories(groupId, parentCategoryId, status, start, end);
115            }
116    
117            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
118                    long groupId, long[] parentCategoryIds, int start, int end) {
119                    return getService().getCategories(groupId, parentCategoryIds, start, end);
120            }
121    
122            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
123                    long groupId, long[] parentCategoryIds, int status, int start, int end) {
124                    return getService()
125                                       .getCategories(groupId, parentCategoryIds, status, start, end);
126            }
127    
128            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
129                    long groupId, int status) {
130                    return getService().getCategories(groupId, status);
131            }
132    
133            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
134                    long groupId, long categoryId) {
135                    return getService().getCategoriesAndThreads(groupId, categoryId);
136            }
137    
138            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
139                    long groupId, long categoryId, int status) {
140                    return getService().getCategoriesAndThreads(groupId, categoryId, status);
141            }
142    
143            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
144                    long groupId, long categoryId, int status, int start, int end) {
145                    return getService()
146                                       .getCategoriesAndThreads(groupId, categoryId, status, start,
147                            end);
148            }
149    
150            public static int getCategoriesAndThreadsCount(long groupId, long categoryId) {
151                    return getService().getCategoriesAndThreadsCount(groupId, categoryId);
152            }
153    
154            public static int getCategoriesAndThreadsCount(long groupId,
155                    long categoryId, int status) {
156                    return getService()
157                                       .getCategoriesAndThreadsCount(groupId, categoryId, status);
158            }
159    
160            public static int getCategoriesCount(long groupId, long excludedCategoryId,
161                    long parentCategoryId, int status) {
162                    return getService()
163                                       .getCategoriesCount(groupId, excludedCategoryId,
164                            parentCategoryId, status);
165            }
166    
167            public static int getCategoriesCount(long groupId,
168                    long[] excludedCategoryIds, long[] parentCategoryIds, int status) {
169                    return getService()
170                                       .getCategoriesCount(groupId, excludedCategoryIds,
171                            parentCategoryIds, status);
172            }
173    
174            public static int getCategoriesCount(long groupId, long parentCategoryId) {
175                    return getService().getCategoriesCount(groupId, parentCategoryId);
176            }
177    
178            public static int getCategoriesCount(long groupId, long parentCategoryId,
179                    int status) {
180                    return getService().getCategoriesCount(groupId, parentCategoryId, status);
181            }
182    
183            public static int getCategoriesCount(long groupId, long[] parentCategoryIds) {
184                    return getService().getCategoriesCount(groupId, parentCategoryIds);
185            }
186    
187            public static int getCategoriesCount(long groupId,
188                    long[] parentCategoryIds, int status) {
189                    return getService()
190                                       .getCategoriesCount(groupId, parentCategoryIds, status);
191            }
192    
193            public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
194                    long categoryId)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    return getService().getCategory(categoryId);
197            }
198    
199            public static long[] getCategoryIds(long groupId, long categoryId) {
200                    return getService().getCategoryIds(groupId, categoryId);
201            }
202    
203            /**
204            * Returns the OSGi service identifier.
205            *
206            * @return the OSGi service identifier
207            */
208            public static java.lang.String getOSGiServiceIdentifier() {
209                    return getService().getOSGiServiceIdentifier();
210            }
211    
212            public static java.util.List<java.lang.Long> getSubcategoryIds(
213                    java.util.List<java.lang.Long> categoryIds, long groupId,
214                    long categoryId) {
215                    return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
216            }
217    
218            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
219                    long groupId, long userId, int start, int end) {
220                    return getService().getSubscribedCategories(groupId, userId, start, end);
221            }
222    
223            public static int getSubscribedCategoriesCount(long groupId, long userId) {
224                    return getService().getSubscribedCategoriesCount(groupId, userId);
225            }
226    
227            public static com.liferay.portlet.messageboards.model.MBCategory moveCategory(
228                    long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
229                    throws com.liferay.portal.kernel.exception.PortalException {
230                    return getService()
231                                       .moveCategory(categoryId, parentCategoryId,
232                            mergeWithParentCategory);
233            }
234    
235            public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
236                    long categoryId, long newCategoryId)
237                    throws com.liferay.portal.kernel.exception.PortalException {
238                    return getService().moveCategoryFromTrash(categoryId, newCategoryId);
239            }
240    
241            public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
242                    long categoryId)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService().moveCategoryToTrash(categoryId);
245            }
246    
247            public static void restoreCategoryFromTrash(long categoryId)
248                    throws com.liferay.portal.kernel.exception.PortalException {
249                    getService().restoreCategoryFromTrash(categoryId);
250            }
251    
252            public static void subscribeCategory(long groupId, long categoryId)
253                    throws com.liferay.portal.kernel.exception.PortalException {
254                    getService().subscribeCategory(groupId, categoryId);
255            }
256    
257            public static void unsubscribeCategory(long groupId, long categoryId)
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    getService().unsubscribeCategory(groupId, categoryId);
260            }
261    
262            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
263                    long categoryId, long parentCategoryId, java.lang.String name,
264                    java.lang.String description, java.lang.String displayStyle,
265                    java.lang.String emailAddress, java.lang.String inProtocol,
266                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
267                    java.lang.String inUserName, java.lang.String inPassword,
268                    int inReadInterval, java.lang.String outEmailAddress,
269                    boolean outCustom, java.lang.String outServerName, int outServerPort,
270                    boolean outUseSSL, java.lang.String outUserName,
271                    java.lang.String outPassword, boolean mailingListActive,
272                    boolean allowAnonymousEmail, boolean mergeWithParentCategory,
273                    com.liferay.portal.service.ServiceContext serviceContext)
274                    throws com.liferay.portal.kernel.exception.PortalException {
275                    return getService()
276                                       .updateCategory(categoryId, parentCategoryId, name,
277                            description, displayStyle, emailAddress, inProtocol, inServerName,
278                            inServerPort, inUseSSL, inUserName, inPassword, inReadInterval,
279                            outEmailAddress, outCustom, outServerName, outServerPort,
280                            outUseSSL, outUserName, outPassword, mailingListActive,
281                            allowAnonymousEmail, mergeWithParentCategory, serviceContext);
282            }
283    
284            public static MBCategoryService getService() {
285                    if (_service == null) {
286                            _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
287    
288                            ReferenceRegistry.registerReference(MBCategoryServiceUtil.class,
289                                    "_service");
290                    }
291    
292                    return _service;
293            }
294    
295            private static MBCategoryService _service;
296    }