001    /**
002     * Copyright (c) 2000-2013 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 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    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
063                    long groupId, java.lang.String className, long classPK,
064                    java.lang.String permissionClassName, long permissionClassPK,
065                    long permissionOwnerId, long threadId, long parentMessageId,
066                    java.lang.String subject, java.lang.String body,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return getService()
071                                       .addDiscussionMessage(groupId, className, classPK,
072                            permissionClassName, permissionClassPK, permissionOwnerId,
073                            threadId, parentMessageId, subject, body, serviceContext);
074            }
075    
076            /**
077            * @deprecated As of 6.2.0, replaced by {@link #addMessage(long, String,
078            String, String, java.util.List, boolean, double, boolean,
079            com.liferay.portal.service.ServiceContext)}
080            */
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                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService()
091                                       .addMessage(groupId, categoryId, threadId, parentMessageId,
092                            subject, body, format, inputStreamOVPs, anonymous, priority,
093                            allowPingbacks, serviceContext);
094            }
095    
096            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
097                    long groupId, long categoryId, java.lang.String subject,
098                    java.lang.String body, java.lang.String fileName, java.io.File file,
099                    com.liferay.portal.service.ServiceContext serviceContext)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException,
102                            java.io.FileNotFoundException {
103                    return getService()
104                                       .addMessage(groupId, categoryId, subject, body, fileName,
105                            file, serviceContext);
106            }
107    
108            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
109                    long groupId, long categoryId, java.lang.String subject,
110                    java.lang.String body, java.lang.String format,
111                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
112                    boolean anonymous, double priority, boolean allowPingbacks,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService()
117                                       .addMessage(groupId, categoryId, subject, body, format,
118                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
119            }
120    
121            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
122                    long groupId, long categoryId, java.lang.String subject,
123                    java.lang.String body, java.lang.String format,
124                    java.lang.String fileName, java.io.File file, boolean anonymous,
125                    double priority, boolean allowPingbacks,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException,
129                            java.io.FileNotFoundException {
130                    return getService()
131                                       .addMessage(groupId, categoryId, subject, body, format,
132                            fileName, file, anonymous, priority, allowPingbacks, serviceContext);
133            }
134    
135            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
136                    long categoryId, java.lang.String subject, java.lang.String body,
137                    com.liferay.portal.service.ServiceContext serviceContext)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    return getService().addMessage(categoryId, subject, body, serviceContext);
141            }
142    
143            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
144                    long parentMessageId, java.lang.String subject, java.lang.String body,
145                    java.lang.String format,
146                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
147                    boolean anonymous, double priority, boolean allowPingbacks,
148                    com.liferay.portal.service.ServiceContext serviceContext)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    return getService()
152                                       .addMessage(parentMessageId, subject, body, format,
153                            inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
154            }
155    
156            public static void deleteDiscussionMessage(long groupId,
157                    java.lang.String className, long classPK,
158                    java.lang.String permissionClassName, long permissionClassPK,
159                    long permissionOwnerId, long messageId)
160                    throws com.liferay.portal.kernel.exception.PortalException,
161                            com.liferay.portal.kernel.exception.SystemException {
162                    getService()
163                            .deleteDiscussionMessage(groupId, className, classPK,
164                            permissionClassName, permissionClassPK, permissionOwnerId, messageId);
165            }
166    
167            public static void deleteMessage(long messageId)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    getService().deleteMessage(messageId);
171            }
172    
173            public static void deleteMessageAttachments(long messageId)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    getService().deleteMessageAttachments(messageId);
177            }
178    
179            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
180                    long groupId, long categoryId, int status, int start, int end)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getService()
184                                       .getCategoryMessages(groupId, categoryId, status, start, end);
185            }
186    
187            public static int getCategoryMessagesCount(long groupId, long categoryId,
188                    int status) throws com.liferay.portal.kernel.exception.SystemException {
189                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
190            }
191    
192            public static java.lang.String getCategoryMessagesRSS(long groupId,
193                    long categoryId, int status, int max, java.lang.String type,
194                    double version, java.lang.String displayStyle,
195                    java.lang.String feedURL, java.lang.String entryURL,
196                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
197                    throws com.liferay.portal.kernel.exception.PortalException,
198                            com.liferay.portal.kernel.exception.SystemException {
199                    return getService()
200                                       .getCategoryMessagesRSS(groupId, categoryId, status, max,
201                            type, version, displayStyle, feedURL, entryURL, themeDisplay);
202            }
203    
204            public static java.lang.String getCompanyMessagesRSS(long companyId,
205                    int status, int max, java.lang.String type, double version,
206                    java.lang.String displayStyle, java.lang.String feedURL,
207                    java.lang.String entryURL,
208                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
209                    throws com.liferay.portal.kernel.exception.PortalException,
210                            com.liferay.portal.kernel.exception.SystemException {
211                    return getService()
212                                       .getCompanyMessagesRSS(companyId, status, max, type,
213                            version, displayStyle, feedURL, entryURL, themeDisplay);
214            }
215    
216            public static int getGroupMessagesCount(long groupId, int status)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getService().getGroupMessagesCount(groupId, status);
219            }
220    
221            public static java.lang.String getGroupMessagesRSS(long groupId,
222                    int status, int max, java.lang.String type, double version,
223                    java.lang.String displayStyle, java.lang.String feedURL,
224                    java.lang.String entryURL,
225                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException {
228                    return getService()
229                                       .getGroupMessagesRSS(groupId, status, max, type, version,
230                            displayStyle, feedURL, entryURL, themeDisplay);
231            }
232    
233            public static java.lang.String getGroupMessagesRSS(long groupId,
234                    long userId, int status, int max, java.lang.String type,
235                    double version, java.lang.String displayStyle,
236                    java.lang.String feedURL, java.lang.String entryURL,
237                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    return getService()
241                                       .getGroupMessagesRSS(groupId, userId, status, max, type,
242                            version, displayStyle, feedURL, entryURL, themeDisplay);
243            }
244    
245            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
246                    long messageId)
247                    throws com.liferay.portal.kernel.exception.PortalException,
248                            com.liferay.portal.kernel.exception.SystemException {
249                    return getService().getMessage(messageId);
250            }
251    
252            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
253                    long messageId, int status, java.lang.String threadView,
254                    boolean includePrevAndNext)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    return getService()
258                                       .getMessageDisplay(messageId, status, threadView,
259                            includePrevAndNext);
260            }
261    
262            public static int getThreadAnswersCount(long groupId, long categoryId,
263                    long threadId)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getService().getThreadAnswersCount(groupId, categoryId, threadId);
266            }
267    
268            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
269                    long groupId, long categoryId, long threadId, int status, int start,
270                    int end) throws com.liferay.portal.kernel.exception.SystemException {
271                    return getService()
272                                       .getThreadMessages(groupId, categoryId, threadId, status,
273                            start, end);
274            }
275    
276            public static int getThreadMessagesCount(long groupId, long categoryId,
277                    long threadId, int status)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return getService()
280                                       .getThreadMessagesCount(groupId, categoryId, threadId, status);
281            }
282    
283            public static java.lang.String getThreadMessagesRSS(long threadId,
284                    int status, int max, java.lang.String type, double version,
285                    java.lang.String displayStyle, java.lang.String feedURL,
286                    java.lang.String entryURL,
287                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    return getService()
291                                       .getThreadMessagesRSS(threadId, status, max, type, version,
292                            displayStyle, feedURL, entryURL, themeDisplay);
293            }
294    
295            public static void restoreMessageAttachmentFromTrash(long messageId,
296                    java.lang.String fileName)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException {
299                    getService().restoreMessageAttachmentFromTrash(messageId, fileName);
300            }
301    
302            public static void subscribeMessage(long messageId)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    getService().subscribeMessage(messageId);
306            }
307    
308            public static void unsubscribeMessage(long messageId)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException {
311                    getService().unsubscribeMessage(messageId);
312            }
313    
314            public static void updateAnswer(long messageId, boolean answer,
315                    boolean cascade)
316                    throws com.liferay.portal.kernel.exception.PortalException,
317                            com.liferay.portal.kernel.exception.SystemException {
318                    getService().updateAnswer(messageId, answer, cascade);
319            }
320    
321            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
322                    java.lang.String className, long classPK,
323                    java.lang.String permissionClassName, long permissionClassPK,
324                    long permissionOwnerId, long messageId, java.lang.String subject,
325                    java.lang.String body,
326                    com.liferay.portal.service.ServiceContext serviceContext)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getService()
330                                       .updateDiscussionMessage(className, classPK,
331                            permissionClassName, permissionClassPK, permissionOwnerId,
332                            messageId, subject, body, serviceContext);
333            }
334    
335            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
336                    long messageId, java.lang.String subject, java.lang.String body,
337                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
338                    java.util.List<java.lang.String> existingFiles, double priority,
339                    boolean allowPingbacks,
340                    com.liferay.portal.service.ServiceContext serviceContext)
341                    throws com.liferay.portal.kernel.exception.PortalException,
342                            com.liferay.portal.kernel.exception.SystemException {
343                    return getService()
344                                       .updateMessage(messageId, subject, body, inputStreamOVPs,
345                            existingFiles, priority, allowPingbacks, serviceContext);
346            }
347    
348            public static MBMessageService getService() {
349                    if (_service == null) {
350                            _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
351    
352                            ReferenceRegistry.registerReference(MBMessageServiceUtil.class,
353                                    "_service");
354                    }
355    
356                    return _service;
357            }
358    
359            /**
360             * @deprecated As of 6.2.0
361             */
362            public void setService(MBMessageService service) {
363            }
364    
365            private static MBMessageService _service;
366    }