001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for MBMessage. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see MBMessageService
032     * @see com.liferay.portlet.messageboards.service.base.MBMessageServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBMessageServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * 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.
042             */
043            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
044                    long groupId, java.lang.String className, long classPK, long threadId,
045                    long parentMessageId, java.lang.String subject, java.lang.String body,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addDiscussionMessage(groupId, className, classPK, threadId,
050                            parentMessageId, subject, body, serviceContext);
051            }
052    
053            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
054                    long categoryId, java.lang.String subject, java.lang.String body,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException {
057                    return getService().addMessage(categoryId, subject, body, serviceContext);
058            }
059    
060            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
061                    long groupId, long categoryId, java.lang.String subject,
062                    java.lang.String body, java.lang.String format,
063                    java.lang.String fileName, java.io.File file, boolean anonymous,
064                    double priority, boolean allowPingbacks,
065                    com.liferay.portal.service.ServiceContext serviceContext)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            java.io.FileNotFoundException {
068                    return getService()
069                                       .addMessage(groupId, categoryId, subject, body, format,
070                            fileName, file, anonymous, priority, allowPingbacks, serviceContext);
071            }
072    
073            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
074                    long groupId, long categoryId, java.lang.String subject,
075                    java.lang.String body, java.lang.String format,
076                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
077                    boolean anonymous, double priority, boolean allowPingbacks,
078                    com.liferay.portal.service.ServiceContext serviceContext)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    return getService()
081                                       .addMessage(groupId, categoryId, subject, body, format,
082                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
083            }
084    
085            /**
086            * @deprecated As of 6.2.0, replaced by {@link #addMessage(long, String,
087            String, String, java.util.List, boolean, double, boolean,
088            com.liferay.portal.service.ServiceContext)}
089            */
090            @Deprecated
091            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
092                    long groupId, long categoryId, long threadId, long parentMessageId,
093                    java.lang.String subject, java.lang.String body,
094                    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                    return getService()
100                                       .addMessage(groupId, categoryId, threadId, parentMessageId,
101                            subject, body, format, inputStreamOVPs, anonymous, priority,
102                            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                    return getService()
113                                       .addMessage(parentMessageId, subject, body, format,
114                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
115            }
116    
117            public static void addMessageAttachment(long messageId,
118                    java.lang.String fileName, java.io.File file, java.lang.String mimeType)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    getService().addMessageAttachment(messageId, fileName, file, mimeType);
121            }
122    
123            /**
124            * @deprecated As of 7.0.0, replaced by {@link #deleteDiscussionMessage(
125            long)}
126            */
127            @Deprecated
128            public static void deleteDiscussionMessage(long groupId,
129                    java.lang.String className, long classPK,
130                    java.lang.String permissionClassName, long permissionClassPK,
131                    long permissionOwnerId, long messageId)
132                    throws com.liferay.portal.kernel.exception.PortalException {
133                    getService()
134                            .deleteDiscussionMessage(groupId, className, classPK,
135                            permissionClassName, permissionClassPK, permissionOwnerId, messageId);
136            }
137    
138            public static void deleteDiscussionMessage(long messageId)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    getService().deleteDiscussionMessage(messageId);
141            }
142    
143            public static void deleteMessage(long messageId)
144                    throws com.liferay.portal.kernel.exception.PortalException {
145                    getService().deleteMessage(messageId);
146            }
147    
148            public static void deleteMessageAttachment(long messageId,
149                    java.lang.String fileName)
150                    throws com.liferay.portal.kernel.exception.PortalException {
151                    getService().deleteMessageAttachment(messageId, fileName);
152            }
153    
154            public static void deleteMessageAttachments(long messageId)
155                    throws com.liferay.portal.kernel.exception.PortalException {
156                    getService().deleteMessageAttachments(messageId);
157            }
158    
159            public static void emptyMessageAttachments(long messageId)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    getService().emptyMessageAttachments(messageId);
162            }
163    
164            /**
165            * Returns the Spring bean ID for this bean.
166            *
167            * @return the Spring bean ID for this bean
168            */
169            public static java.lang.String getBeanIdentifier() {
170                    return getService().getBeanIdentifier();
171            }
172    
173            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
174                    long groupId, long categoryId, int status, int start, int end)
175                    throws com.liferay.portal.kernel.exception.PortalException {
176                    return getService()
177                                       .getCategoryMessages(groupId, categoryId, status, start, end);
178            }
179    
180            public static int getCategoryMessagesCount(long groupId, long categoryId,
181                    int status) {
182                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
183            }
184    
185            public static java.lang.String getCategoryMessagesRSS(long groupId,
186                    long categoryId, int status, int max, java.lang.String type,
187                    double version, java.lang.String displayStyle,
188                    java.lang.String feedURL, java.lang.String entryURL,
189                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
190                    throws com.liferay.portal.kernel.exception.PortalException {
191                    return getService()
192                                       .getCategoryMessagesRSS(groupId, categoryId, status, max,
193                            type, version, displayStyle, feedURL, entryURL, themeDisplay);
194            }
195    
196            public static java.lang.String getCompanyMessagesRSS(long companyId,
197                    int status, int max, java.lang.String type, double version,
198                    java.lang.String displayStyle, java.lang.String feedURL,
199                    java.lang.String entryURL,
200                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
201                    throws com.liferay.portal.kernel.exception.PortalException {
202                    return getService()
203                                       .getCompanyMessagesRSS(companyId, status, max, type,
204                            version, displayStyle, feedURL, entryURL, themeDisplay);
205            }
206    
207            public static int getGroupMessagesCount(long groupId, int status) {
208                    return getService().getGroupMessagesCount(groupId, status);
209            }
210    
211            public static java.lang.String getGroupMessagesRSS(long groupId,
212                    int status, int max, java.lang.String type, double version,
213                    java.lang.String displayStyle, java.lang.String feedURL,
214                    java.lang.String entryURL,
215                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
216                    throws com.liferay.portal.kernel.exception.PortalException {
217                    return getService()
218                                       .getGroupMessagesRSS(groupId, status, max, type, version,
219                            displayStyle, feedURL, entryURL, themeDisplay);
220            }
221    
222            public static java.lang.String getGroupMessagesRSS(long groupId,
223                    long userId, int status, int max, java.lang.String type,
224                    double version, java.lang.String displayStyle,
225                    java.lang.String feedURL, java.lang.String entryURL,
226                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return getService()
229                                       .getGroupMessagesRSS(groupId, userId, status, max, type,
230                            version, displayStyle, feedURL, entryURL, themeDisplay);
231            }
232    
233            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
234                    long messageId)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    return getService().getMessage(messageId);
237            }
238    
239            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
240                    long messageId, int status, java.lang.String threadView,
241                    boolean includePrevAndNext)
242                    throws com.liferay.portal.kernel.exception.PortalException {
243                    return getService()
244                                       .getMessageDisplay(messageId, status, threadView,
245                            includePrevAndNext);
246            }
247    
248            public static int getThreadAnswersCount(long groupId, long categoryId,
249                    long threadId) {
250                    return getService().getThreadAnswersCount(groupId, categoryId, threadId);
251            }
252    
253            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
254                    long groupId, long categoryId, long threadId, int status, int start,
255                    int end) {
256                    return getService()
257                                       .getThreadMessages(groupId, categoryId, threadId, status,
258                            start, end);
259            }
260    
261            public static int getThreadMessagesCount(long groupId, long categoryId,
262                    long threadId, int status) {
263                    return getService()
264                                       .getThreadMessagesCount(groupId, categoryId, threadId, status);
265            }
266    
267            public static java.lang.String getThreadMessagesRSS(long threadId,
268                    int status, int max, java.lang.String type, double version,
269                    java.lang.String displayStyle, java.lang.String feedURL,
270                    java.lang.String entryURL,
271                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    return getService()
274                                       .getThreadMessagesRSS(threadId, status, max, type, version,
275                            displayStyle, feedURL, entryURL, themeDisplay);
276            }
277    
278            public static void restoreMessageAttachmentFromTrash(long messageId,
279                    java.lang.String fileName)
280                    throws com.liferay.portal.kernel.exception.PortalException {
281                    getService().restoreMessageAttachmentFromTrash(messageId, fileName);
282            }
283    
284            /**
285            * Sets the Spring bean ID for this bean.
286            *
287            * @param beanIdentifier the Spring bean ID for this bean
288            */
289            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
290                    getService().setBeanIdentifier(beanIdentifier);
291            }
292    
293            public static void subscribeMessage(long messageId)
294                    throws com.liferay.portal.kernel.exception.PortalException {
295                    getService().subscribeMessage(messageId);
296            }
297    
298            public static void unsubscribeMessage(long messageId)
299                    throws com.liferay.portal.kernel.exception.PortalException {
300                    getService().unsubscribeMessage(messageId);
301            }
302    
303            public static void updateAnswer(long messageId, boolean answer,
304                    boolean cascade)
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    getService().updateAnswer(messageId, answer, cascade);
307            }
308    
309            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
310                    java.lang.String className, long classPK, long messageId,
311                    java.lang.String subject, java.lang.String body,
312                    com.liferay.portal.service.ServiceContext serviceContext)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    return getService()
315                                       .updateDiscussionMessage(className, classPK, messageId,
316                            subject, body, serviceContext);
317            }
318    
319            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
320                    long messageId, java.lang.String subject, java.lang.String body,
321                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
322                    java.util.List<java.lang.String> existingFiles, double priority,
323                    boolean allowPingbacks,
324                    com.liferay.portal.service.ServiceContext serviceContext)
325                    throws com.liferay.portal.kernel.exception.PortalException {
326                    return getService()
327                                       .updateMessage(messageId, subject, body, inputStreamOVPs,
328                            existingFiles, priority, allowPingbacks, serviceContext);
329            }
330    
331            public static MBMessageService getService() {
332                    if (_service == null) {
333                            _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
334    
335                            ReferenceRegistry.registerReference(MBMessageServiceUtil.class,
336                                    "_service");
337                    }
338    
339                    return _service;
340            }
341    
342            /**
343             * @deprecated As of 6.2.0
344             */
345            @Deprecated
346            public void setService(MBMessageService service) {
347            }
348    
349            private static MBMessageService _service;
350    }