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