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