001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * 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.
021     *
022     * <p>
023     * 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.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
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    public class MBMessageServiceUtil {
037            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
038                    long groupId, java.lang.String className, long classPK,
039                    java.lang.String permissionClassName, long permissionClassPK,
040                    long threadId, long parentMessageId, java.lang.String subject,
041                    java.lang.String body,
042                    com.liferay.portal.service.ServiceContext serviceContext)
043                    throws com.liferay.portal.kernel.exception.PortalException,
044                            com.liferay.portal.kernel.exception.SystemException {
045                    return getService()
046                                       .addDiscussionMessage(groupId, className, classPK,
047                            permissionClassName, permissionClassPK, threadId, parentMessageId,
048                            subject, body, serviceContext);
049            }
050    
051            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
052                    long groupId, long categoryId, long threadId, long parentMessageId,
053                    java.lang.String subject, java.lang.String body,
054                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
055                    boolean anonymous, double priority, boolean allowPingbacks,
056                    com.liferay.portal.service.ServiceContext serviceContext)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    return getService()
060                                       .addMessage(groupId, categoryId, threadId, parentMessageId,
061                            subject, body, files, anonymous, priority, allowPingbacks,
062                            serviceContext);
063            }
064    
065            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
066                    long groupId, long categoryId, java.lang.String subject,
067                    java.lang.String body,
068                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
069                    boolean anonymous, double priority, boolean allowPingbacks,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService()
074                                       .addMessage(groupId, categoryId, subject, body, files,
075                            anonymous, priority, allowPingbacks, serviceContext);
076            }
077    
078            public static void deleteDiscussionMessage(long groupId,
079                    java.lang.String className, long classPK,
080                    java.lang.String permissionClassName, long permissionClassPK,
081                    long messageId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    getService()
085                            .deleteDiscussionMessage(groupId, className, classPK,
086                            permissionClassName, permissionClassPK, messageId);
087            }
088    
089            public static void deleteMessage(long messageId)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    getService().deleteMessage(messageId);
093            }
094    
095            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
096                    long groupId, long categoryId, int status, int start, int end)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .getCategoryMessages(groupId, categoryId, status, start, end);
101            }
102    
103            public static int getCategoryMessagesCount(long groupId, long categoryId,
104                    int status) throws com.liferay.portal.kernel.exception.SystemException {
105                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
106            }
107    
108            public static java.lang.String getCategoryMessagesRSS(long groupId,
109                    long categoryId, int status, int max, java.lang.String type,
110                    double version, java.lang.String displayStyle,
111                    java.lang.String feedURL, java.lang.String entryURL,
112                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
113                    throws com.liferay.portal.kernel.exception.PortalException,
114                            com.liferay.portal.kernel.exception.SystemException {
115                    return getService()
116                                       .getCategoryMessagesRSS(groupId, categoryId, status, max,
117                            type, version, displayStyle, feedURL, entryURL, themeDisplay);
118            }
119    
120            public static java.lang.String getCompanyMessagesRSS(long companyId,
121                    int status, int max, java.lang.String type, double version,
122                    java.lang.String displayStyle, java.lang.String feedURL,
123                    java.lang.String entryURL,
124                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException {
127                    return getService()
128                                       .getCompanyMessagesRSS(companyId, status, max, type,
129                            version, displayStyle, feedURL, entryURL, themeDisplay);
130            }
131    
132            public static java.lang.String getGroupMessagesRSS(long groupId,
133                    int status, int max, java.lang.String type, double version,
134                    java.lang.String displayStyle, java.lang.String feedURL,
135                    java.lang.String entryURL,
136                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getService()
140                                       .getGroupMessagesRSS(groupId, status, max, type, version,
141                            displayStyle, feedURL, entryURL, themeDisplay);
142            }
143    
144            public static java.lang.String getGroupMessagesRSS(long groupId,
145                    long userId, int status, int max, java.lang.String type,
146                    double version, java.lang.String displayStyle,
147                    java.lang.String feedURL, java.lang.String entryURL,
148                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    return getService()
152                                       .getGroupMessagesRSS(groupId, userId, status, max, type,
153                            version, displayStyle, feedURL, entryURL, themeDisplay);
154            }
155    
156            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
157                    long messageId)
158                    throws com.liferay.portal.kernel.exception.PortalException,
159                            com.liferay.portal.kernel.exception.SystemException {
160                    return getService().getMessage(messageId);
161            }
162    
163            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
164                    long messageId, int status, java.lang.String threadView,
165                    boolean includePrevAndNext)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getService()
169                                       .getMessageDisplay(messageId, status, threadView,
170                            includePrevAndNext);
171            }
172    
173            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
174                    long groupId, long categoryId, long threadId, int status, int start,
175                    int end) throws com.liferay.portal.kernel.exception.SystemException {
176                    return getService()
177                                       .getThreadMessages(groupId, categoryId, threadId, status,
178                            start, end);
179            }
180    
181            public static int getThreadMessagesCount(long groupId, long categoryId,
182                    long threadId, int status)
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return getService()
185                                       .getThreadMessagesCount(groupId, categoryId, threadId, status);
186            }
187    
188            public static java.lang.String getThreadMessagesRSS(long threadId,
189                    int status, int max, java.lang.String type, double version,
190                    java.lang.String displayStyle, java.lang.String feedURL,
191                    java.lang.String entryURL,
192                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException {
195                    return getService()
196                                       .getThreadMessagesRSS(threadId, status, max, type, version,
197                            displayStyle, feedURL, entryURL, themeDisplay);
198            }
199    
200            public static void subscribeMessage(long messageId)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException {
203                    getService().subscribeMessage(messageId);
204            }
205    
206            public static void unsubscribeMessage(long messageId)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    getService().unsubscribeMessage(messageId);
210            }
211    
212            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
213                    java.lang.String className, long classPK,
214                    java.lang.String permissionClassName, long permissionClassPK,
215                    long messageId, java.lang.String subject, java.lang.String body,
216                    com.liferay.portal.service.ServiceContext serviceContext)
217                    throws com.liferay.portal.kernel.exception.PortalException,
218                            com.liferay.portal.kernel.exception.SystemException {
219                    return getService()
220                                       .updateDiscussionMessage(className, classPK,
221                            permissionClassName, permissionClassPK, messageId, subject, body,
222                            serviceContext);
223            }
224    
225            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
226                    long messageId, java.lang.String subject, java.lang.String body,
227                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
228                    java.util.List<java.lang.String> existingFiles, double priority,
229                    boolean allowPingbacks,
230                    com.liferay.portal.service.ServiceContext serviceContext)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException {
233                    return getService()
234                                       .updateMessage(messageId, subject, body, files,
235                            existingFiles, priority, allowPingbacks, serviceContext);
236            }
237    
238            public static MBMessageService getService() {
239                    if (_service == null) {
240                            _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
241                    }
242    
243                    return _service;
244            }
245    
246            public void setService(MBMessageService service) {
247                    _service = service;
248            }
249    
250            private static MBMessageService _service;
251    }