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 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 categoryId, java.lang.String subject, java.lang.String body,
107                    com.liferay.portal.service.ServiceContext serviceContext)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException {
110                    return getService().addMessage(categoryId, subject, body, serviceContext);
111            }
112    
113            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
114                    long parentMessageId, java.lang.String subject, java.lang.String body,
115                    java.lang.String format,
116                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
117                    boolean anonymous, double priority, boolean allowPingbacks,
118                    com.liferay.portal.service.ServiceContext serviceContext)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getService()
122                                       .addMessage(parentMessageId, subject, body, format,
123                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
124            }
125    
126            public static void deleteDiscussionMessage(long groupId,
127                    java.lang.String className, long classPK,
128                    java.lang.String permissionClassName, long permissionClassPK,
129                    long permissionOwnerId, long messageId)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    getService()
133                            .deleteDiscussionMessage(groupId, className, classPK,
134                            permissionClassName, permissionClassPK, permissionOwnerId, messageId);
135            }
136    
137            public static void deleteMessage(long messageId)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    getService().deleteMessage(messageId);
141            }
142    
143            public static void deleteMessageAttachments(long messageId)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    getService().deleteMessageAttachments(messageId);
147            }
148    
149            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
150                    long groupId, long categoryId, int status, int start, int end)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    return getService()
154                                       .getCategoryMessages(groupId, categoryId, status, start, end);
155            }
156    
157            public static int getCategoryMessagesCount(long groupId, long categoryId,
158                    int status) throws com.liferay.portal.kernel.exception.SystemException {
159                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
160            }
161    
162            public static java.lang.String getCategoryMessagesRSS(long groupId,
163                    long categoryId, int status, int max, java.lang.String type,
164                    double version, java.lang.String displayStyle,
165                    java.lang.String feedURL, java.lang.String entryURL,
166                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return getService()
170                                       .getCategoryMessagesRSS(groupId, categoryId, status, max,
171                            type, version, displayStyle, feedURL, entryURL, themeDisplay);
172            }
173    
174            public static java.lang.String getCompanyMessagesRSS(long companyId,
175                    int status, int max, java.lang.String type, double version,
176                    java.lang.String displayStyle, java.lang.String feedURL,
177                    java.lang.String entryURL,
178                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getService()
182                                       .getCompanyMessagesRSS(companyId, status, max, type,
183                            version, displayStyle, feedURL, entryURL, themeDisplay);
184            }
185    
186            public static int getGroupMessagesCount(long groupId, int status)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getService().getGroupMessagesCount(groupId, status);
189            }
190    
191            public static java.lang.String getGroupMessagesRSS(long groupId,
192                    int status, int max, java.lang.String type, double version,
193                    java.lang.String displayStyle, java.lang.String feedURL,
194                    java.lang.String entryURL,
195                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
196                    throws com.liferay.portal.kernel.exception.PortalException,
197                            com.liferay.portal.kernel.exception.SystemException {
198                    return getService()
199                                       .getGroupMessagesRSS(groupId, status, max, type, version,
200                            displayStyle, feedURL, entryURL, themeDisplay);
201            }
202    
203            public static java.lang.String getGroupMessagesRSS(long groupId,
204                    long userId, int status, int max, java.lang.String type,
205                    double version, java.lang.String displayStyle,
206                    java.lang.String feedURL, java.lang.String entryURL,
207                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
208                    throws com.liferay.portal.kernel.exception.PortalException,
209                            com.liferay.portal.kernel.exception.SystemException {
210                    return getService()
211                                       .getGroupMessagesRSS(groupId, userId, status, max, type,
212                            version, displayStyle, feedURL, entryURL, themeDisplay);
213            }
214    
215            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
216                    long messageId)
217                    throws com.liferay.portal.kernel.exception.PortalException,
218                            com.liferay.portal.kernel.exception.SystemException {
219                    return getService().getMessage(messageId);
220            }
221    
222            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
223                    long messageId, int status, java.lang.String threadView,
224                    boolean includePrevAndNext)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return getService()
228                                       .getMessageDisplay(messageId, status, threadView,
229                            includePrevAndNext);
230            }
231    
232            public static int getThreadAnswersCount(long groupId, long categoryId,
233                    long threadId)
234                    throws com.liferay.portal.kernel.exception.SystemException {
235                    return getService().getThreadAnswersCount(groupId, categoryId, threadId);
236            }
237    
238            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
239                    long groupId, long categoryId, long threadId, int status, int start,
240                    int end) throws com.liferay.portal.kernel.exception.SystemException {
241                    return getService()
242                                       .getThreadMessages(groupId, categoryId, threadId, status,
243                            start, end);
244            }
245    
246            public static int getThreadMessagesCount(long groupId, long categoryId,
247                    long threadId, int status)
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return getService()
250                                       .getThreadMessagesCount(groupId, categoryId, threadId, status);
251            }
252    
253            public static java.lang.String getThreadMessagesRSS(long threadId,
254                    int status, int max, java.lang.String type, double version,
255                    java.lang.String displayStyle, java.lang.String feedURL,
256                    java.lang.String entryURL,
257                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException {
260                    return getService()
261                                       .getThreadMessagesRSS(threadId, status, max, type, version,
262                            displayStyle, feedURL, entryURL, themeDisplay);
263            }
264    
265            public static void restoreMessageAttachmentFromTrash(long messageId,
266                    java.lang.String fileName)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    getService().restoreMessageAttachmentFromTrash(messageId, fileName);
270            }
271    
272            public static void subscribeMessage(long messageId)
273                    throws com.liferay.portal.kernel.exception.PortalException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    getService().subscribeMessage(messageId);
276            }
277    
278            public static void unsubscribeMessage(long messageId)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    getService().unsubscribeMessage(messageId);
282            }
283    
284            public static void updateAnswer(long messageId, boolean answer,
285                    boolean cascade)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException {
288                    getService().updateAnswer(messageId, answer, cascade);
289            }
290    
291            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
292                    java.lang.String className, long classPK,
293                    java.lang.String permissionClassName, long permissionClassPK,
294                    long permissionOwnerId, long messageId, java.lang.String subject,
295                    java.lang.String body,
296                    com.liferay.portal.service.ServiceContext serviceContext)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException {
299                    return getService()
300                                       .updateDiscussionMessage(className, classPK,
301                            permissionClassName, permissionClassPK, permissionOwnerId,
302                            messageId, subject, body, serviceContext);
303            }
304    
305            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
306                    long messageId, java.lang.String subject, java.lang.String body,
307                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
308                    java.util.List<java.lang.String> existingFiles, double priority,
309                    boolean allowPingbacks,
310                    com.liferay.portal.service.ServiceContext serviceContext)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException {
313                    return getService()
314                                       .updateMessage(messageId, subject, body, inputStreamOVPs,
315                            existingFiles, priority, allowPingbacks, serviceContext);
316            }
317    
318            public static MBMessageService getService() {
319                    if (_service == null) {
320                            _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
321    
322                            ReferenceRegistry.registerReference(MBMessageServiceUtil.class,
323                                    "_service");
324                    }
325    
326                    return _service;
327            }
328    
329            /**
330             * @deprecated
331             */
332            public void setService(MBMessageService service) {
333            }
334    
335            private static MBMessageService _service;
336    }