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     * 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 parentCategoryId, java.lang.String name,
060                    java.lang.String description, java.lang.String displayStyle,
061                    java.lang.String emailAddress, java.lang.String inProtocol,
062                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
063                    java.lang.String inUserName, java.lang.String inPassword,
064                    int inReadInterval, java.lang.String outEmailAddress,
065                    boolean outCustom, java.lang.String outServerName, int outServerPort,
066                    boolean outUseSSL, java.lang.String outUserName,
067                    java.lang.String outPassword, boolean mailingListActive,
068                    boolean allowAnonymousEmail,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    return getService()
073                                       .addCategory(parentCategoryId, name, description,
074                            displayStyle, emailAddress, inProtocol, inServerName, inServerPort,
075                            inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
076                            outCustom, outServerName, outServerPort, outUseSSL, outUserName,
077                            outPassword, mailingListActive, allowAnonymousEmail, serviceContext);
078            }
079    
080            public static void deleteCategory(long groupId, long categoryId)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    getService().deleteCategory(groupId, categoryId);
084            }
085    
086            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
087                    long groupId)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getService().getCategories(groupId);
090            }
091    
092            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
093                    long groupId, long parentCategoryId, int start, int end)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getService().getCategories(groupId, parentCategoryId, start, end);
096            }
097    
098            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
099                    long groupId, long[] parentCategoryIds, int start, int end)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getCategories(groupId, parentCategoryIds, start, end);
102            }
103    
104            public static int getCategoriesCount(long groupId, long parentCategoryId)
105                    throws com.liferay.portal.kernel.exception.SystemException {
106                    return getService().getCategoriesCount(groupId, parentCategoryId);
107            }
108    
109            public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
110                    throws com.liferay.portal.kernel.exception.SystemException {
111                    return getService().getCategoriesCount(groupId, parentCategoryIds);
112            }
113    
114            public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
115                    long categoryId)
116                    throws com.liferay.portal.kernel.exception.PortalException,
117                            com.liferay.portal.kernel.exception.SystemException {
118                    return getService().getCategory(categoryId);
119            }
120    
121            public static long[] getCategoryIds(long groupId, long categoryId)
122                    throws com.liferay.portal.kernel.exception.SystemException {
123                    return getService().getCategoryIds(groupId, categoryId);
124            }
125    
126            public static java.util.List<java.lang.Long> getSubcategoryIds(
127                    java.util.List<java.lang.Long> categoryIds, long groupId,
128                    long categoryId)
129                    throws com.liferay.portal.kernel.exception.SystemException {
130                    return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
131            }
132    
133            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
134                    long groupId, long userId, int start, int end)
135                    throws com.liferay.portal.kernel.exception.SystemException {
136                    return getService().getSubscribedCategories(groupId, userId, start, end);
137            }
138    
139            public static int getSubscribedCategoriesCount(long groupId, long userId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getService().getSubscribedCategoriesCount(groupId, userId);
142            }
143    
144            public static void subscribeCategory(long groupId, long categoryId)
145                    throws com.liferay.portal.kernel.exception.PortalException,
146                            com.liferay.portal.kernel.exception.SystemException {
147                    getService().subscribeCategory(groupId, categoryId);
148            }
149    
150            public static void unsubscribeCategory(long groupId, long categoryId)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    getService().unsubscribeCategory(groupId, categoryId);
154            }
155    
156            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
157                    long categoryId, long parentCategoryId, java.lang.String name,
158                    java.lang.String description, java.lang.String displayStyle,
159                    java.lang.String emailAddress, java.lang.String inProtocol,
160                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
161                    java.lang.String inUserName, java.lang.String inPassword,
162                    int inReadInterval, java.lang.String outEmailAddress,
163                    boolean outCustom, java.lang.String outServerName, int outServerPort,
164                    boolean outUseSSL, java.lang.String outUserName,
165                    java.lang.String outPassword, boolean mailingListActive,
166                    boolean allowAnonymousEmail, boolean mergeWithParentCategory,
167                    com.liferay.portal.service.ServiceContext serviceContext)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService()
171                                       .updateCategory(categoryId, parentCategoryId, name,
172                            description, displayStyle, emailAddress, inProtocol, inServerName,
173                            inServerPort, inUseSSL, inUserName, inPassword, inReadInterval,
174                            outEmailAddress, outCustom, outServerName, outServerPort,
175                            outUseSSL, outUserName, outPassword, mailingListActive,
176                            allowAnonymousEmail, mergeWithParentCategory, serviceContext);
177            }
178    
179            public static MBCategoryService getService() {
180                    if (_service == null) {
181                            _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
182    
183                            ReferenceRegistry.registerReference(MBCategoryServiceUtil.class,
184                                    "_service");
185                    }
186    
187                    return _service;
188            }
189    
190            /**
191             * @deprecated
192             */
193            public void setService(MBCategoryService service) {
194            }
195    
196            private static MBCategoryService _service;
197    }