1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.messageboards.service;
21  
22  
23  /**
24   * <a href="MBMessageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.messageboards.service.MBMessageLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.messageboards.service.MBMessageLocalService
42   *
43   */
44  public class MBMessageLocalServiceUtil {
45      public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
46          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
47          throws com.liferay.portal.SystemException {
48          return getService().addMBMessage(mbMessage);
49      }
50  
51      public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
52          long messageId) {
53          return getService().createMBMessage(messageId);
54      }
55  
56      public static void deleteMBMessage(long messageId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteMBMessage(messageId);
60      }
61  
62      public static void deleteMBMessage(
63          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
64          throws com.liferay.portal.SystemException {
65          getService().deleteMBMessage(mbMessage);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
81          long messageId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getMBMessage(messageId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getMBMessages(start, end);
90      }
91  
92      public static int getMBMessagesCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getMBMessagesCount();
95      }
96  
97      public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
98          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
99          throws com.liferay.portal.SystemException {
100         return getService().updateMBMessage(mbMessage);
101     }
102 
103     public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
104         com.liferay.portlet.messageboards.model.MBMessage mbMessage,
105         boolean merge) throws com.liferay.portal.SystemException {
106         return getService().updateMBMessage(mbMessage, merge);
107     }
108 
109     public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
110         long userId, java.lang.String userName, java.lang.String className,
111         long classPK)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService()
115                    .addDiscussionMessage(userId, userName, className, classPK);
116     }
117 
118     public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
119         long userId, java.lang.String userName, java.lang.String className,
120         long classPK, long threadId, long parentMessageId,
121         java.lang.String subject, java.lang.String body,
122         com.liferay.portal.service.ServiceContext serviceContext)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException {
125         return getService()
126                    .addDiscussionMessage(userId, userName, className, classPK,
127             threadId, parentMessageId, subject, body, serviceContext);
128     }
129 
130     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
131         long userId, java.lang.String userName, long categoryId,
132         java.lang.String subject, java.lang.String body,
133         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
134         boolean anonymous, double priority,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         return getService()
139                    .addMessage(userId, userName, categoryId, subject, body,
140             files, anonymous, priority, serviceContext);
141     }
142 
143     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
144         long userId, java.lang.String userName, long categoryId, long threadId,
145         long parentMessageId, 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,
148         com.liferay.portal.service.ServiceContext serviceContext)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         return getService()
152                    .addMessage(userId, userName, categoryId, threadId,
153             parentMessageId, subject, body, files, anonymous, priority,
154             serviceContext);
155     }
156 
157     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
158         java.lang.String uuid, long userId, java.lang.String userName,
159         long categoryId, long threadId, long parentMessageId,
160         java.lang.String subject, java.lang.String body,
161         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
162         boolean anonymous, double priority,
163         com.liferay.portal.service.ServiceContext serviceContext)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         return getService()
167                    .addMessage(uuid, userId, userName, categoryId, threadId,
168             parentMessageId, subject, body, files, anonymous, priority,
169             serviceContext);
170     }
171 
172     public static void addMessageResources(long messageId,
173         boolean addCommunityPermissions, boolean addGuestPermissions)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException {
176         getService()
177             .addMessageResources(messageId, addCommunityPermissions,
178             addGuestPermissions);
179     }
180 
181     public static void addMessageResources(
182         com.liferay.portlet.messageboards.model.MBMessage message,
183         boolean addCommunityPermissions, boolean addGuestPermissions)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         getService()
187             .addMessageResources(message, 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         java.lang.String[] communityPermissions,
204         java.lang.String[] guestPermissions)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         getService()
208             .addMessageResources(message, communityPermissions, guestPermissions);
209     }
210 
211     public static void deleteDiscussionMessage(long messageId)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         getService().deleteDiscussionMessage(messageId);
215     }
216 
217     public static void deleteDiscussionMessages(java.lang.String className,
218         long classPK)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException {
221         getService().deleteDiscussionMessages(className, classPK);
222     }
223 
224     public static void deleteMessage(long messageId)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         getService().deleteMessage(messageId);
228     }
229 
230     public static void deleteMessage(
231         com.liferay.portlet.messageboards.model.MBMessage message)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         getService().deleteMessage(message);
235     }
236 
237     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
238         long categoryId, int start, int end)
239         throws com.liferay.portal.SystemException {
240         return getService().getCategoryMessages(categoryId, start, end);
241     }
242 
243     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
244         long categoryId, int start, int end,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException {
247         return getService().getCategoryMessages(categoryId, start, end, obc);
248     }
249 
250     public static int getCategoryMessagesCount(long categoryId)
251         throws com.liferay.portal.SystemException {
252         return getService().getCategoryMessagesCount(categoryId);
253     }
254 
255     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
256         long companyId, int start, int end)
257         throws com.liferay.portal.SystemException {
258         return getService().getCompanyMessages(companyId, start, end);
259     }
260 
261     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
262         long companyId, int start, int end,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException {
265         return getService().getCompanyMessages(companyId, start, end, obc);
266     }
267 
268     public static int getCompanyMessagesCount(long companyId)
269         throws com.liferay.portal.SystemException {
270         return getService().getCompanyMessagesCount(companyId);
271     }
272 
273     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
274         long userId, java.lang.String className, long classPK)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException {
277         return getService()
278                    .getDiscussionMessageDisplay(userId, className, classPK);
279     }
280 
281     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
282         long userId, java.lang.String className, long classPK,
283         java.lang.String threadView)
284         throws com.liferay.portal.PortalException,
285             com.liferay.portal.SystemException {
286         return getService()
287                    .getDiscussionMessageDisplay(userId, className, classPK,
288             threadView);
289     }
290 
291     public static int getDiscussionMessagesCount(long classNameId, long classPK)
292         throws com.liferay.portal.SystemException {
293         return getService().getDiscussionMessagesCount(classNameId, classPK);
294     }
295 
296     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
297         java.lang.String className) throws com.liferay.portal.SystemException {
298         return getService().getDiscussions(className);
299     }
300 
301     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
302         long groupId, int start, int end)
303         throws com.liferay.portal.SystemException {
304         return getService().getGroupMessages(groupId, start, end);
305     }
306 
307     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
308         long groupId, int start, int end,
309         com.liferay.portal.kernel.util.OrderByComparator obc)
310         throws com.liferay.portal.SystemException {
311         return getService().getGroupMessages(groupId, start, end, obc);
312     }
313 
314     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
315         long groupId, long userId, int start, int end)
316         throws com.liferay.portal.SystemException {
317         return getService().getGroupMessages(groupId, userId, start, end);
318     }
319 
320     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
321         long groupId, long userId, int start, int end,
322         com.liferay.portal.kernel.util.OrderByComparator obc)
323         throws com.liferay.portal.SystemException {
324         return getService().getGroupMessages(groupId, userId, start, end, obc);
325     }
326 
327     public static int getGroupMessagesCount(long groupId)
328         throws com.liferay.portal.SystemException {
329         return getService().getGroupMessagesCount(groupId);
330     }
331 
332     public static int getGroupMessagesCount(long groupId, long userId)
333         throws com.liferay.portal.SystemException {
334         return getService().getGroupMessagesCount(groupId, userId);
335     }
336 
337     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
338         long messageId)
339         throws com.liferay.portal.PortalException,
340             com.liferay.portal.SystemException {
341         return getService().getMessage(messageId);
342     }
343 
344     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
345         java.lang.String className, long classPK)
346         throws com.liferay.portal.SystemException {
347         return getService().getMessages(className, classPK);
348     }
349 
350     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
351         long messageId, java.lang.String threadView)
352         throws com.liferay.portal.PortalException,
353             com.liferay.portal.SystemException {
354         return getService().getMessageDisplay(messageId, threadView);
355     }
356 
357     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
358         com.liferay.portlet.messageboards.model.MBMessage message,
359         java.lang.String threadView)
360         throws com.liferay.portal.PortalException,
361             com.liferay.portal.SystemException {
362         return getService().getMessageDisplay(message, threadView);
363     }
364 
365     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
366         throws com.liferay.portal.SystemException {
367         return getService().getNoAssetMessages();
368     }
369 
370     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
371         long threadId) throws com.liferay.portal.SystemException {
372         return getService().getThreadMessages(threadId);
373     }
374 
375     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
376         long threadId,
377         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
378         throws com.liferay.portal.SystemException {
379         return getService().getThreadMessages(threadId, comparator);
380     }
381 
382     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
383         long threadId, int start, int end)
384         throws com.liferay.portal.SystemException {
385         return getService().getThreadMessages(threadId, start, end);
386     }
387 
388     public static int getThreadMessagesCount(long threadId)
389         throws com.liferay.portal.SystemException {
390         return getService().getThreadMessagesCount(threadId);
391     }
392 
393     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
394         long threadId, int start, int end)
395         throws com.liferay.portal.SystemException {
396         return getService().getThreadRepliesMessages(threadId, start, end);
397     }
398 
399     public static void reIndex(long messageId)
400         throws com.liferay.portal.SystemException {
401         getService().reIndex(messageId);
402     }
403 
404     public static void reIndex(
405         com.liferay.portlet.messageboards.model.MBMessage message)
406         throws com.liferay.portal.SystemException {
407         getService().reIndex(message);
408     }
409 
410     public static void subscribeMessage(long userId, long messageId)
411         throws com.liferay.portal.PortalException,
412             com.liferay.portal.SystemException {
413         getService().subscribeMessage(userId, messageId);
414     }
415 
416     public static void unsubscribeMessage(long userId, long messageId)
417         throws com.liferay.portal.PortalException,
418             com.liferay.portal.SystemException {
419         getService().unsubscribeMessage(userId, messageId);
420     }
421 
422     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
423         long userId, long messageId, java.lang.String subject,
424         java.lang.String body)
425         throws com.liferay.portal.PortalException,
426             com.liferay.portal.SystemException {
427         return getService()
428                    .updateDiscussionMessage(userId, messageId, subject, body);
429     }
430 
431     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
432         long userId, long messageId, java.lang.String subject,
433         java.lang.String body,
434         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
435         java.util.List<String> existingFiles, double priority,
436         com.liferay.portal.service.ServiceContext serviceContext)
437         throws com.liferay.portal.PortalException,
438             com.liferay.portal.SystemException {
439         return getService()
440                    .updateMessage(userId, messageId, subject, body, files,
441             existingFiles, priority, serviceContext);
442     }
443 
444     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
445         long messageId, java.util.Date createDate, java.util.Date modifiedDate)
446         throws com.liferay.portal.PortalException,
447             com.liferay.portal.SystemException {
448         return getService().updateMessage(messageId, createDate, modifiedDate);
449     }
450 
451     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
452         long messageId, java.lang.String body)
453         throws com.liferay.portal.PortalException,
454             com.liferay.portal.SystemException {
455         return getService().updateMessage(messageId, body);
456     }
457 
458     public static void updateTagsAsset(long userId,
459         com.liferay.portlet.messageboards.model.MBMessage message,
460         java.lang.String[] tagsEntries)
461         throws com.liferay.portal.PortalException,
462             com.liferay.portal.SystemException {
463         getService().updateTagsAsset(userId, message, tagsEntries);
464     }
465 
466     public static MBMessageLocalService getService() {
467         if (_service == null) {
468             throw new RuntimeException("MBMessageLocalService is not set");
469         }
470 
471         return _service;
472     }
473 
474     public void setService(MBMessageLocalService service) {
475         _service = service;
476     }
477 
478     private static MBMessageLocalService _service;
479 }