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