1   /**
2    * Copyright (c) 2000-2008 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   * <p>
43   * <code>com.liferay.portlet.messageboards.service.MBMessageServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.messageboards.service.MBMessageService
50   * @see com.liferay.portlet.messageboards.service.MBMessageServiceFactory
51   *
52   */
53  public class MBMessageServiceUtil {
54      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
55          long groupId, java.lang.String className, long classPK, long threadId,
56          long parentMessageId, java.lang.String subject, java.lang.String body,
57          com.liferay.portal.theme.ThemeDisplay themeDisplay)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException, java.rmi.RemoteException {
60          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
61  
62          return mbMessageService.addDiscussionMessage(groupId, className,
63              classPK, threadId, parentMessageId, subject, body, themeDisplay);
64      }
65  
66      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
67          long categoryId, java.lang.String subject, java.lang.String body,
68          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
69          boolean anonymous, double priority, java.lang.String[] tagsEntries,
70          boolean addCommunityPermissions, boolean addGuestPermissions)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
74  
75          return mbMessageService.addMessage(categoryId, subject, body, files,
76              anonymous, priority, tagsEntries, addCommunityPermissions,
77              addGuestPermissions);
78      }
79  
80      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
81          long categoryId, java.lang.String subject, java.lang.String body,
82          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
83          boolean anonymous, double priority, java.lang.String[] tagsEntries,
84          java.lang.String[] communityPermissions,
85          java.lang.String[] guestPermissions)
86          throws com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException, java.rmi.RemoteException {
88          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
89  
90          return mbMessageService.addMessage(categoryId, subject, body, files,
91              anonymous, priority, tagsEntries, communityPermissions,
92              guestPermissions);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
96          long categoryId, java.lang.String subject, java.lang.String body,
97          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
98          boolean anonymous, double priority, java.lang.String[] tagsEntries,
99          javax.portlet.PortletPreferences prefs,
100         boolean addCommunityPermissions, boolean addGuestPermissions,
101         com.liferay.portal.theme.ThemeDisplay themeDisplay)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException, java.rmi.RemoteException {
104         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
105 
106         return mbMessageService.addMessage(categoryId, subject, body, files,
107             anonymous, priority, tagsEntries, prefs, addCommunityPermissions,
108             addGuestPermissions, themeDisplay);
109     }
110 
111     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
112         long categoryId, java.lang.String subject, java.lang.String body,
113         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
114         boolean anonymous, double priority, java.lang.String[] tagsEntries,
115         javax.portlet.PortletPreferences prefs,
116         java.lang.String[] communityPermissions,
117         java.lang.String[] guestPermissions,
118         com.liferay.portal.theme.ThemeDisplay themeDisplay)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException, java.rmi.RemoteException {
121         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
122 
123         return mbMessageService.addMessage(categoryId, subject, body, files,
124             anonymous, priority, tagsEntries, prefs, communityPermissions,
125             guestPermissions, themeDisplay);
126     }
127 
128     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
129         long categoryId, long threadId, long parentMessageId,
130         java.lang.String subject, java.lang.String body,
131         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
132         boolean anonymous, double priority, java.lang.String[] tagsEntries,
133         boolean addCommunityPermissions, boolean addGuestPermissions)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException, java.rmi.RemoteException {
136         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
137 
138         return mbMessageService.addMessage(categoryId, threadId,
139             parentMessageId, subject, body, files, anonymous, priority,
140             tagsEntries, addCommunityPermissions, addGuestPermissions);
141     }
142 
143     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
144         long categoryId, long threadId, long parentMessageId,
145         java.lang.String subject, java.lang.String body,
146         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
147         boolean anonymous, double priority, java.lang.String[] tagsEntries,
148         java.lang.String[] communityPermissions,
149         java.lang.String[] guestPermissions)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException, java.rmi.RemoteException {
152         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
153 
154         return mbMessageService.addMessage(categoryId, threadId,
155             parentMessageId, subject, body, files, anonymous, priority,
156             tagsEntries, communityPermissions, guestPermissions);
157     }
158 
159     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
160         long categoryId, long threadId, long parentMessageId,
161         java.lang.String subject, java.lang.String body,
162         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
163         boolean anonymous, double priority, java.lang.String[] tagsEntries,
164         javax.portlet.PortletPreferences prefs,
165         boolean addCommunityPermissions, boolean addGuestPermissions,
166         com.liferay.portal.theme.ThemeDisplay themeDisplay)
167         throws com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException, java.rmi.RemoteException {
169         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
170 
171         return mbMessageService.addMessage(categoryId, threadId,
172             parentMessageId, subject, body, files, anonymous, priority,
173             tagsEntries, prefs, addCommunityPermissions, addGuestPermissions,
174             themeDisplay);
175     }
176 
177     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
178         long categoryId, long threadId, long parentMessageId,
179         java.lang.String subject, java.lang.String body,
180         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
181         boolean anonymous, double priority, java.lang.String[] tagsEntries,
182         javax.portlet.PortletPreferences prefs,
183         java.lang.String[] communityPermissions,
184         java.lang.String[] guestPermissions,
185         com.liferay.portal.theme.ThemeDisplay themeDisplay)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException, java.rmi.RemoteException {
188         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
189 
190         return mbMessageService.addMessage(categoryId, threadId,
191             parentMessageId, subject, body, files, anonymous, priority,
192             tagsEntries, prefs, communityPermissions, guestPermissions,
193             themeDisplay);
194     }
195 
196     public static void deleteDiscussionMessage(long groupId,
197         java.lang.String className, long classPK, long messageId)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException, java.rmi.RemoteException {
200         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
201 
202         mbMessageService.deleteDiscussionMessage(groupId, className, classPK,
203             messageId);
204     }
205 
206     public static void deleteMessage(long messageId)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException, java.rmi.RemoteException {
209         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
210 
211         mbMessageService.deleteMessage(messageId);
212     }
213 
214     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
215         long categoryId, int start, int end)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException, java.rmi.RemoteException {
218         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
219 
220         return mbMessageService.getCategoryMessages(categoryId, start, end);
221     }
222 
223     public static int getCategoryMessagesCount(long categoryId)
224         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
225         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
226 
227         return mbMessageService.getCategoryMessagesCount(categoryId);
228     }
229 
230     public static java.lang.String getCategoryMessagesRSS(long categoryId,
231         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.PortalException,
236             com.liferay.portal.SystemException, java.rmi.RemoteException {
237         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
238 
239         return mbMessageService.getCategoryMessagesRSS(categoryId, max, type,
240             version, displayStyle, feedURL, entryURL, themeDisplay);
241     }
242 
243     public static java.lang.String getCompanyMessagesRSS(long companyId,
244         int max, java.lang.String type, double version,
245         java.lang.String displayStyle, java.lang.String feedURL,
246         java.lang.String entryURL,
247         com.liferay.portal.theme.ThemeDisplay themeDisplay)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException, java.rmi.RemoteException {
250         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
251 
252         return mbMessageService.getCompanyMessagesRSS(companyId, max, type,
253             version, displayStyle, feedURL, entryURL, themeDisplay);
254     }
255 
256     public static java.lang.String getGroupMessagesRSS(long groupId, int max,
257         java.lang.String type, double version, java.lang.String displayStyle,
258         java.lang.String feedURL, java.lang.String entryURL,
259         com.liferay.portal.theme.ThemeDisplay themeDisplay)
260         throws com.liferay.portal.PortalException,
261             com.liferay.portal.SystemException, java.rmi.RemoteException {
262         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
263 
264         return mbMessageService.getGroupMessagesRSS(groupId, max, type,
265             version, displayStyle, feedURL, entryURL, themeDisplay);
266     }
267 
268     public static java.lang.String getGroupMessagesRSS(long groupId,
269         long userId, int max, java.lang.String type, double version,
270         java.lang.String displayStyle, java.lang.String feedURL,
271         java.lang.String entryURL,
272         com.liferay.portal.theme.ThemeDisplay themeDisplay)
273         throws com.liferay.portal.PortalException,
274             com.liferay.portal.SystemException, java.rmi.RemoteException {
275         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
276 
277         return mbMessageService.getGroupMessagesRSS(groupId, userId, max, type,
278             version, displayStyle, feedURL, entryURL, themeDisplay);
279     }
280 
281     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
282         long messageId)
283         throws com.liferay.portal.PortalException,
284             com.liferay.portal.SystemException, java.rmi.RemoteException {
285         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
286 
287         return mbMessageService.getMessage(messageId);
288     }
289 
290     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
291         long messageId)
292         throws com.liferay.portal.PortalException,
293             com.liferay.portal.SystemException, java.rmi.RemoteException {
294         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
295 
296         return mbMessageService.getMessageDisplay(messageId);
297     }
298 
299     public static java.lang.String getThreadMessagesRSS(long threadId, int max,
300         java.lang.String type, double version, java.lang.String displayStyle,
301         java.lang.String feedURL, java.lang.String entryURL,
302         com.liferay.portal.theme.ThemeDisplay themeDisplay)
303         throws com.liferay.portal.PortalException,
304             com.liferay.portal.SystemException, java.rmi.RemoteException {
305         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
306 
307         return mbMessageService.getThreadMessagesRSS(threadId, max, type,
308             version, displayStyle, feedURL, entryURL, themeDisplay);
309     }
310 
311     public static void subscribeMessage(long messageId)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException, java.rmi.RemoteException {
314         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
315 
316         mbMessageService.subscribeMessage(messageId);
317     }
318 
319     public static void unsubscribeMessage(long messageId)
320         throws com.liferay.portal.PortalException,
321             com.liferay.portal.SystemException, java.rmi.RemoteException {
322         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
323 
324         mbMessageService.unsubscribeMessage(messageId);
325     }
326 
327     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
328         long groupId, java.lang.String className, long classPK, long messageId,
329         java.lang.String subject, java.lang.String body)
330         throws com.liferay.portal.PortalException,
331             com.liferay.portal.SystemException, java.rmi.RemoteException {
332         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
333 
334         return mbMessageService.updateDiscussionMessage(groupId, className,
335             classPK, messageId, subject, body);
336     }
337 
338     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
339         long messageId, java.lang.String subject, java.lang.String body,
340         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
341         java.util.List<String> existingFiles, double priority,
342         java.lang.String[] tagsEntries)
343         throws com.liferay.portal.PortalException,
344             com.liferay.portal.SystemException, java.rmi.RemoteException {
345         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
346 
347         return mbMessageService.updateMessage(messageId, subject, body, files,
348             existingFiles, priority, tagsEntries);
349     }
350 
351     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
352         long messageId, java.lang.String subject, java.lang.String body,
353         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
354         java.util.List<String> existingFiles, double priority,
355         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
356         com.liferay.portal.theme.ThemeDisplay themeDisplay)
357         throws com.liferay.portal.PortalException,
358             com.liferay.portal.SystemException, java.rmi.RemoteException {
359         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
360 
361         return mbMessageService.updateMessage(messageId, subject, body, files,
362             existingFiles, priority, tagsEntries, prefs, themeDisplay);
363     }
364 }