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