1   /**
2    * Copyright (c) 2000-2007 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   * <a href="MBMessageServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.messageboards.service.MBMessageService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.messageboards.service.MBMessageServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.messageboards.service.MBMessageService
48   * @see com.liferay.portlet.messageboards.service.MBMessageServiceFactory
49   *
50   */
51  public class MBMessageServiceUtil {
52      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
53          long groupId, java.lang.String className, long classPK, long threadId,
54          long parentMessageId, java.lang.String subject, java.lang.String body,
55          com.liferay.portal.theme.ThemeDisplay themeDisplay)
56          throws com.liferay.portal.PortalException, 
57              com.liferay.portal.SystemException, java.rmi.RemoteException {
58          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
59  
60          return mbMessageService.addDiscussionMessage(groupId, className,
61              classPK, threadId, parentMessageId, subject, body, themeDisplay);
62      }
63  
64      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
65          long categoryId, java.lang.String subject, java.lang.String body,
66          java.util.List files, boolean anonymous, double priority,
67          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
68          boolean addGuestPermissions)
69          throws com.liferay.portal.PortalException, 
70              com.liferay.portal.SystemException, java.rmi.RemoteException {
71          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
72  
73          return mbMessageService.addMessage(categoryId, subject, body, files,
74              anonymous, priority, tagsEntries, addCommunityPermissions,
75              addGuestPermissions);
76      }
77  
78      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
79          long categoryId, java.lang.String subject, java.lang.String body,
80          java.util.List files, boolean anonymous, double priority,
81          java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
82          boolean addCommunityPermissions, boolean addGuestPermissions)
83          throws com.liferay.portal.PortalException, 
84              com.liferay.portal.SystemException, java.rmi.RemoteException {
85          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
86  
87          return mbMessageService.addMessage(categoryId, subject, body, files,
88              anonymous, priority, tagsEntries, prefs, addCommunityPermissions,
89              addGuestPermissions);
90      }
91  
92      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
93          long categoryId, long threadId, long parentMessageId,
94          java.lang.String subject, java.lang.String body, java.util.List files,
95          boolean anonymous, double priority, java.lang.String[] tagsEntries,
96          boolean addCommunityPermissions, boolean addGuestPermissions)
97          throws com.liferay.portal.PortalException, 
98              com.liferay.portal.SystemException, java.rmi.RemoteException {
99          MBMessageService mbMessageService = MBMessageServiceFactory.getService();
100 
101         return mbMessageService.addMessage(categoryId, threadId,
102             parentMessageId, subject, body, files, anonymous, priority,
103             tagsEntries, addCommunityPermissions, addGuestPermissions);
104     }
105 
106     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
107         long categoryId, long threadId, long parentMessageId,
108         java.lang.String subject, java.lang.String body, java.util.List files,
109         boolean anonymous, double priority, java.lang.String[] tagsEntries,
110         javax.portlet.PortletPreferences prefs,
111         boolean addCommunityPermissions, boolean addGuestPermissions)
112         throws com.liferay.portal.PortalException, 
113             com.liferay.portal.SystemException, java.rmi.RemoteException {
114         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
115 
116         return mbMessageService.addMessage(categoryId, threadId,
117             parentMessageId, subject, body, files, anonymous, priority,
118             tagsEntries, prefs, addCommunityPermissions, addGuestPermissions);
119     }
120 
121     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
122         long categoryId, java.lang.String subject, java.lang.String body,
123         java.util.List files, boolean anonymous, double priority,
124         java.lang.String[] tagsEntries,
125         java.lang.String[] communityPermissions,
126         java.lang.String[] guestPermissions)
127         throws com.liferay.portal.PortalException, 
128             com.liferay.portal.SystemException, java.rmi.RemoteException {
129         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
130 
131         return mbMessageService.addMessage(categoryId, subject, body, files,
132             anonymous, priority, tagsEntries, communityPermissions,
133             guestPermissions);
134     }
135 
136     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
137         long categoryId, java.lang.String subject, java.lang.String body,
138         java.util.List files, boolean anonymous, double priority,
139         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
140         java.lang.String[] communityPermissions,
141         java.lang.String[] guestPermissions)
142         throws com.liferay.portal.PortalException, 
143             com.liferay.portal.SystemException, java.rmi.RemoteException {
144         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
145 
146         return mbMessageService.addMessage(categoryId, subject, body, files,
147             anonymous, priority, tagsEntries, prefs, communityPermissions,
148             guestPermissions);
149     }
150 
151     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
152         long categoryId, long threadId, long parentMessageId,
153         java.lang.String subject, java.lang.String body, java.util.List files,
154         boolean anonymous, double priority, java.lang.String[] tagsEntries,
155         java.lang.String[] communityPermissions,
156         java.lang.String[] guestPermissions)
157         throws com.liferay.portal.PortalException, 
158             com.liferay.portal.SystemException, java.rmi.RemoteException {
159         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
160 
161         return mbMessageService.addMessage(categoryId, threadId,
162             parentMessageId, subject, body, files, anonymous, priority,
163             tagsEntries, communityPermissions, guestPermissions);
164     }
165 
166     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
167         long categoryId, long threadId, long parentMessageId,
168         java.lang.String subject, java.lang.String body, java.util.List files,
169         boolean anonymous, double priority, java.lang.String[] tagsEntries,
170         javax.portlet.PortletPreferences prefs,
171         java.lang.String[] communityPermissions,
172         java.lang.String[] guestPermissions)
173         throws com.liferay.portal.PortalException, 
174             com.liferay.portal.SystemException, java.rmi.RemoteException {
175         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
176 
177         return mbMessageService.addMessage(categoryId, threadId,
178             parentMessageId, subject, body, files, anonymous, priority,
179             tagsEntries, prefs, communityPermissions, guestPermissions);
180     }
181 
182     public static void deleteDiscussionMessage(long groupId,
183         java.lang.String className, long classPK, long messageId)
184         throws com.liferay.portal.PortalException, 
185             com.liferay.portal.SystemException, java.rmi.RemoteException {
186         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
187         mbMessageService.deleteDiscussionMessage(groupId, className, classPK,
188             messageId);
189     }
190 
191     public static void deleteMessage(long messageId)
192         throws com.liferay.portal.PortalException, 
193             com.liferay.portal.SystemException, java.rmi.RemoteException {
194         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
195         mbMessageService.deleteMessage(messageId);
196     }
197 
198     public static java.lang.String getCategoryMessagesRSS(long categoryId,
199         int max, java.lang.String type, double version,
200         java.lang.String feedURL, java.lang.String entryURL,
201         javax.portlet.PortletPreferences prefs)
202         throws com.liferay.portal.PortalException, 
203             com.liferay.portal.SystemException, java.rmi.RemoteException {
204         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
205 
206         return mbMessageService.getCategoryMessagesRSS(categoryId, max, type,
207             version, feedURL, entryURL, prefs);
208     }
209 
210     public static java.lang.String getCompanyMessagesRSS(long companyId,
211         int max, java.lang.String type, double version,
212         java.lang.String feedURL, java.lang.String entryURL,
213         javax.portlet.PortletPreferences prefs)
214         throws com.liferay.portal.PortalException, 
215             com.liferay.portal.SystemException, java.rmi.RemoteException {
216         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
217 
218         return mbMessageService.getCompanyMessagesRSS(companyId, max, type,
219             version, feedURL, entryURL, prefs);
220     }
221 
222     public static java.lang.String getGroupMessagesRSS(long groupId, int max,
223         java.lang.String type, double version, java.lang.String feedURL,
224         java.lang.String entryURL, javax.portlet.PortletPreferences prefs)
225         throws com.liferay.portal.PortalException, 
226             com.liferay.portal.SystemException, java.rmi.RemoteException {
227         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
228 
229         return mbMessageService.getGroupMessagesRSS(groupId, max, type,
230             version, feedURL, entryURL, prefs);
231     }
232 
233     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
234         long messageId)
235         throws com.liferay.portal.PortalException, 
236             com.liferay.portal.SystemException, java.rmi.RemoteException {
237         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
238 
239         return mbMessageService.getMessage(messageId);
240     }
241 
242     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
243         long messageId)
244         throws com.liferay.portal.PortalException, 
245             com.liferay.portal.SystemException, java.rmi.RemoteException {
246         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
247 
248         return mbMessageService.getMessageDisplay(messageId);
249     }
250 
251     public static java.lang.String getThreadMessagesRSS(long threadId, int max,
252         java.lang.String type, double version, java.lang.String feedURL,
253         java.lang.String entryURL, javax.portlet.PortletPreferences prefs)
254         throws com.liferay.portal.PortalException, 
255             com.liferay.portal.SystemException, java.rmi.RemoteException {
256         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
257 
258         return mbMessageService.getThreadMessagesRSS(threadId, max, type,
259             version, feedURL, entryURL, prefs);
260     }
261 
262     public static void subscribeMessage(long messageId)
263         throws com.liferay.portal.PortalException, 
264             com.liferay.portal.SystemException, java.rmi.RemoteException {
265         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
266         mbMessageService.subscribeMessage(messageId);
267     }
268 
269     public static void unsubscribeMessage(long messageId)
270         throws com.liferay.portal.PortalException, 
271             com.liferay.portal.SystemException, java.rmi.RemoteException {
272         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
273         mbMessageService.unsubscribeMessage(messageId);
274     }
275 
276     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
277         long groupId, java.lang.String className, long classPK, long messageId,
278         java.lang.String subject, java.lang.String body)
279         throws com.liferay.portal.PortalException, 
280             com.liferay.portal.SystemException, java.rmi.RemoteException {
281         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
282 
283         return mbMessageService.updateDiscussionMessage(groupId, className,
284             classPK, messageId, subject, body);
285     }
286 
287     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
288         long messageId, long categoryId, java.lang.String subject,
289         java.lang.String body, java.util.List files, double priority,
290         java.lang.String[] tagsEntries)
291         throws com.liferay.portal.PortalException, 
292             com.liferay.portal.SystemException, java.rmi.RemoteException {
293         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
294 
295         return mbMessageService.updateMessage(messageId, categoryId, subject,
296             body, files, priority, tagsEntries);
297     }
298 
299     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
300         long messageId, long categoryId, java.lang.String subject,
301         java.lang.String body, java.util.List files, double priority,
302         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs)
303         throws com.liferay.portal.PortalException, 
304             com.liferay.portal.SystemException, java.rmi.RemoteException {
305         MBMessageService mbMessageService = MBMessageServiceFactory.getService();
306 
307         return mbMessageService.updateMessage(messageId, categoryId, subject,
308             body, files, priority, tagsEntries, prefs);
309     }
310 }