1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.service;
24  
25  
26  /**
27   * <a href="MBMessageServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.messageboards.service.MBMessageService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.messageboards.service.MBMessageService
45   *
46   */
47  public class MBMessageServiceUtil {
48      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
49          long groupId, java.lang.String className, long classPK, long threadId,
50          long parentMessageId, java.lang.String subject, java.lang.String body,
51          com.liferay.portal.theme.ThemeDisplay themeDisplay)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException, java.rmi.RemoteException {
54          return getService()
55                     .addDiscussionMessage(groupId, className, classPK, threadId,
56              parentMessageId, subject, body, themeDisplay);
57      }
58  
59      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
60          long categoryId, java.lang.String subject, java.lang.String body,
61          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
62          boolean anonymous, double priority, java.lang.String[] tagsEntries,
63          boolean addCommunityPermissions, boolean addGuestPermissions)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException, java.rmi.RemoteException {
66          return getService()
67                     .addMessage(categoryId, subject, body, files, anonymous,
68              priority, tagsEntries, addCommunityPermissions, addGuestPermissions);
69      }
70  
71      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
72          long categoryId, java.lang.String subject, java.lang.String body,
73          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
74          boolean anonymous, double priority, java.lang.String[] tagsEntries,
75          java.lang.String[] communityPermissions,
76          java.lang.String[] guestPermissions)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException, java.rmi.RemoteException {
79          return getService()
80                     .addMessage(categoryId, subject, body, files, anonymous,
81              priority, tagsEntries, communityPermissions, guestPermissions);
82      }
83  
84      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
85          long categoryId, java.lang.String subject, java.lang.String body,
86          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
87          boolean anonymous, double priority, java.lang.String[] tagsEntries,
88          javax.portlet.PortletPreferences prefs,
89          boolean addCommunityPermissions, boolean addGuestPermissions,
90          com.liferay.portal.theme.ThemeDisplay themeDisplay)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException, java.rmi.RemoteException {
93          return getService()
94                     .addMessage(categoryId, subject, body, files, anonymous,
95              priority, tagsEntries, prefs, addCommunityPermissions,
96              addGuestPermissions, themeDisplay);
97      }
98  
99      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
100         long categoryId, java.lang.String subject, java.lang.String body,
101         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
102         boolean anonymous, double priority, java.lang.String[] tagsEntries,
103         javax.portlet.PortletPreferences prefs,
104         java.lang.String[] communityPermissions,
105         java.lang.String[] guestPermissions,
106         com.liferay.portal.theme.ThemeDisplay themeDisplay)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException, java.rmi.RemoteException {
109         return getService()
110                    .addMessage(categoryId, subject, body, files, anonymous,
111             priority, tagsEntries, prefs, communityPermissions,
112             guestPermissions, themeDisplay);
113     }
114 
115     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
116         long categoryId, long threadId, long parentMessageId,
117         java.lang.String subject, java.lang.String body,
118         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
119         boolean anonymous, double priority, java.lang.String[] tagsEntries,
120         boolean addCommunityPermissions, boolean addGuestPermissions)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException, java.rmi.RemoteException {
123         return getService()
124                    .addMessage(categoryId, threadId, parentMessageId, subject,
125             body, files, anonymous, priority, tagsEntries,
126             addCommunityPermissions, addGuestPermissions);
127     }
128 
129     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
130         long categoryId, long threadId, long parentMessageId,
131         java.lang.String subject, java.lang.String body,
132         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
133         boolean anonymous, double priority, java.lang.String[] tagsEntries,
134         java.lang.String[] communityPermissions,
135         java.lang.String[] guestPermissions)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException, java.rmi.RemoteException {
138         return getService()
139                    .addMessage(categoryId, threadId, parentMessageId, subject,
140             body, files, anonymous, priority, tagsEntries,
141             communityPermissions, guestPermissions);
142     }
143 
144     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
145         long categoryId, long threadId, long parentMessageId,
146         java.lang.String subject, java.lang.String body,
147         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
148         boolean anonymous, double priority, java.lang.String[] tagsEntries,
149         javax.portlet.PortletPreferences prefs,
150         boolean addCommunityPermissions, boolean addGuestPermissions,
151         com.liferay.portal.theme.ThemeDisplay themeDisplay)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException, java.rmi.RemoteException {
154         return getService()
155                    .addMessage(categoryId, threadId, parentMessageId, subject,
156             body, files, anonymous, priority, tagsEntries, prefs,
157             addCommunityPermissions, addGuestPermissions, themeDisplay);
158     }
159 
160     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
161         long categoryId, long threadId, long parentMessageId,
162         java.lang.String subject, java.lang.String body,
163         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
164         boolean anonymous, double priority, java.lang.String[] tagsEntries,
165         javax.portlet.PortletPreferences prefs,
166         java.lang.String[] communityPermissions,
167         java.lang.String[] guestPermissions,
168         com.liferay.portal.theme.ThemeDisplay themeDisplay)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException, java.rmi.RemoteException {
171         return getService()
172                    .addMessage(categoryId, threadId, parentMessageId, subject,
173             body, files, anonymous, priority, tagsEntries, prefs,
174             communityPermissions, guestPermissions, themeDisplay);
175     }
176 
177     public static void deleteDiscussionMessage(long groupId,
178         java.lang.String className, long classPK, long messageId)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException, java.rmi.RemoteException {
181         getService()
182             .deleteDiscussionMessage(groupId, className, classPK, messageId);
183     }
184 
185     public static void deleteMessage(long messageId)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException, java.rmi.RemoteException {
188         getService().deleteMessage(messageId);
189     }
190 
191     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
192         long categoryId, int start, int end)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException, java.rmi.RemoteException {
195         return getService().getCategoryMessages(categoryId, start, end);
196     }
197 
198     public static int getCategoryMessagesCount(long categoryId)
199         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
200         return getService().getCategoryMessagesCount(categoryId);
201     }
202 
203     public static java.lang.String getCategoryMessagesRSS(long categoryId,
204         int max, java.lang.String type, double version,
205         java.lang.String displayStyle, java.lang.String feedURL,
206         java.lang.String entryURL,
207         com.liferay.portal.theme.ThemeDisplay themeDisplay)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException, java.rmi.RemoteException {
210         return getService()
211                    .getCategoryMessagesRSS(categoryId, max, type, version,
212             displayStyle, feedURL, entryURL, themeDisplay);
213     }
214 
215     public static java.lang.String getCompanyMessagesRSS(long companyId,
216         int max, java.lang.String type, double version,
217         java.lang.String displayStyle, java.lang.String feedURL,
218         java.lang.String entryURL,
219         com.liferay.portal.theme.ThemeDisplay themeDisplay)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException, java.rmi.RemoteException {
222         return getService()
223                    .getCompanyMessagesRSS(companyId, max, type, version,
224             displayStyle, feedURL, entryURL, themeDisplay);
225     }
226 
227     public static java.lang.String getGroupMessagesRSS(long groupId, int max,
228         java.lang.String type, double version, java.lang.String displayStyle,
229         java.lang.String feedURL, java.lang.String entryURL,
230         com.liferay.portal.theme.ThemeDisplay themeDisplay)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException, java.rmi.RemoteException {
233         return getService()
234                    .getGroupMessagesRSS(groupId, max, type, version,
235             displayStyle, feedURL, entryURL, themeDisplay);
236     }
237 
238     public static java.lang.String getGroupMessagesRSS(long groupId,
239         long userId, int max, java.lang.String type, double version,
240         java.lang.String displayStyle, java.lang.String feedURL,
241         java.lang.String entryURL,
242         com.liferay.portal.theme.ThemeDisplay themeDisplay)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException, java.rmi.RemoteException {
245         return getService()
246                    .getGroupMessagesRSS(groupId, userId, max, type, version,
247             displayStyle, feedURL, entryURL, themeDisplay);
248     }
249 
250     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
251         long messageId)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException, java.rmi.RemoteException {
254         return getService().getMessage(messageId);
255     }
256 
257     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
258         long messageId)
259         throws com.liferay.portal.PortalException,
260             com.liferay.portal.SystemException, java.rmi.RemoteException {
261         return getService().getMessageDisplay(messageId);
262     }
263 
264     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
265         long messageId, java.lang.String threadView)
266         throws com.liferay.portal.PortalException,
267             com.liferay.portal.SystemException, java.rmi.RemoteException {
268         return getService().getMessageDisplay(messageId, threadView);
269     }
270 
271     public static java.lang.String getThreadMessagesRSS(long threadId, int max,
272         java.lang.String type, double version, java.lang.String displayStyle,
273         java.lang.String feedURL, java.lang.String entryURL,
274         com.liferay.portal.theme.ThemeDisplay themeDisplay)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException, java.rmi.RemoteException {
277         return getService()
278                    .getThreadMessagesRSS(threadId, max, type, version,
279             displayStyle, feedURL, entryURL, themeDisplay);
280     }
281 
282     public static void subscribeMessage(long messageId)
283         throws com.liferay.portal.PortalException,
284             com.liferay.portal.SystemException, java.rmi.RemoteException {
285         getService().subscribeMessage(messageId);
286     }
287 
288     public static void unsubscribeMessage(long messageId)
289         throws com.liferay.portal.PortalException,
290             com.liferay.portal.SystemException, java.rmi.RemoteException {
291         getService().unsubscribeMessage(messageId);
292     }
293 
294     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
295         long groupId, java.lang.String className, long classPK, long messageId,
296         java.lang.String subject, java.lang.String body)
297         throws com.liferay.portal.PortalException,
298             com.liferay.portal.SystemException, java.rmi.RemoteException {
299         return getService()
300                    .updateDiscussionMessage(groupId, className, classPK,
301             messageId, subject, body);
302     }
303 
304     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
305         long messageId, java.lang.String subject, java.lang.String body,
306         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
307         java.util.List<String> existingFiles, double priority,
308         java.lang.String[] tagsEntries)
309         throws com.liferay.portal.PortalException,
310             com.liferay.portal.SystemException, java.rmi.RemoteException {
311         return getService()
312                    .updateMessage(messageId, subject, body, files,
313             existingFiles, priority, tagsEntries);
314     }
315 
316     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
317         long messageId, java.lang.String subject, java.lang.String body,
318         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
319         java.util.List<String> existingFiles, double priority,
320         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
321         com.liferay.portal.theme.ThemeDisplay themeDisplay)
322         throws com.liferay.portal.PortalException,
323             com.liferay.portal.SystemException, java.rmi.RemoteException {
324         return getService()
325                    .updateMessage(messageId, subject, body, files,
326             existingFiles, priority, tagsEntries, prefs, themeDisplay);
327     }
328 
329     public static MBMessageService getService() {
330         if (_service == null) {
331             throw new RuntimeException("MBMessageService is not set");
332         }
333 
334         return _service;
335     }
336 
337     public void setService(MBMessageService service) {
338         _service = service;
339     }
340 
341     private static MBMessageService _service;
342 }