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