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.message.boards.kernel.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.message.boards.kernel.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.kernel.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.message.boards.kernel.model.MBCategory addCategory(
065                    long userId, long parentCategoryId, java.lang.String name,
066                    java.lang.String description,
067                    com.liferay.portal.kernel.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 com.liferay.message.boards.kernel.model.MBCategory getCategory(
075                    long categoryId)
076                    throws com.liferay.portal.kernel.exception.PortalException {
077                    return getService().getCategory(categoryId);
078            }
079    
080            public static com.liferay.message.boards.kernel.model.MBCategory moveCategory(
081                    long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
082                    throws com.liferay.portal.kernel.exception.PortalException {
083                    return getService()
084                                       .moveCategory(categoryId, parentCategoryId,
085                            mergeWithParentCategory);
086            }
087    
088            public static com.liferay.message.boards.kernel.model.MBCategory moveCategoryFromTrash(
089                    long categoryId, long newCategoryId)
090                    throws com.liferay.portal.kernel.exception.PortalException {
091                    return getService().moveCategoryFromTrash(categoryId, newCategoryId);
092            }
093    
094            public static com.liferay.message.boards.kernel.model.MBCategory moveCategoryToTrash(
095                    long categoryId)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService().moveCategoryToTrash(categoryId);
098            }
099    
100            public static com.liferay.message.boards.kernel.model.MBCategory updateCategory(
101                    long categoryId, long parentCategoryId, java.lang.String name,
102                    java.lang.String description, java.lang.String displayStyle,
103                    java.lang.String emailAddress, java.lang.String inProtocol,
104                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
105                    java.lang.String inUserName, java.lang.String inPassword,
106                    int inReadInterval, java.lang.String outEmailAddress,
107                    boolean outCustom, java.lang.String outServerName, int outServerPort,
108                    boolean outUseSSL, java.lang.String outUserName,
109                    java.lang.String outPassword, boolean mailingListActive,
110                    boolean allowAnonymousEmail, boolean mergeWithParentCategory,
111                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    return getService()
114                                       .updateCategory(categoryId, parentCategoryId, name,
115                            description, displayStyle, emailAddress, inProtocol, inServerName,
116                            inServerPort, inUseSSL, inUserName, inPassword, inReadInterval,
117                            outEmailAddress, outCustom, outServerName, outServerPort,
118                            outUseSSL, outUserName, outPassword, mailingListActive,
119                            allowAnonymousEmail, mergeWithParentCategory, serviceContext);
120            }
121    
122            public static int getCategoriesAndThreadsCount(long groupId, long categoryId) {
123                    return getService().getCategoriesAndThreadsCount(groupId, categoryId);
124            }
125    
126            public static int getCategoriesAndThreadsCount(long groupId,
127                    long categoryId, int status) {
128                    return getService()
129                                       .getCategoriesAndThreadsCount(groupId, categoryId, status);
130            }
131    
132            public static int getCategoriesCount(long groupId, long excludedCategoryId,
133                    long parentCategoryId, int status) {
134                    return getService()
135                                       .getCategoriesCount(groupId, excludedCategoryId,
136                            parentCategoryId, status);
137            }
138    
139            public static int getCategoriesCount(long groupId, long parentCategoryId) {
140                    return getService().getCategoriesCount(groupId, parentCategoryId);
141            }
142    
143            public static int getCategoriesCount(long groupId, long parentCategoryId,
144                    int status) {
145                    return getService().getCategoriesCount(groupId, parentCategoryId, status);
146            }
147    
148            public static int getCategoriesCount(long groupId,
149                    long[] excludedCategoryIds, long[] parentCategoryIds, int status) {
150                    return getService()
151                                       .getCategoriesCount(groupId, excludedCategoryIds,
152                            parentCategoryIds, status);
153            }
154    
155            public static int getCategoriesCount(long groupId, long[] parentCategoryIds) {
156                    return getService().getCategoriesCount(groupId, parentCategoryIds);
157            }
158    
159            public static int getCategoriesCount(long groupId,
160                    long[] parentCategoryIds, int status) {
161                    return getService()
162                                       .getCategoriesCount(groupId, parentCategoryIds, status);
163            }
164    
165            public static int getSubscribedCategoriesCount(long groupId, long userId) {
166                    return getService().getSubscribedCategoriesCount(groupId, userId);
167            }
168    
169            /**
170            * Returns the OSGi service identifier.
171            *
172            * @return the OSGi service identifier
173            */
174            public static java.lang.String getOSGiServiceIdentifier() {
175                    return getService().getOSGiServiceIdentifier();
176            }
177    
178            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
179                    long groupId) {
180                    return getService().getCategories(groupId);
181            }
182    
183            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
184                    long groupId, int status) {
185                    return getService().getCategories(groupId, status);
186            }
187    
188            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
189                    long groupId, long excludedCategoryId, long parentCategoryId,
190                    int status, int start, int end) {
191                    return getService()
192                                       .getCategories(groupId, excludedCategoryId,
193                            parentCategoryId, status, start, end);
194            }
195    
196            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
197                    long groupId, long parentCategoryId, int start, int end) {
198                    return getService().getCategories(groupId, parentCategoryId, start, end);
199            }
200    
201            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
202                    long groupId, long parentCategoryId, int status, int start, int end) {
203                    return getService()
204                                       .getCategories(groupId, parentCategoryId, status, start, end);
205            }
206    
207            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
208                    long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
209                    int status, int start, int end) {
210                    return getService()
211                                       .getCategories(groupId, excludedCategoryIds,
212                            parentCategoryIds, status, start, end);
213            }
214    
215            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
216                    long groupId, long[] parentCategoryIds, int start, int end) {
217                    return getService().getCategories(groupId, parentCategoryIds, start, end);
218            }
219    
220            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getCategories(
221                    long groupId, long[] parentCategoryIds, int status, int start, int end) {
222                    return getService()
223                                       .getCategories(groupId, parentCategoryIds, status, start, end);
224            }
225    
226            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
227                    long groupId, long categoryId) {
228                    return getService().getCategoriesAndThreads(groupId, categoryId);
229            }
230    
231            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
232                    long groupId, long categoryId, int status) {
233                    return getService().getCategoriesAndThreads(groupId, categoryId, status);
234            }
235    
236            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
237                    long groupId, long categoryId, int status, int start, int end) {
238                    return getService()
239                                       .getCategoriesAndThreads(groupId, categoryId, status, start,
240                            end);
241            }
242    
243            public static java.util.List<java.lang.Long> getSubcategoryIds(
244                    java.util.List<java.lang.Long> categoryIds, long groupId,
245                    long categoryId) {
246                    return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
247            }
248    
249            public static java.util.List<com.liferay.message.boards.kernel.model.MBCategory> getSubscribedCategories(
250                    long groupId, long userId, int start, int end) {
251                    return getService().getSubscribedCategories(groupId, userId, start, end);
252            }
253    
254            public static long[] getCategoryIds(long groupId, long categoryId) {
255                    return getService().getCategoryIds(groupId, categoryId);
256            }
257    
258            public static void deleteCategory(long categoryId,
259                    boolean includeTrashedEntries)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    getService().deleteCategory(categoryId, includeTrashedEntries);
262            }
263    
264            public static void deleteCategory(long groupId, long categoryId)
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    getService().deleteCategory(groupId, categoryId);
267            }
268    
269            public static void restoreCategoryFromTrash(long categoryId)
270                    throws com.liferay.portal.kernel.exception.PortalException {
271                    getService().restoreCategoryFromTrash(categoryId);
272            }
273    
274            public static void subscribeCategory(long groupId, long categoryId)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    getService().subscribeCategory(groupId, categoryId);
277            }
278    
279            public static void unsubscribeCategory(long groupId, long categoryId)
280                    throws com.liferay.portal.kernel.exception.PortalException {
281                    getService().unsubscribeCategory(groupId, categoryId);
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    }