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 begin, 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, begin, end);
221     }
222 
223     public static int getCategoryMessagesCount(long categoryId)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException, java.rmi.RemoteException {
226         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
227 
228         return mbMessageService.getCategoryMessagesCount(categoryId);
229     }
230 
231     public static java.lang.String getCategoryMessagesRSS(long categoryId,
232         int max, java.lang.String type, double version,
233         java.lang.String displayStyle, java.lang.String feedURL,
234         java.lang.String entryURL)
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);
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         throws com.liferay.portal.PortalException,
248             com.liferay.portal.SystemException, java.rmi.RemoteException {
249         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
250 
251         return mbMessageService.getCompanyMessagesRSS(companyId, max, type,
252             version, displayStyle, feedURL, entryURL);
253     }
254 
255     public static java.lang.String getGroupMessagesRSS(long groupId, int max,
256         java.lang.String type, double version, java.lang.String displayStyle,
257         java.lang.String feedURL, java.lang.String entryURL)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException, java.rmi.RemoteException {
260         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
261 
262         return mbMessageService.getGroupMessagesRSS(groupId, max, type,
263             version, displayStyle, feedURL, entryURL);
264     }
265 
266     public static java.lang.String getGroupMessagesRSS(long groupId,
267         long userId, int max, java.lang.String type, double version,
268         java.lang.String displayStyle, java.lang.String feedURL,
269         java.lang.String entryURL)
270         throws com.liferay.portal.PortalException,
271             com.liferay.portal.SystemException, java.rmi.RemoteException {
272         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
273 
274         return mbMessageService.getGroupMessagesRSS(groupId, userId, max, type,
275             version, displayStyle, feedURL, entryURL);
276     }
277 
278     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
279         long messageId)
280         throws com.liferay.portal.PortalException,
281             com.liferay.portal.SystemException, java.rmi.RemoteException {
282         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
283 
284         return mbMessageService.getMessage(messageId);
285     }
286 
287     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
288         long messageId)
289         throws com.liferay.portal.PortalException,
290             com.liferay.portal.SystemException, java.rmi.RemoteException {
291         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
292 
293         return mbMessageService.getMessageDisplay(messageId);
294     }
295 
296     public static java.lang.String getThreadMessagesRSS(long threadId, int max,
297         java.lang.String type, double version, java.lang.String displayStyle,
298         java.lang.String feedURL, java.lang.String entryURL)
299         throws com.liferay.portal.PortalException,
300             com.liferay.portal.SystemException, java.rmi.RemoteException {
301         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
302 
303         return mbMessageService.getThreadMessagesRSS(threadId, max, type,
304             version, displayStyle, feedURL, entryURL);
305     }
306 
307     public static void subscribeMessage(long messageId)
308         throws com.liferay.portal.PortalException,
309             com.liferay.portal.SystemException, java.rmi.RemoteException {
310         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
311 
312         mbMessageService.subscribeMessage(messageId);
313     }
314 
315     public static void unsubscribeMessage(long messageId)
316         throws com.liferay.portal.PortalException,
317             com.liferay.portal.SystemException, java.rmi.RemoteException {
318         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
319 
320         mbMessageService.unsubscribeMessage(messageId);
321     }
322 
323     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
324         long groupId, java.lang.String className, long classPK, long messageId,
325         java.lang.String subject, java.lang.String body)
326         throws com.liferay.portal.PortalException,
327             com.liferay.portal.SystemException, java.rmi.RemoteException {
328         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
329 
330         return mbMessageService.updateDiscussionMessage(groupId, className,
331             classPK, messageId, subject, body);
332     }
333 
334     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
335         long messageId, java.lang.String subject, java.lang.String body,
336         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
337         java.util.List<String> existingFiles, double priority,
338         java.lang.String[] tagsEntries)
339         throws com.liferay.portal.PortalException,
340             com.liferay.portal.SystemException, java.rmi.RemoteException {
341         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
342 
343         return mbMessageService.updateMessage(messageId, subject, body, files,
344             existingFiles, priority, tagsEntries);
345     }
346 
347     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
348         long messageId, java.lang.String subject, java.lang.String body,
349         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
350         java.util.List<String> existingFiles, double priority,
351         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
352         com.liferay.portal.theme.ThemeDisplay themeDisplay)
353         throws com.liferay.portal.PortalException,
354             com.liferay.portal.SystemException, java.rmi.RemoteException {
355         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
356 
357         return mbMessageService.updateMessage(messageId, subject, body, files,
358             existingFiles, priority, tagsEntries, prefs, themeDisplay);
359     }
360 }