1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="MBMessageLocalServiceUtil.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 MBMessageLocalService} 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       MBMessageLocalService
37   * @generated
38   */
39  public class MBMessageLocalServiceUtil {
40      public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
41          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addMBMessage(mbMessage);
44      }
45  
46      public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
47          long messageId) {
48          return getService().createMBMessage(messageId);
49      }
50  
51      public static void deleteMBMessage(long messageId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteMBMessage(messageId);
55      }
56  
57      public static void deleteMBMessage(
58          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteMBMessage(mbMessage);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
76          long messageId)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService().getMBMessage(messageId);
80      }
81  
82      public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
83          int start, int end)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().getMBMessages(start, end);
86      }
87  
88      public static int getMBMessagesCount()
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().getMBMessagesCount();
91      }
92  
93      public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
94          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
95          throws com.liferay.portal.kernel.exception.SystemException {
96          return getService().updateMBMessage(mbMessage);
97      }
98  
99      public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
100         com.liferay.portlet.messageboards.model.MBMessage mbMessage,
101         boolean merge)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getService().updateMBMessage(mbMessage, merge);
104     }
105 
106     public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
107         long userId, java.lang.String userName, java.lang.String className,
108         long classPK, int status)
109         throws com.liferay.portal.kernel.exception.PortalException,
110             com.liferay.portal.kernel.exception.SystemException {
111         return getService()
112                    .addDiscussionMessage(userId, userName, className, classPK,
113             status);
114     }
115 
116     public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
117         long userId, java.lang.String userName, java.lang.String className,
118         long classPK, long threadId, long parentMessageId,
119         java.lang.String subject, java.lang.String body,
120         com.liferay.portal.service.ServiceContext serviceContext)
121         throws com.liferay.portal.kernel.exception.PortalException,
122             com.liferay.portal.kernel.exception.SystemException {
123         return getService()
124                    .addDiscussionMessage(userId, userName, className, classPK,
125             threadId, parentMessageId, subject, body, serviceContext);
126     }
127 
128     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
129         long userId, java.lang.String userName, long groupId, long categoryId,
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, boolean allowPingbacks,
133         com.liferay.portal.service.ServiceContext serviceContext)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         return getService()
137                    .addMessage(userId, userName, groupId, categoryId, subject,
138             body, files, anonymous, priority, allowPingbacks, serviceContext);
139     }
140 
141     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
142         long userId, java.lang.String userName, long groupId, long categoryId,
143         long threadId, long parentMessageId, java.lang.String subject,
144         java.lang.String body,
145         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
146         boolean anonymous, double priority, boolean allowPingbacks,
147         com.liferay.portal.service.ServiceContext serviceContext)
148         throws com.liferay.portal.kernel.exception.PortalException,
149             com.liferay.portal.kernel.exception.SystemException {
150         return getService()
151                    .addMessage(userId, userName, groupId, categoryId, threadId,
152             parentMessageId, subject, body, files, anonymous, priority,
153             allowPingbacks, serviceContext);
154     }
155 
156     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
157         java.lang.String uuid, long userId, java.lang.String userName,
158         long groupId, long categoryId, long threadId, long parentMessageId,
159         java.lang.String subject, java.lang.String body,
160         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
161         boolean anonymous, double priority, boolean allowPingbacks,
162         com.liferay.portal.service.ServiceContext serviceContext)
163         throws com.liferay.portal.kernel.exception.PortalException,
164             com.liferay.portal.kernel.exception.SystemException {
165         return getService()
166                    .addMessage(uuid, userId, userName, groupId, categoryId,
167             threadId, parentMessageId, subject, body, files, anonymous,
168             priority, allowPingbacks, serviceContext);
169     }
170 
171     public static void addMessageResources(long messageId,
172         boolean addCommunityPermissions, boolean addGuestPermissions)
173         throws com.liferay.portal.kernel.exception.PortalException,
174             com.liferay.portal.kernel.exception.SystemException {
175         getService()
176             .addMessageResources(messageId, addCommunityPermissions,
177             addGuestPermissions);
178     }
179 
180     public static void addMessageResources(
181         com.liferay.portlet.messageboards.model.MBMessage message,
182         boolean addCommunityPermissions, boolean addGuestPermissions)
183         throws com.liferay.portal.kernel.exception.PortalException,
184             com.liferay.portal.kernel.exception.SystemException {
185         getService()
186             .addMessageResources(message, addCommunityPermissions,
187             addGuestPermissions);
188     }
189 
190     public static void addMessageResources(long messageId,
191         java.lang.String[] communityPermissions,
192         java.lang.String[] guestPermissions)
193         throws com.liferay.portal.kernel.exception.PortalException,
194             com.liferay.portal.kernel.exception.SystemException {
195         getService()
196             .addMessageResources(messageId, communityPermissions,
197             guestPermissions);
198     }
199 
200     public static void addMessageResources(
201         com.liferay.portlet.messageboards.model.MBMessage message,
202         java.lang.String[] communityPermissions,
203         java.lang.String[] guestPermissions)
204         throws com.liferay.portal.kernel.exception.PortalException,
205             com.liferay.portal.kernel.exception.SystemException {
206         getService()
207             .addMessageResources(message, communityPermissions, guestPermissions);
208     }
209 
210     public static void deleteDiscussionMessage(long messageId)
211         throws com.liferay.portal.kernel.exception.PortalException,
212             com.liferay.portal.kernel.exception.SystemException {
213         getService().deleteDiscussionMessage(messageId);
214     }
215 
216     public static void deleteDiscussionMessages(java.lang.String className,
217         long classPK)
218         throws com.liferay.portal.kernel.exception.PortalException,
219             com.liferay.portal.kernel.exception.SystemException {
220         getService().deleteDiscussionMessages(className, classPK);
221     }
222 
223     public static void deleteMessage(long messageId)
224         throws com.liferay.portal.kernel.exception.PortalException,
225             com.liferay.portal.kernel.exception.SystemException {
226         getService().deleteMessage(messageId);
227     }
228 
229     public static void deleteMessage(
230         com.liferay.portlet.messageboards.model.MBMessage message)
231         throws com.liferay.portal.kernel.exception.PortalException,
232             com.liferay.portal.kernel.exception.SystemException {
233         getService().deleteMessage(message);
234     }
235 
236     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
237         long groupId, long categoryId, int status, int start, int end)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         return getService()
240                    .getCategoryMessages(groupId, categoryId, status, start, end);
241     }
242 
243     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
244         long groupId, long categoryId, int status, int start, int end,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getService()
248                    .getCategoryMessages(groupId, categoryId, status, start,
249             end, obc);
250     }
251 
252     public static int getCategoryMessagesCount(long groupId, long categoryId,
253         int status) throws com.liferay.portal.kernel.exception.SystemException {
254         return getService().getCategoryMessagesCount(groupId, categoryId, status);
255     }
256 
257     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
258         long companyId, int status, int start, int end)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         return getService().getCompanyMessages(companyId, status, start, end);
261     }
262 
263     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
264         long companyId, int status, int start, int end,
265         com.liferay.portal.kernel.util.OrderByComparator obc)
266         throws com.liferay.portal.kernel.exception.SystemException {
267         return getService()
268                    .getCompanyMessages(companyId, status, start, end, obc);
269     }
270 
271     public static int getCompanyMessagesCount(long companyId, int status)
272         throws com.liferay.portal.kernel.exception.SystemException {
273         return getService().getCompanyMessagesCount(companyId, status);
274     }
275 
276     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
277         long userId, java.lang.String className, long classPK, int status)
278         throws com.liferay.portal.kernel.exception.PortalException,
279             com.liferay.portal.kernel.exception.SystemException {
280         return getService()
281                    .getDiscussionMessageDisplay(userId, className, classPK,
282             status);
283     }
284 
285     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
286         long userId, java.lang.String className, long classPK, int status,
287         java.lang.String threadView)
288         throws com.liferay.portal.kernel.exception.PortalException,
289             com.liferay.portal.kernel.exception.SystemException {
290         return getService()
291                    .getDiscussionMessageDisplay(userId, className, classPK,
292             status, threadView);
293     }
294 
295     public static int getDiscussionMessagesCount(long classNameId,
296         long classPK, int status)
297         throws com.liferay.portal.kernel.exception.SystemException {
298         return getService()
299                    .getDiscussionMessagesCount(classNameId, classPK, status);
300     }
301 
302     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
303         java.lang.String className)
304         throws com.liferay.portal.kernel.exception.SystemException {
305         return getService().getDiscussions(className);
306     }
307 
308     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
309         long groupId, int status, int start, int end)
310         throws com.liferay.portal.kernel.exception.SystemException {
311         return getService().getGroupMessages(groupId, status, start, end);
312     }
313 
314     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
315         long groupId, int status, int start, int end,
316         com.liferay.portal.kernel.util.OrderByComparator obc)
317         throws com.liferay.portal.kernel.exception.SystemException {
318         return getService().getGroupMessages(groupId, status, start, end, obc);
319     }
320 
321     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
322         long groupId, long userId, int status, int start, int end)
323         throws com.liferay.portal.kernel.exception.SystemException {
324         return getService().getGroupMessages(groupId, userId, status, start, end);
325     }
326 
327     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
328         long groupId, long userId, int status, int start, int end,
329         com.liferay.portal.kernel.util.OrderByComparator obc)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         return getService()
332                    .getGroupMessages(groupId, userId, status, start, end, obc);
333     }
334 
335     public static int getGroupMessagesCount(long groupId, int status)
336         throws com.liferay.portal.kernel.exception.SystemException {
337         return getService().getGroupMessagesCount(groupId, status);
338     }
339 
340     public static int getGroupMessagesCount(long groupId, long userId,
341         int status) throws com.liferay.portal.kernel.exception.SystemException {
342         return getService().getGroupMessagesCount(groupId, userId, status);
343     }
344 
345     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
346         long messageId)
347         throws com.liferay.portal.kernel.exception.PortalException,
348             com.liferay.portal.kernel.exception.SystemException {
349         return getService().getMessage(messageId);
350     }
351 
352     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
353         java.lang.String className, long classPK, int status)
354         throws com.liferay.portal.kernel.exception.SystemException {
355         return getService().getMessages(className, classPK, status);
356     }
357 
358     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
359         long messageId, int status, java.lang.String threadView)
360         throws com.liferay.portal.kernel.exception.PortalException,
361             com.liferay.portal.kernel.exception.SystemException {
362         return getService().getMessageDisplay(messageId, status, threadView);
363     }
364 
365     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
366         com.liferay.portlet.messageboards.model.MBMessage message, int status,
367         java.lang.String threadView)
368         throws com.liferay.portal.kernel.exception.PortalException,
369             com.liferay.portal.kernel.exception.SystemException {
370         return getService().getMessageDisplay(message, status, threadView);
371     }
372 
373     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
374         throws com.liferay.portal.kernel.exception.SystemException {
375         return getService().getNoAssetMessages();
376     }
377 
378     public static int getPositionInThread(long messageId)
379         throws com.liferay.portal.kernel.exception.PortalException,
380             com.liferay.portal.kernel.exception.SystemException {
381         return getService().getPositionInThread(messageId);
382     }
383 
384     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
385         long threadId, int status)
386         throws com.liferay.portal.kernel.exception.SystemException {
387         return getService().getThreadMessages(threadId, status);
388     }
389 
390     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
391         long threadId, int status,
392         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
393         throws com.liferay.portal.kernel.exception.SystemException {
394         return getService().getThreadMessages(threadId, status, comparator);
395     }
396 
397     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
398         long threadId, int status, int start, int end)
399         throws com.liferay.portal.kernel.exception.SystemException {
400         return getService().getThreadMessages(threadId, status, start, end);
401     }
402 
403     public static int getThreadMessagesCount(long threadId, int status)
404         throws com.liferay.portal.kernel.exception.SystemException {
405         return getService().getThreadMessagesCount(threadId, status);
406     }
407 
408     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
409         long threadId, int status, int start, int end)
410         throws com.liferay.portal.kernel.exception.SystemException {
411         return getService()
412                    .getThreadRepliesMessages(threadId, status, start, end);
413     }
414 
415     public static void subscribeMessage(long userId, long messageId)
416         throws com.liferay.portal.kernel.exception.PortalException,
417             com.liferay.portal.kernel.exception.SystemException {
418         getService().subscribeMessage(userId, messageId);
419     }
420 
421     public static void unsubscribeMessage(long userId, long messageId)
422         throws com.liferay.portal.kernel.exception.PortalException,
423             com.liferay.portal.kernel.exception.SystemException {
424         getService().unsubscribeMessage(userId, messageId);
425     }
426 
427     public static void updateAsset(long userId,
428         com.liferay.portlet.messageboards.model.MBMessage message,
429         long[] assetCategoryIds, java.lang.String[] assetTagNames)
430         throws com.liferay.portal.kernel.exception.PortalException,
431             com.liferay.portal.kernel.exception.SystemException {
432         getService()
433             .updateAsset(userId, message, assetCategoryIds, assetTagNames);
434     }
435 
436     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
437         long userId, long messageId, java.lang.String subject,
438         java.lang.String body, int status)
439         throws com.liferay.portal.kernel.exception.PortalException,
440             com.liferay.portal.kernel.exception.SystemException {
441         return getService()
442                    .updateDiscussionMessage(userId, messageId, subject, body,
443             status);
444     }
445 
446     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
447         long userId, long messageId, java.lang.String subject,
448         java.lang.String body,
449         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
450         java.util.List<String> existingFiles, double priority,
451         boolean allowPingbacks,
452         com.liferay.portal.service.ServiceContext serviceContext)
453         throws com.liferay.portal.kernel.exception.PortalException,
454             com.liferay.portal.kernel.exception.SystemException {
455         return getService()
456                    .updateMessage(userId, messageId, subject, body, files,
457             existingFiles, priority, allowPingbacks, serviceContext);
458     }
459 
460     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
461         long messageId, java.util.Date createDate, java.util.Date modifiedDate)
462         throws com.liferay.portal.kernel.exception.PortalException,
463             com.liferay.portal.kernel.exception.SystemException {
464         return getService().updateMessage(messageId, createDate, modifiedDate);
465     }
466 
467     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
468         long messageId, java.lang.String body)
469         throws com.liferay.portal.kernel.exception.PortalException,
470             com.liferay.portal.kernel.exception.SystemException {
471         return getService().updateMessage(messageId, body);
472     }
473 
474     public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
475         long userId, com.liferay.portlet.messageboards.model.MBMessage message,
476         com.liferay.portal.service.ServiceContext serviceContext,
477         boolean reindex)
478         throws com.liferay.portal.kernel.exception.PortalException,
479             com.liferay.portal.kernel.exception.SystemException {
480         return getService()
481                    .updateStatus(userId, message, serviceContext, reindex);
482     }
483 
484     public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
485         long userId, long messageId,
486         com.liferay.portal.service.ServiceContext serviceContext)
487         throws com.liferay.portal.kernel.exception.PortalException,
488             com.liferay.portal.kernel.exception.SystemException {
489         return getService().updateStatus(userId, messageId, serviceContext);
490     }
491 
492     public static MBMessageLocalService getService() {
493         if (_service == null) {
494             _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
495         }
496 
497         return _service;
498     }
499 
500     public void setService(MBMessageLocalService service) {
501         _service = service;
502     }
503 
504     private static MBMessageLocalService _service;
505 }