001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * 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.
023     *
024     * <p>
025     * 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.
026     * </p>
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            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
041                    long parentCategoryId, java.lang.String name,
042                    java.lang.String description, java.lang.String emailAddress,
043                    java.lang.String inProtocol, java.lang.String inServerName,
044                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
045                    java.lang.String inPassword, int inReadInterval,
046                    java.lang.String outEmailAddress, boolean outCustom,
047                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
048                    java.lang.String outUserName, java.lang.String outPassword,
049                    boolean allowAnonymous, boolean mailingListActive,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException,
052                            com.liferay.portal.kernel.exception.SystemException {
053                    return getService()
054                                       .addCategory(parentCategoryId, name, description,
055                            emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
056                            inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
057                            outServerName, outServerPort, outUseSSL, outUserName, outPassword,
058                            allowAnonymous, mailingListActive, serviceContext);
059            }
060    
061            /**
062            * @deprecated {@link #addCategory(long, String, String, String, String,
063            String, int, boolean, String, String, int, String, boolean,
064            String, int, boolean, String, String, boolean, boolean,
065            ServiceContext)}
066            */
067            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
068                    long parentCategoryId, java.lang.String name,
069                    java.lang.String description, java.lang.String emailAddress,
070                    java.lang.String inProtocol, java.lang.String inServerName,
071                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
072                    java.lang.String inPassword, int inReadInterval,
073                    java.lang.String outEmailAddress, boolean outCustom,
074                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
075                    java.lang.String outUserName, java.lang.String outPassword,
076                    boolean mailingListActive,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService()
081                                       .addCategory(parentCategoryId, name, description,
082                            emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
083                            inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
084                            outServerName, outServerPort, outUseSSL, outUserName, outPassword,
085                            mailingListActive, serviceContext);
086            }
087    
088            public static void deleteCategory(long groupId, long categoryId)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    getService().deleteCategory(groupId, categoryId);
092            }
093    
094            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
095                    long groupId)
096                    throws com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getCategories(groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
101                    long groupId, long parentCategoryId, int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getCategories(groupId, parentCategoryId, start, end);
104            }
105    
106            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
107                    long groupId, long[] parentCategoryIds, int start, int end)
108                    throws com.liferay.portal.kernel.exception.SystemException {
109                    return getService().getCategories(groupId, parentCategoryIds, start, end);
110            }
111    
112            public static int getCategoriesCount(long groupId, long parentCategoryId)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().getCategoriesCount(groupId, parentCategoryId);
115            }
116    
117            public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService().getCategoriesCount(groupId, parentCategoryIds);
120            }
121    
122            public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
123                    long categoryId)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getService().getCategory(categoryId);
127            }
128    
129            public static long[] getCategoryIds(long groupId, long categoryId)
130                    throws com.liferay.portal.kernel.exception.SystemException {
131                    return getService().getCategoryIds(groupId, categoryId);
132            }
133    
134            public static java.util.List<java.lang.Long> getSubcategoryIds(
135                    java.util.List<java.lang.Long> categoryIds, long groupId,
136                    long categoryId)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
139            }
140    
141            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
142                    long groupId, long userId, int start, int end)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getService().getSubscribedCategories(groupId, userId, start, end);
145            }
146    
147            public static int getSubscribedCategoriesCount(long groupId, long userId)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return getService().getSubscribedCategoriesCount(groupId, userId);
150            }
151    
152            public static void subscribeCategory(long groupId, long categoryId)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    getService().subscribeCategory(groupId, categoryId);
156            }
157    
158            public static void unsubscribeCategory(long groupId, long categoryId)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    getService().unsubscribeCategory(groupId, categoryId);
162            }
163    
164            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
165                    long categoryId, long parentCategoryId, java.lang.String name,
166                    java.lang.String description, java.lang.String emailAddress,
167                    java.lang.String inProtocol, java.lang.String inServerName,
168                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
169                    java.lang.String inPassword, int inReadInterval,
170                    java.lang.String outEmailAddress, boolean outCustom,
171                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
172                    java.lang.String outUserName, java.lang.String outPassword,
173                    boolean allowAnonymous, boolean mailingListActive,
174                    boolean mergeWithParentCategory,
175                    com.liferay.portal.service.ServiceContext serviceContext)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getService()
179                                       .updateCategory(categoryId, parentCategoryId, name,
180                            description, emailAddress, inProtocol, inServerName, inServerPort,
181                            inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
182                            outCustom, outServerName, outServerPort, outUseSSL, outUserName,
183                            outPassword, allowAnonymous, mailingListActive,
184                            mergeWithParentCategory, serviceContext);
185            }
186    
187            /**
188            * @deprecated {@link #updateCategory(long, long, String, String, String,
189            String, String, int, boolean, String, String, int, String,
190            boolean, String, int, boolean, String, String, boolean,
191            boolean, boolean, ServiceContext)}
192            */
193            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
194                    long categoryId, long parentCategoryId, java.lang.String name,
195                    java.lang.String description, java.lang.String emailAddress,
196                    java.lang.String inProtocol, java.lang.String inServerName,
197                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
198                    java.lang.String inPassword, int inReadInterval,
199                    java.lang.String outEmailAddress, boolean outCustom,
200                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
201                    java.lang.String outUserName, java.lang.String outPassword,
202                    boolean mailingListActive, boolean mergeWithParentCategory,
203                    com.liferay.portal.service.ServiceContext serviceContext)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService()
207                                       .updateCategory(categoryId, parentCategoryId, name,
208                            description, emailAddress, inProtocol, inServerName, inServerPort,
209                            inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
210                            outCustom, outServerName, outServerPort, outUseSSL, outUserName,
211                            outPassword, mailingListActive, mergeWithParentCategory,
212                            serviceContext);
213            }
214    
215            public static MBCategoryService getService() {
216                    if (_service == null) {
217                            _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
218    
219                            ReferenceRegistry.registerReference(MBCategoryServiceUtil.class,
220                                    "_service");
221                            MethodCache.remove(MBCategoryService.class);
222                    }
223    
224                    return _service;
225            }
226    
227            public void setService(MBCategoryService service) {
228                    MethodCache.remove(MBCategoryService.class);
229    
230                    _service = service;
231    
232                    ReferenceRegistry.registerReference(MBCategoryServiceUtil.class,
233                            "_service");
234                    MethodCache.remove(MBCategoryService.class);
235            }
236    
237            private static MBCategoryService _service;
238    }