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 java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
91          long messageId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getMBMessage(messageId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getMBMessages(start, end);
101     }
102 
103     public static int getMBMessagesCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getMBMessagesCount();
106     }
107 
108     public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
109         com.liferay.portlet.messageboards.model.MBMessage mbMessage)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateMBMessage(mbMessage);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
115         com.liferay.portlet.messageboards.model.MBMessage mbMessage,
116         boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getService().updateMBMessage(mbMessage, merge);
119     }
120 
121     public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
122         long userId, java.lang.String userName, java.lang.String className,
123         long classPK, int status)
124         throws com.liferay.portal.kernel.exception.PortalException,
125             com.liferay.portal.kernel.exception.SystemException {
126         return getService()
127                    .addDiscussionMessage(userId, userName, className, classPK,
128             status);
129     }
130 
131     public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
132         long userId, java.lang.String userName, java.lang.String className,
133         long classPK, long threadId, long parentMessageId,
134         java.lang.String subject, java.lang.String body,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException {
138         return getService()
139                    .addDiscussionMessage(userId, userName, className, classPK,
140             threadId, parentMessageId, subject, body, serviceContext);
141     }
142 
143     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
144         long userId, java.lang.String userName, long groupId, long categoryId,
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, boolean allowPingbacks,
148         com.liferay.portal.service.ServiceContext serviceContext)
149         throws com.liferay.portal.kernel.exception.PortalException,
150             com.liferay.portal.kernel.exception.SystemException {
151         return getService()
152                    .addMessage(userId, userName, groupId, categoryId, subject,
153             body, files, anonymous, priority, allowPingbacks, serviceContext);
154     }
155 
156     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
157         long userId, java.lang.String userName, long groupId, long categoryId,
158         long threadId, long parentMessageId, java.lang.String subject,
159         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(userId, userName, groupId, categoryId, threadId,
167             parentMessageId, subject, body, files, anonymous, priority,
168             allowPingbacks, serviceContext);
169     }
170 
171     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
172         java.lang.String uuid, long userId, java.lang.String userName,
173         long groupId, long categoryId, long threadId, long parentMessageId,
174         java.lang.String subject, java.lang.String body,
175         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
176         boolean anonymous, double priority, boolean allowPingbacks,
177         com.liferay.portal.service.ServiceContext serviceContext)
178         throws com.liferay.portal.kernel.exception.PortalException,
179             com.liferay.portal.kernel.exception.SystemException {
180         return getService()
181                    .addMessage(uuid, userId, userName, groupId, categoryId,
182             threadId, parentMessageId, subject, body, files, anonymous,
183             priority, allowPingbacks, serviceContext);
184     }
185 
186     public static void addMessageResources(long messageId,
187         boolean addCommunityPermissions, boolean addGuestPermissions)
188         throws com.liferay.portal.kernel.exception.PortalException,
189             com.liferay.portal.kernel.exception.SystemException {
190         getService()
191             .addMessageResources(messageId, addCommunityPermissions,
192             addGuestPermissions);
193     }
194 
195     public static void addMessageResources(
196         com.liferay.portlet.messageboards.model.MBMessage message,
197         boolean addCommunityPermissions, boolean addGuestPermissions)
198         throws com.liferay.portal.kernel.exception.PortalException,
199             com.liferay.portal.kernel.exception.SystemException {
200         getService()
201             .addMessageResources(message, addCommunityPermissions,
202             addGuestPermissions);
203     }
204 
205     public static void addMessageResources(long messageId,
206         java.lang.String[] communityPermissions,
207         java.lang.String[] guestPermissions)
208         throws com.liferay.portal.kernel.exception.PortalException,
209             com.liferay.portal.kernel.exception.SystemException {
210         getService()
211             .addMessageResources(messageId, communityPermissions,
212             guestPermissions);
213     }
214 
215     public static void addMessageResources(
216         com.liferay.portlet.messageboards.model.MBMessage message,
217         java.lang.String[] communityPermissions,
218         java.lang.String[] guestPermissions)
219         throws com.liferay.portal.kernel.exception.PortalException,
220             com.liferay.portal.kernel.exception.SystemException {
221         getService()
222             .addMessageResources(message, communityPermissions, guestPermissions);
223     }
224 
225     public static void deleteDiscussionMessage(long messageId)
226         throws com.liferay.portal.kernel.exception.PortalException,
227             com.liferay.portal.kernel.exception.SystemException {
228         getService().deleteDiscussionMessage(messageId);
229     }
230 
231     public static void deleteDiscussionMessages(java.lang.String className,
232         long classPK)
233         throws com.liferay.portal.kernel.exception.PortalException,
234             com.liferay.portal.kernel.exception.SystemException {
235         getService().deleteDiscussionMessages(className, classPK);
236     }
237 
238     public static void deleteMessage(long messageId)
239         throws com.liferay.portal.kernel.exception.PortalException,
240             com.liferay.portal.kernel.exception.SystemException {
241         getService().deleteMessage(messageId);
242     }
243 
244     public static void deleteMessage(
245         com.liferay.portlet.messageboards.model.MBMessage message)
246         throws com.liferay.portal.kernel.exception.PortalException,
247             com.liferay.portal.kernel.exception.SystemException {
248         getService().deleteMessage(message);
249     }
250 
251     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
252         long groupId, long categoryId, int status, int start, int end)
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getService()
255                    .getCategoryMessages(groupId, categoryId, status, start, end);
256     }
257 
258     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
259         long groupId, long categoryId, int status, int start, int end,
260         com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.kernel.exception.SystemException {
262         return getService()
263                    .getCategoryMessages(groupId, categoryId, status, start,
264             end, obc);
265     }
266 
267     public static int getCategoryMessagesCount(long groupId, long categoryId,
268         int status) throws com.liferay.portal.kernel.exception.SystemException {
269         return getService().getCategoryMessagesCount(groupId, categoryId, status);
270     }
271 
272     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
273         long companyId, int status, int start, int end)
274         throws com.liferay.portal.kernel.exception.SystemException {
275         return getService().getCompanyMessages(companyId, status, start, end);
276     }
277 
278     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
279         long companyId, int status, int start, int end,
280         com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.kernel.exception.SystemException {
282         return getService()
283                    .getCompanyMessages(companyId, status, start, end, obc);
284     }
285 
286     public static int getCompanyMessagesCount(long companyId, int status)
287         throws com.liferay.portal.kernel.exception.SystemException {
288         return getService().getCompanyMessagesCount(companyId, status);
289     }
290 
291     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
292         long userId, java.lang.String className, long classPK, int status)
293         throws com.liferay.portal.kernel.exception.PortalException,
294             com.liferay.portal.kernel.exception.SystemException {
295         return getService()
296                    .getDiscussionMessageDisplay(userId, className, classPK,
297             status);
298     }
299 
300     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
301         long userId, java.lang.String className, long classPK, int status,
302         java.lang.String threadView)
303         throws com.liferay.portal.kernel.exception.PortalException,
304             com.liferay.portal.kernel.exception.SystemException {
305         return getService()
306                    .getDiscussionMessageDisplay(userId, className, classPK,
307             status, threadView);
308     }
309 
310     public static int getDiscussionMessagesCount(long classNameId,
311         long classPK, int status)
312         throws com.liferay.portal.kernel.exception.SystemException {
313         return getService()
314                    .getDiscussionMessagesCount(classNameId, classPK, status);
315     }
316 
317     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
318         java.lang.String className)
319         throws com.liferay.portal.kernel.exception.SystemException {
320         return getService().getDiscussions(className);
321     }
322 
323     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
324         long groupId, int status, int start, int end)
325         throws com.liferay.portal.kernel.exception.SystemException {
326         return getService().getGroupMessages(groupId, status, start, end);
327     }
328 
329     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
330         long groupId, int status, int start, int end,
331         com.liferay.portal.kernel.util.OrderByComparator obc)
332         throws com.liferay.portal.kernel.exception.SystemException {
333         return getService().getGroupMessages(groupId, status, start, end, obc);
334     }
335 
336     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
337         long groupId, long userId, int status, int start, int end)
338         throws com.liferay.portal.kernel.exception.SystemException {
339         return getService().getGroupMessages(groupId, userId, status, start, end);
340     }
341 
342     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
343         long groupId, long userId, int status, int start, int end,
344         com.liferay.portal.kernel.util.OrderByComparator obc)
345         throws com.liferay.portal.kernel.exception.SystemException {
346         return getService()
347                    .getGroupMessages(groupId, userId, status, start, end, obc);
348     }
349 
350     public static int getGroupMessagesCount(long groupId, int status)
351         throws com.liferay.portal.kernel.exception.SystemException {
352         return getService().getGroupMessagesCount(groupId, status);
353     }
354 
355     public static int getGroupMessagesCount(long groupId, long userId,
356         int status) throws com.liferay.portal.kernel.exception.SystemException {
357         return getService().getGroupMessagesCount(groupId, userId, status);
358     }
359 
360     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
361         long messageId)
362         throws com.liferay.portal.kernel.exception.PortalException,
363             com.liferay.portal.kernel.exception.SystemException {
364         return getService().getMessage(messageId);
365     }
366 
367     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
368         java.lang.String className, long classPK, int status)
369         throws com.liferay.portal.kernel.exception.SystemException {
370         return getService().getMessages(className, classPK, status);
371     }
372 
373     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
374         long messageId, int status, java.lang.String threadView)
375         throws com.liferay.portal.kernel.exception.PortalException,
376             com.liferay.portal.kernel.exception.SystemException {
377         return getService().getMessageDisplay(messageId, status, threadView);
378     }
379 
380     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
381         com.liferay.portlet.messageboards.model.MBMessage message, int status,
382         java.lang.String threadView)
383         throws com.liferay.portal.kernel.exception.PortalException,
384             com.liferay.portal.kernel.exception.SystemException {
385         return getService().getMessageDisplay(message, status, threadView);
386     }
387 
388     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
389         throws com.liferay.portal.kernel.exception.SystemException {
390         return getService().getNoAssetMessages();
391     }
392 
393     public static int getPositionInThread(long messageId)
394         throws com.liferay.portal.kernel.exception.PortalException,
395             com.liferay.portal.kernel.exception.SystemException {
396         return getService().getPositionInThread(messageId);
397     }
398 
399     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
400         long threadId, int status)
401         throws com.liferay.portal.kernel.exception.SystemException {
402         return getService().getThreadMessages(threadId, status);
403     }
404 
405     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
406         long threadId, int status,
407         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
408         throws com.liferay.portal.kernel.exception.SystemException {
409         return getService().getThreadMessages(threadId, status, comparator);
410     }
411 
412     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
413         long threadId, int status, int start, int end)
414         throws com.liferay.portal.kernel.exception.SystemException {
415         return getService().getThreadMessages(threadId, status, start, end);
416     }
417 
418     public static int getThreadMessagesCount(long threadId, int status)
419         throws com.liferay.portal.kernel.exception.SystemException {
420         return getService().getThreadMessagesCount(threadId, status);
421     }
422 
423     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
424         long threadId, int status, int start, int end)
425         throws com.liferay.portal.kernel.exception.SystemException {
426         return getService()
427                    .getThreadRepliesMessages(threadId, status, start, end);
428     }
429 
430     public static void subscribeMessage(long userId, long messageId)
431         throws com.liferay.portal.kernel.exception.PortalException,
432             com.liferay.portal.kernel.exception.SystemException {
433         getService().subscribeMessage(userId, messageId);
434     }
435 
436     public static void unsubscribeMessage(long userId, long messageId)
437         throws com.liferay.portal.kernel.exception.PortalException,
438             com.liferay.portal.kernel.exception.SystemException {
439         getService().unsubscribeMessage(userId, messageId);
440     }
441 
442     public static void updateAsset(long userId,
443         com.liferay.portlet.messageboards.model.MBMessage message,
444         long[] assetCategoryIds, java.lang.String[] assetTagNames)
445         throws com.liferay.portal.kernel.exception.PortalException,
446             com.liferay.portal.kernel.exception.SystemException {
447         getService()
448             .updateAsset(userId, message, assetCategoryIds, assetTagNames);
449     }
450 
451     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
452         long userId, long messageId, java.lang.String subject,
453         java.lang.String body, int status)
454         throws com.liferay.portal.kernel.exception.PortalException,
455             com.liferay.portal.kernel.exception.SystemException {
456         return getService()
457                    .updateDiscussionMessage(userId, messageId, subject, body,
458             status);
459     }
460 
461     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
462         long userId, long messageId, java.lang.String subject,
463         java.lang.String body,
464         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
465         java.util.List<String> existingFiles, double priority,
466         boolean allowPingbacks,
467         com.liferay.portal.service.ServiceContext serviceContext)
468         throws com.liferay.portal.kernel.exception.PortalException,
469             com.liferay.portal.kernel.exception.SystemException {
470         return getService()
471                    .updateMessage(userId, messageId, subject, body, files,
472             existingFiles, priority, allowPingbacks, serviceContext);
473     }
474 
475     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
476         long messageId, java.util.Date createDate, java.util.Date modifiedDate)
477         throws com.liferay.portal.kernel.exception.PortalException,
478             com.liferay.portal.kernel.exception.SystemException {
479         return getService().updateMessage(messageId, createDate, modifiedDate);
480     }
481 
482     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
483         long messageId, java.lang.String body)
484         throws com.liferay.portal.kernel.exception.PortalException,
485             com.liferay.portal.kernel.exception.SystemException {
486         return getService().updateMessage(messageId, body);
487     }
488 
489     public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
490         long userId, com.liferay.portlet.messageboards.model.MBMessage message,
491         com.liferay.portal.service.ServiceContext serviceContext,
492         boolean reindex)
493         throws com.liferay.portal.kernel.exception.PortalException,
494             com.liferay.portal.kernel.exception.SystemException {
495         return getService()
496                    .updateStatus(userId, message, serviceContext, reindex);
497     }
498 
499     public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
500         long userId, long messageId,
501         com.liferay.portal.service.ServiceContext serviceContext)
502         throws com.liferay.portal.kernel.exception.PortalException,
503             com.liferay.portal.kernel.exception.SystemException {
504         return getService().updateStatus(userId, messageId, serviceContext);
505     }
506 
507     public static MBMessageLocalService getService() {
508         if (_service == null) {
509             _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
510         }
511 
512         return _service;
513     }
514 
515     public void setService(MBMessageLocalService service) {
516         _service = service;
517     }
518 
519     private static MBMessageLocalService _service;
520 }