1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="MBMessageServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link MBMessageService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       MBMessageService
37   * @generated
38   */
39  public class MBMessageServiceUtil {
40      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
41          long groupId, java.lang.String className, long classPK, long threadId,
42          long parentMessageId, java.lang.String subject, java.lang.String body,
43          com.liferay.portal.theme.ThemeDisplay themeDisplay)
44          throws com.liferay.portal.PortalException,
45              com.liferay.portal.SystemException, java.rmi.RemoteException {
46          return getService()
47                     .addDiscussionMessage(groupId, className, classPK, threadId,
48              parentMessageId, subject, body, themeDisplay);
49      }
50  
51      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
52          long categoryId, long threadId, long parentMessageId,
53          java.lang.String subject, java.lang.String body,
54          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
55          boolean anonymous, double priority, java.lang.String[] tagsEntries,
56          boolean addCommunityPermissions, boolean addGuestPermissions)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException, java.rmi.RemoteException {
59          return getService()
60                     .addMessage(categoryId, threadId, parentMessageId, subject,
61              body, files, anonymous, priority, tagsEntries,
62              addCommunityPermissions, addGuestPermissions);
63      }
64  
65      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
66          long categoryId, long threadId, long parentMessageId,
67          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          javax.portlet.PortletPreferences prefs,
71          boolean addCommunityPermissions, boolean addGuestPermissions,
72          com.liferay.portal.theme.ThemeDisplay themeDisplay)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException, java.rmi.RemoteException {
75          return getService()
76                     .addMessage(categoryId, threadId, parentMessageId, subject,
77              body, files, anonymous, priority, tagsEntries, prefs,
78              addCommunityPermissions, addGuestPermissions, themeDisplay);
79      }
80  
81      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
82          long categoryId, long threadId, long parentMessageId,
83          java.lang.String subject, java.lang.String body,
84          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
85          boolean anonymous, double priority, java.lang.String[] tagsEntries,
86          javax.portlet.PortletPreferences prefs,
87          java.lang.String[] communityPermissions,
88          java.lang.String[] guestPermissions,
89          com.liferay.portal.theme.ThemeDisplay themeDisplay)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          return getService()
93                     .addMessage(categoryId, threadId, parentMessageId, subject,
94              body, files, anonymous, priority, tagsEntries, prefs,
95              communityPermissions, guestPermissions, themeDisplay);
96      }
97  
98      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
99          long categoryId, long threadId, long parentMessageId,
100         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         java.lang.String[] communityPermissions,
104         java.lang.String[] guestPermissions)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException, java.rmi.RemoteException {
107         return getService()
108                    .addMessage(categoryId, threadId, parentMessageId, subject,
109             body, files, anonymous, priority, tagsEntries,
110             communityPermissions, guestPermissions);
111     }
112 
113     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
114         long categoryId, java.lang.String subject, java.lang.String body,
115         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
116         boolean anonymous, double priority, java.lang.String[] tagsEntries,
117         boolean addCommunityPermissions, boolean addGuestPermissions)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException, java.rmi.RemoteException {
120         return getService()
121                    .addMessage(categoryId, subject, body, files, anonymous,
122             priority, tagsEntries, addCommunityPermissions, addGuestPermissions);
123     }
124 
125     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
126         long categoryId, java.lang.String subject, java.lang.String body,
127         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
128         boolean anonymous, double priority, java.lang.String[] tagsEntries,
129         javax.portlet.PortletPreferences prefs,
130         boolean addCommunityPermissions, boolean addGuestPermissions,
131         com.liferay.portal.theme.ThemeDisplay themeDisplay)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException, java.rmi.RemoteException {
134         return getService()
135                    .addMessage(categoryId, subject, body, files, anonymous,
136             priority, tagsEntries, prefs, addCommunityPermissions,
137             addGuestPermissions, themeDisplay);
138     }
139 
140     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
141         long categoryId, java.lang.String subject, java.lang.String body,
142         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
143         boolean anonymous, double priority, java.lang.String[] tagsEntries,
144         javax.portlet.PortletPreferences prefs,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions,
147         com.liferay.portal.theme.ThemeDisplay themeDisplay)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException, java.rmi.RemoteException {
150         return getService()
151                    .addMessage(categoryId, subject, body, files, anonymous,
152             priority, tagsEntries, prefs, communityPermissions,
153             guestPermissions, themeDisplay);
154     }
155 
156     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
157         long categoryId, java.lang.String subject, java.lang.String body,
158         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
159         boolean anonymous, double priority, java.lang.String[] tagsEntries,
160         java.lang.String[] communityPermissions,
161         java.lang.String[] guestPermissions)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException, java.rmi.RemoteException {
164         return getService()
165                    .addMessage(categoryId, subject, body, files, anonymous,
166             priority, tagsEntries, communityPermissions, guestPermissions);
167     }
168 
169     public static void deleteDiscussionMessage(long groupId,
170         java.lang.String className, long classPK, long messageId)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException, java.rmi.RemoteException {
173         getService()
174             .deleteDiscussionMessage(groupId, className, classPK, messageId);
175     }
176 
177     public static void deleteMessage(long messageId)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException, java.rmi.RemoteException {
180         getService().deleteMessage(messageId);
181     }
182 
183     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
184         long categoryId, int start, int end)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException, java.rmi.RemoteException {
187         return getService().getCategoryMessages(categoryId, start, end);
188     }
189 
190     public static int getCategoryMessagesCount(long categoryId)
191         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
192         return getService().getCategoryMessagesCount(categoryId);
193     }
194 
195     public static java.lang.String getCategoryMessagesRSS(long categoryId,
196         int max, java.lang.String type, double version,
197         java.lang.String displayStyle, java.lang.String feedURL,
198         java.lang.String entryURL,
199         com.liferay.portal.theme.ThemeDisplay themeDisplay)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException, java.rmi.RemoteException {
202         return getService()
203                    .getCategoryMessagesRSS(categoryId, max, type, version,
204             displayStyle, feedURL, entryURL, themeDisplay);
205     }
206 
207     public static java.lang.String getCompanyMessagesRSS(long companyId,
208         int max, java.lang.String type, double version,
209         java.lang.String displayStyle, java.lang.String feedURL,
210         java.lang.String entryURL,
211         com.liferay.portal.theme.ThemeDisplay themeDisplay)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException, java.rmi.RemoteException {
214         return getService()
215                    .getCompanyMessagesRSS(companyId, max, type, version,
216             displayStyle, feedURL, entryURL, themeDisplay);
217     }
218 
219     public static java.lang.String getGroupMessagesRSS(long groupId, int max,
220         java.lang.String type, double version, java.lang.String displayStyle,
221         java.lang.String feedURL, java.lang.String entryURL,
222         com.liferay.portal.theme.ThemeDisplay themeDisplay)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException, java.rmi.RemoteException {
225         return getService()
226                    .getGroupMessagesRSS(groupId, max, type, version,
227             displayStyle, feedURL, entryURL, themeDisplay);
228     }
229 
230     public static java.lang.String getGroupMessagesRSS(long groupId,
231         long userId, 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         return getService()
238                    .getGroupMessagesRSS(groupId, userId, max, type, version,
239             displayStyle, feedURL, entryURL, themeDisplay);
240     }
241 
242     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
243         long messageId)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException, java.rmi.RemoteException {
246         return getService().getMessage(messageId);
247     }
248 
249     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
250         long messageId)
251         throws com.liferay.portal.PortalException,
252             com.liferay.portal.SystemException, java.rmi.RemoteException {
253         return getService().getMessageDisplay(messageId);
254     }
255 
256     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
257         long messageId, java.lang.String threadView)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException, java.rmi.RemoteException {
260         return getService().getMessageDisplay(messageId, threadView);
261     }
262 
263     public static java.lang.String getThreadMessagesRSS(long threadId, int max,
264         java.lang.String type, double version, java.lang.String displayStyle,
265         java.lang.String feedURL, java.lang.String entryURL,
266         com.liferay.portal.theme.ThemeDisplay themeDisplay)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException, java.rmi.RemoteException {
269         return getService()
270                    .getThreadMessagesRSS(threadId, max, type, version,
271             displayStyle, feedURL, entryURL, themeDisplay);
272     }
273 
274     public static void subscribeMessage(long messageId)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException, java.rmi.RemoteException {
277         getService().subscribeMessage(messageId);
278     }
279 
280     public static void unsubscribeMessage(long messageId)
281         throws com.liferay.portal.PortalException,
282             com.liferay.portal.SystemException, java.rmi.RemoteException {
283         getService().unsubscribeMessage(messageId);
284     }
285 
286     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
287         long groupId, java.lang.String className, long classPK, long messageId,
288         java.lang.String subject, java.lang.String body)
289         throws com.liferay.portal.PortalException,
290             com.liferay.portal.SystemException, java.rmi.RemoteException {
291         return getService()
292                    .updateDiscussionMessage(groupId, className, classPK,
293             messageId, subject, body);
294     }
295 
296     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
297         long messageId, java.lang.String subject, java.lang.String body,
298         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
299         java.util.List<String> existingFiles, double priority,
300         java.lang.String[] tagsEntries)
301         throws com.liferay.portal.PortalException,
302             com.liferay.portal.SystemException, java.rmi.RemoteException {
303         return getService()
304                    .updateMessage(messageId, subject, body, files,
305             existingFiles, priority, tagsEntries);
306     }
307 
308     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
309         long messageId, java.lang.String subject, java.lang.String body,
310         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
311         java.util.List<String> existingFiles, double priority,
312         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
313         com.liferay.portal.theme.ThemeDisplay themeDisplay)
314         throws com.liferay.portal.PortalException,
315             com.liferay.portal.SystemException, java.rmi.RemoteException {
316         return getService()
317                    .updateMessage(messageId, subject, body, files,
318             existingFiles, priority, tagsEntries, prefs, themeDisplay);
319     }
320 
321     public static MBMessageService getService() {
322         if (_service == null) {
323             _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
324         }
325 
326         return _service;
327     }
328 
329     public void setService(MBMessageService service) {
330         _service = service;
331     }
332 
333     private static MBMessageService _service;
334 }