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,
045                    java.lang.String permissionClassName, long permissionClassPK,
046                    long permissionOwnerId, long threadId, long parentMessageId,
047                    java.lang.String subject, java.lang.String body,
048                    com.liferay.portal.service.ServiceContext serviceContext)
049                    throws com.liferay.portal.kernel.exception.PortalException {
050                    return getService()
051                                       .addDiscussionMessage(groupId, className, classPK,
052                            permissionClassName, permissionClassPK, permissionOwnerId,
053                            threadId, parentMessageId, subject, body, serviceContext);
054            }
055    
056            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
057                    long categoryId, java.lang.String subject, java.lang.String body,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService().addMessage(categoryId, subject, body, serviceContext);
061            }
062    
063            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
064                    long groupId, long categoryId, java.lang.String subject,
065                    java.lang.String body, java.lang.String format,
066                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
067                    boolean anonymous, double priority, boolean allowPingbacks,
068                    com.liferay.portal.service.ServiceContext serviceContext)
069                    throws com.liferay.portal.kernel.exception.PortalException {
070                    return getService()
071                                       .addMessage(groupId, categoryId, subject, body, format,
072                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
073            }
074    
075            /**
076            * @deprecated As of 6.2.0, replaced by {@link #addMessage(long, String,
077            String, String, java.util.List, boolean, double, boolean,
078            com.liferay.portal.service.ServiceContext)}
079            */
080            @Deprecated
081            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
082                    long groupId, long categoryId, long threadId, long parentMessageId,
083                    java.lang.String subject, java.lang.String body,
084                    java.lang.String format,
085                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
086                    boolean anonymous, double priority, boolean allowPingbacks,
087                    com.liferay.portal.service.ServiceContext serviceContext)
088                    throws com.liferay.portal.kernel.exception.PortalException {
089                    return getService()
090                                       .addMessage(groupId, categoryId, threadId, parentMessageId,
091                            subject, body, format, inputStreamOVPs, anonymous, priority,
092                            allowPingbacks, serviceContext);
093            }
094    
095            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
096                    long parentMessageId, java.lang.String subject, java.lang.String body,
097                    java.lang.String format,
098                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
099                    boolean anonymous, double priority, boolean allowPingbacks,
100                    com.liferay.portal.service.ServiceContext serviceContext)
101                    throws com.liferay.portal.kernel.exception.PortalException {
102                    return getService()
103                                       .addMessage(parentMessageId, subject, body, format,
104                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
105            }
106    
107            public static void deleteDiscussionMessage(long groupId,
108                    java.lang.String className, long classPK,
109                    java.lang.String permissionClassName, long permissionClassPK,
110                    long permissionOwnerId, long messageId)
111                    throws com.liferay.portal.kernel.exception.PortalException {
112                    getService()
113                            .deleteDiscussionMessage(groupId, className, classPK,
114                            permissionClassName, permissionClassPK, permissionOwnerId, messageId);
115            }
116    
117            public static void deleteMessage(long messageId)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    getService().deleteMessage(messageId);
120            }
121    
122            public static void deleteMessageAttachments(long messageId)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    getService().deleteMessageAttachments(messageId);
125            }
126    
127            /**
128            * Returns the Spring bean ID for this bean.
129            *
130            * @return the Spring bean ID for this bean
131            */
132            public static java.lang.String getBeanIdentifier() {
133                    return getService().getBeanIdentifier();
134            }
135    
136            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
137                    long groupId, long categoryId, int status, int start, int end)
138                    throws com.liferay.portal.kernel.exception.PortalException {
139                    return getService()
140                                       .getCategoryMessages(groupId, categoryId, status, start, end);
141            }
142    
143            public static int getCategoryMessagesCount(long groupId, long categoryId,
144                    int status) {
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                    return getService()
155                                       .getCategoryMessagesRSS(groupId, categoryId, status, max,
156                            type, version, displayStyle, feedURL, entryURL, themeDisplay);
157            }
158    
159            public static java.lang.String getCompanyMessagesRSS(long companyId,
160                    int status, int max, java.lang.String type, double version,
161                    java.lang.String displayStyle, java.lang.String feedURL,
162                    java.lang.String entryURL,
163                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
164                    throws com.liferay.portal.kernel.exception.PortalException {
165                    return getService()
166                                       .getCompanyMessagesRSS(companyId, status, max, type,
167                            version, displayStyle, feedURL, entryURL, themeDisplay);
168            }
169    
170            public static int getGroupMessagesCount(long groupId, int status) {
171                    return getService().getGroupMessagesCount(groupId, status);
172            }
173    
174            public static java.lang.String getGroupMessagesRSS(long groupId,
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                    return getService()
181                                       .getGroupMessagesRSS(groupId, status, max, type, version,
182                            displayStyle, feedURL, entryURL, themeDisplay);
183            }
184    
185            public static java.lang.String getGroupMessagesRSS(long groupId,
186                    long userId, 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                                       .getGroupMessagesRSS(groupId, userId, status, max, type,
193                            version, displayStyle, feedURL, entryURL, themeDisplay);
194            }
195    
196            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
197                    long messageId)
198                    throws com.liferay.portal.kernel.exception.PortalException {
199                    return getService().getMessage(messageId);
200            }
201    
202            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
203                    long messageId, int status, java.lang.String threadView,
204                    boolean includePrevAndNext)
205                    throws com.liferay.portal.kernel.exception.PortalException {
206                    return getService()
207                                       .getMessageDisplay(messageId, status, threadView,
208                            includePrevAndNext);
209            }
210    
211            public static int getThreadAnswersCount(long groupId, long categoryId,
212                    long threadId) {
213                    return getService().getThreadAnswersCount(groupId, categoryId, threadId);
214            }
215    
216            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
217                    long groupId, long categoryId, long threadId, int status, int start,
218                    int end) {
219                    return getService()
220                                       .getThreadMessages(groupId, categoryId, threadId, status,
221                            start, end);
222            }
223    
224            public static int getThreadMessagesCount(long groupId, long categoryId,
225                    long threadId, int status) {
226                    return getService()
227                                       .getThreadMessagesCount(groupId, categoryId, threadId, status);
228            }
229    
230            public static java.lang.String getThreadMessagesRSS(long threadId,
231                    int status, int max, java.lang.String type, double version,
232                    java.lang.String displayStyle, java.lang.String feedURL,
233                    java.lang.String entryURL,
234                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    return getService()
237                                       .getThreadMessagesRSS(threadId, status, max, type, version,
238                            displayStyle, feedURL, entryURL, themeDisplay);
239            }
240    
241            public static void restoreMessageAttachmentFromTrash(long messageId,
242                    java.lang.String fileName)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    getService().restoreMessageAttachmentFromTrash(messageId, fileName);
245            }
246    
247            /**
248            * Sets the Spring bean ID for this bean.
249            *
250            * @param beanIdentifier the Spring bean ID for this bean
251            */
252            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
253                    getService().setBeanIdentifier(beanIdentifier);
254            }
255    
256            public static void subscribeMessage(long messageId)
257                    throws com.liferay.portal.kernel.exception.PortalException {
258                    getService().subscribeMessage(messageId);
259            }
260    
261            public static void unsubscribeMessage(long messageId)
262                    throws com.liferay.portal.kernel.exception.PortalException {
263                    getService().unsubscribeMessage(messageId);
264            }
265    
266            public static void updateAnswer(long messageId, boolean answer,
267                    boolean cascade)
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    getService().updateAnswer(messageId, answer, cascade);
270            }
271    
272            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
273                    java.lang.String className, long classPK,
274                    java.lang.String permissionClassName, long permissionClassPK,
275                    long permissionOwnerId, long messageId, java.lang.String subject,
276                    java.lang.String body,
277                    com.liferay.portal.service.ServiceContext serviceContext)
278                    throws com.liferay.portal.kernel.exception.PortalException {
279                    return getService()
280                                       .updateDiscussionMessage(className, classPK,
281                            permissionClassName, permissionClassPK, permissionOwnerId,
282                            messageId, subject, body, serviceContext);
283            }
284    
285            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
286                    long messageId, java.lang.String subject, java.lang.String body,
287                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
288                    java.util.List<java.lang.String> existingFiles, double priority,
289                    boolean allowPingbacks,
290                    com.liferay.portal.service.ServiceContext serviceContext)
291                    throws com.liferay.portal.kernel.exception.PortalException {
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 As of 6.2.0
310             */
311            @Deprecated
312            public void setService(MBMessageService service) {
313            }
314    
315            private static MBMessageService _service;
316    }