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 message remote service. This utility wraps {@link com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl} 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 MBMessageService
029     * @see com.liferay.portlet.messageboards.service.base.MBMessageServiceBaseImpl
030     * @see com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl
031     * @generated
032     */
033    public class MBMessageServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl} 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.MBMessage addDiscussionMessage(
059                    long groupId, java.lang.String className, long classPK,
060                    java.lang.String permissionClassName, long permissionClassPK,
061                    long permissionOwnerId, long threadId, long parentMessageId,
062                    java.lang.String subject, java.lang.String body,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService()
067                                       .addDiscussionMessage(groupId, className, classPK,
068                            permissionClassName, permissionClassPK, permissionOwnerId,
069                            threadId, parentMessageId, subject, body, serviceContext);
070            }
071    
072            /**
073            * @deprecated {@link #addMessage(long, String, String, String,
074            java.util.List, boolean, double, boolean,
075            com.liferay.portal.service.ServiceContext)}
076            */
077            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
078                    long groupId, long categoryId, long threadId, long parentMessageId,
079                    java.lang.String subject, java.lang.String body,
080                    java.lang.String format,
081                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
082                    boolean anonymous, double priority, boolean allowPingbacks,
083                    com.liferay.portal.service.ServiceContext serviceContext)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    return getService()
087                                       .addMessage(groupId, categoryId, threadId, parentMessageId,
088                            subject, body, format, inputStreamOVPs, anonymous, priority,
089                            allowPingbacks, serviceContext);
090            }
091    
092            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
093                    long groupId, long categoryId, java.lang.String subject,
094                    java.lang.String body, java.lang.String format,
095                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
096                    boolean anonymous, double priority, boolean allowPingbacks,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    return getService()
101                                       .addMessage(groupId, categoryId, subject, body, format,
102                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
103            }
104    
105            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
106                    long parentMessageId, java.lang.String subject, java.lang.String body,
107                    java.lang.String format,
108                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
109                    boolean anonymous, double priority, boolean allowPingbacks,
110                    com.liferay.portal.service.ServiceContext serviceContext)
111                    throws com.liferay.portal.kernel.exception.PortalException,
112                            com.liferay.portal.kernel.exception.SystemException {
113                    return getService()
114                                       .addMessage(parentMessageId, subject, body, format,
115                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
116            }
117    
118            public static void deleteDiscussionMessage(long groupId,
119                    java.lang.String className, long classPK,
120                    java.lang.String permissionClassName, long permissionClassPK,
121                    long permissionOwnerId, long messageId)
122                    throws com.liferay.portal.kernel.exception.PortalException,
123                            com.liferay.portal.kernel.exception.SystemException {
124                    getService()
125                            .deleteDiscussionMessage(groupId, className, classPK,
126                            permissionClassName, permissionClassPK, permissionOwnerId, messageId);
127            }
128    
129            public static void deleteMessage(long messageId)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    getService().deleteMessage(messageId);
133            }
134    
135            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
136                    long groupId, long categoryId, int status, int start, int end)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getService()
140                                       .getCategoryMessages(groupId, categoryId, status, start, end);
141            }
142    
143            public static int getCategoryMessagesCount(long groupId, long categoryId,
144                    int status) throws com.liferay.portal.kernel.exception.SystemException {
145                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
146            }
147    
148            public static java.lang.String getCategoryMessagesRSS(long groupId,
149                    long categoryId, int status, int max, java.lang.String type,
150                    double version, java.lang.String displayStyle,
151                    java.lang.String feedURL, java.lang.String entryURL,
152                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getService()
156                                       .getCategoryMessagesRSS(groupId, categoryId, status, max,
157                            type, version, displayStyle, feedURL, entryURL, themeDisplay);
158            }
159    
160            public static java.lang.String getCompanyMessagesRSS(long companyId,
161                    int status, int max, java.lang.String type, double version,
162                    java.lang.String displayStyle, java.lang.String feedURL,
163                    java.lang.String entryURL,
164                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    return getService()
168                                       .getCompanyMessagesRSS(companyId, status, max, type,
169                            version, displayStyle, feedURL, entryURL, themeDisplay);
170            }
171    
172            public static int getGroupMessagesCount(long groupId, int status)
173                    throws com.liferay.portal.kernel.exception.SystemException {
174                    return getService().getGroupMessagesCount(groupId, status);
175            }
176    
177            public static java.lang.String getGroupMessagesRSS(long groupId,
178                    int status, int max, java.lang.String type, double version,
179                    java.lang.String displayStyle, java.lang.String feedURL,
180                    java.lang.String entryURL,
181                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getService()
185                                       .getGroupMessagesRSS(groupId, status, max, type, version,
186                            displayStyle, feedURL, entryURL, themeDisplay);
187            }
188    
189            public static java.lang.String getGroupMessagesRSS(long groupId,
190                    long userId, int status, int max, java.lang.String type,
191                    double version, java.lang.String displayStyle,
192                    java.lang.String feedURL, java.lang.String entryURL,
193                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    return getService()
197                                       .getGroupMessagesRSS(groupId, userId, status, max, type,
198                            version, displayStyle, feedURL, entryURL, themeDisplay);
199            }
200    
201            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
202                    long messageId)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException {
205                    return getService().getMessage(messageId);
206            }
207    
208            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
209                    long messageId, int status, java.lang.String threadView,
210                    boolean includePrevAndNext)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getService()
214                                       .getMessageDisplay(messageId, status, threadView,
215                            includePrevAndNext);
216            }
217    
218            public static int getThreadAnswersCount(long groupId, long categoryId,
219                    long threadId)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getService().getThreadAnswersCount(groupId, categoryId, threadId);
222            }
223    
224            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
225                    long groupId, long categoryId, long threadId, int status, int start,
226                    int end) throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService()
228                                       .getThreadMessages(groupId, categoryId, threadId, status,
229                            start, end);
230            }
231    
232            public static int getThreadMessagesCount(long groupId, long categoryId,
233                    long threadId, int status)
234                    throws com.liferay.portal.kernel.exception.SystemException {
235                    return getService()
236                                       .getThreadMessagesCount(groupId, categoryId, threadId, status);
237            }
238    
239            public static java.lang.String getThreadMessagesRSS(long threadId,
240                    int status, int max, java.lang.String type, double version,
241                    java.lang.String displayStyle, java.lang.String feedURL,
242                    java.lang.String entryURL,
243                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    return getService()
247                                       .getThreadMessagesRSS(threadId, status, max, type, version,
248                            displayStyle, feedURL, entryURL, themeDisplay);
249            }
250    
251            public static void subscribeMessage(long messageId)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException {
254                    getService().subscribeMessage(messageId);
255            }
256    
257            public static void unsubscribeMessage(long messageId)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException {
260                    getService().unsubscribeMessage(messageId);
261            }
262    
263            public static void updateAnswer(long messageId, boolean answer,
264                    boolean cascade)
265                    throws com.liferay.portal.kernel.exception.PortalException,
266                            com.liferay.portal.kernel.exception.SystemException {
267                    getService().updateAnswer(messageId, answer, cascade);
268            }
269    
270            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
271                    java.lang.String className, long classPK,
272                    java.lang.String permissionClassName, long permissionClassPK,
273                    long permissionOwnerId, long messageId, java.lang.String subject,
274                    java.lang.String body,
275                    com.liferay.portal.service.ServiceContext serviceContext)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    return getService()
279                                       .updateDiscussionMessage(className, classPK,
280                            permissionClassName, permissionClassPK, permissionOwnerId,
281                            messageId, subject, body, serviceContext);
282            }
283    
284            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
285                    long messageId, java.lang.String subject, java.lang.String body,
286                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
287                    java.util.List<java.lang.String> existingFiles, double priority,
288                    boolean allowPingbacks,
289                    com.liferay.portal.service.ServiceContext serviceContext)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    return getService()
293                                       .updateMessage(messageId, subject, body, inputStreamOVPs,
294                            existingFiles, priority, allowPingbacks, serviceContext);
295            }
296    
297            public static MBMessageService getService() {
298                    if (_service == null) {
299                            _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
300    
301                            ReferenceRegistry.registerReference(MBMessageServiceUtil.class,
302                                    "_service");
303                    }
304    
305                    return _service;
306            }
307    
308            /**
309             * @deprecated
310             */
311            public void setService(MBMessageService service) {
312            }
313    
314            private static MBMessageService _service;
315    }