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