001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class MBMessageLocalServiceUtil {
037
044 public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
045 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getService().addMBMessage(mbMessage);
048 }
049
050
056 public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
057 long messageId) {
058 return getService().createMBMessage(messageId);
059 }
060
061
068 public static void deleteMBMessage(long messageId)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 getService().deleteMBMessage(messageId);
072 }
073
074
080 public static void deleteMBMessage(
081 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 getService().deleteMBMessage(mbMessage);
084 }
085
086
093 @SuppressWarnings("rawtypes")
094 public static java.util.List dynamicQuery(
095 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096 throws com.liferay.portal.kernel.exception.SystemException {
097 return getService().dynamicQuery(dynamicQuery);
098 }
099
100
113 @SuppressWarnings("rawtypes")
114 public static java.util.List dynamicQuery(
115 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
116 int end) throws com.liferay.portal.kernel.exception.SystemException {
117 return getService().dynamicQuery(dynamicQuery, start, end);
118 }
119
120
134 @SuppressWarnings("rawtypes")
135 public static java.util.List dynamicQuery(
136 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
137 int end,
138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getService()
141 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
142 }
143
144
151 public static long dynamicQueryCount(
152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
153 throws com.liferay.portal.kernel.exception.SystemException {
154 return getService().dynamicQueryCount(dynamicQuery);
155 }
156
157
165 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
166 long messageId)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getService().getMBMessage(messageId);
170 }
171
172
181 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
182 java.lang.String uuid, long groupId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
186 }
187
188
200 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
201 int start, int end)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getService().getMBMessages(start, end);
204 }
205
206
212 public static int getMBMessagesCount()
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getMBMessagesCount();
215 }
216
217
224 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
225 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getService().updateMBMessage(mbMessage);
228 }
229
230
238 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
239 com.liferay.portlet.messageboards.model.MBMessage mbMessage,
240 boolean merge)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getService().updateMBMessage(mbMessage, merge);
243 }
244
245 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
246 long userId, java.lang.String userName, long groupId,
247 java.lang.String className, long classPK, int workflowAction)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException {
250 return getService()
251 .addDiscussionMessage(userId, userName, groupId, className,
252 classPK, workflowAction);
253 }
254
255 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
256 long userId, java.lang.String userName, long groupId,
257 java.lang.String className, long classPK, long threadId,
258 long parentMessageId, java.lang.String subject, java.lang.String body,
259 com.liferay.portal.service.ServiceContext serviceContext)
260 throws com.liferay.portal.kernel.exception.PortalException,
261 com.liferay.portal.kernel.exception.SystemException {
262 return getService()
263 .addDiscussionMessage(userId, userName, groupId, className,
264 classPK, threadId, parentMessageId, subject, body, serviceContext);
265 }
266
267 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
268 long userId, java.lang.String userName, long groupId, long categoryId,
269 long threadId, long parentMessageId, java.lang.String subject,
270 java.lang.String body,
271 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
272 boolean anonymous, double priority, boolean allowPingbacks,
273 com.liferay.portal.service.ServiceContext serviceContext)
274 throws com.liferay.portal.kernel.exception.PortalException,
275 com.liferay.portal.kernel.exception.SystemException {
276 return getService()
277 .addMessage(userId, userName, groupId, categoryId, threadId,
278 parentMessageId, subject, body, files, anonymous, priority,
279 allowPingbacks, serviceContext);
280 }
281
282 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
283 long userId, java.lang.String userName, long groupId, long categoryId,
284 java.lang.String subject, java.lang.String body,
285 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
286 boolean anonymous, double priority, boolean allowPingbacks,
287 com.liferay.portal.service.ServiceContext serviceContext)
288 throws com.liferay.portal.kernel.exception.PortalException,
289 com.liferay.portal.kernel.exception.SystemException {
290 return getService()
291 .addMessage(userId, userName, groupId, categoryId, subject,
292 body, files, anonymous, priority, allowPingbacks, serviceContext);
293 }
294
295 public static void addMessageResources(long messageId,
296 boolean addCommunityPermissions, boolean addGuestPermissions)
297 throws com.liferay.portal.kernel.exception.PortalException,
298 com.liferay.portal.kernel.exception.SystemException {
299 getService()
300 .addMessageResources(messageId, addCommunityPermissions,
301 addGuestPermissions);
302 }
303
304 public static void addMessageResources(long messageId,
305 java.lang.String[] communityPermissions,
306 java.lang.String[] guestPermissions)
307 throws com.liferay.portal.kernel.exception.PortalException,
308 com.liferay.portal.kernel.exception.SystemException {
309 getService()
310 .addMessageResources(messageId, communityPermissions,
311 guestPermissions);
312 }
313
314 public static void addMessageResources(
315 com.liferay.portlet.messageboards.model.MBMessage message,
316 boolean addCommunityPermissions, boolean addGuestPermissions)
317 throws com.liferay.portal.kernel.exception.PortalException,
318 com.liferay.portal.kernel.exception.SystemException {
319 getService()
320 .addMessageResources(message, addCommunityPermissions,
321 addGuestPermissions);
322 }
323
324 public static void addMessageResources(
325 com.liferay.portlet.messageboards.model.MBMessage message,
326 java.lang.String[] communityPermissions,
327 java.lang.String[] guestPermissions)
328 throws com.liferay.portal.kernel.exception.PortalException,
329 com.liferay.portal.kernel.exception.SystemException {
330 getService()
331 .addMessageResources(message, communityPermissions, guestPermissions);
332 }
333
334 public static void deleteDiscussionMessage(long messageId)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 getService().deleteDiscussionMessage(messageId);
338 }
339
340 public static void deleteDiscussionMessages(java.lang.String className,
341 long classPK)
342 throws com.liferay.portal.kernel.exception.PortalException,
343 com.liferay.portal.kernel.exception.SystemException {
344 getService().deleteDiscussionMessages(className, classPK);
345 }
346
347 public static void deleteMessage(long messageId)
348 throws com.liferay.portal.kernel.exception.PortalException,
349 com.liferay.portal.kernel.exception.SystemException {
350 getService().deleteMessage(messageId);
351 }
352
353 public static void deleteMessage(
354 com.liferay.portlet.messageboards.model.MBMessage message)
355 throws com.liferay.portal.kernel.exception.PortalException,
356 com.liferay.portal.kernel.exception.SystemException {
357 getService().deleteMessage(message);
358 }
359
360 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
361 long groupId, long categoryId, int status, int start, int end)
362 throws com.liferay.portal.kernel.exception.SystemException {
363 return getService()
364 .getCategoryMessages(groupId, categoryId, status, start, end);
365 }
366
367 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
368 long groupId, long categoryId, int status, int start, int end,
369 com.liferay.portal.kernel.util.OrderByComparator obc)
370 throws com.liferay.portal.kernel.exception.SystemException {
371 return getService()
372 .getCategoryMessages(groupId, categoryId, status, start,
373 end, obc);
374 }
375
376 public static int getCategoryMessagesCount(long groupId, long categoryId,
377 int status) throws com.liferay.portal.kernel.exception.SystemException {
378 return getService().getCategoryMessagesCount(groupId, categoryId, status);
379 }
380
381 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
382 long companyId, int status, int start, int end)
383 throws com.liferay.portal.kernel.exception.SystemException {
384 return getService().getCompanyMessages(companyId, status, start, end);
385 }
386
387 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
388 long companyId, int status, int start, int end,
389 com.liferay.portal.kernel.util.OrderByComparator obc)
390 throws com.liferay.portal.kernel.exception.SystemException {
391 return getService()
392 .getCompanyMessages(companyId, status, start, end, obc);
393 }
394
395 public static int getCompanyMessagesCount(long companyId, int status)
396 throws com.liferay.portal.kernel.exception.SystemException {
397 return getService().getCompanyMessagesCount(companyId, status);
398 }
399
400 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
401 long userId, long groupId, java.lang.String className, long classPK,
402 int status)
403 throws com.liferay.portal.kernel.exception.PortalException,
404 com.liferay.portal.kernel.exception.SystemException {
405 return getService()
406 .getDiscussionMessageDisplay(userId, groupId, className,
407 classPK, status);
408 }
409
410 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
411 long userId, long groupId, java.lang.String className, long classPK,
412 int status, java.lang.String threadView)
413 throws com.liferay.portal.kernel.exception.PortalException,
414 com.liferay.portal.kernel.exception.SystemException {
415 return getService()
416 .getDiscussionMessageDisplay(userId, groupId, className,
417 classPK, status, threadView);
418 }
419
420 public static int getDiscussionMessagesCount(long classNameId,
421 long classPK, int status)
422 throws com.liferay.portal.kernel.exception.SystemException {
423 return getService()
424 .getDiscussionMessagesCount(classNameId, classPK, status);
425 }
426
427 public static int getDiscussionMessagesCount(java.lang.String className,
428 long classPK, int status)
429 throws com.liferay.portal.kernel.exception.SystemException {
430 return getService()
431 .getDiscussionMessagesCount(className, classPK, status);
432 }
433
434 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
435 java.lang.String className)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getService().getDiscussions(className);
438 }
439
440 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
441 long groupId, int status, int start, int end)
442 throws com.liferay.portal.kernel.exception.SystemException {
443 return getService().getGroupMessages(groupId, status, start, end);
444 }
445
446 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
447 long groupId, int status, int start, int end,
448 com.liferay.portal.kernel.util.OrderByComparator obc)
449 throws com.liferay.portal.kernel.exception.SystemException {
450 return getService().getGroupMessages(groupId, status, start, end, obc);
451 }
452
453 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
454 long groupId, long userId, int status, int start, int end)
455 throws com.liferay.portal.kernel.exception.SystemException {
456 return getService().getGroupMessages(groupId, userId, status, start, end);
457 }
458
459 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
460 long groupId, long userId, int status, int start, int end,
461 com.liferay.portal.kernel.util.OrderByComparator obc)
462 throws com.liferay.portal.kernel.exception.SystemException {
463 return getService()
464 .getGroupMessages(groupId, userId, status, start, end, obc);
465 }
466
467 public static int getGroupMessagesCount(long groupId, int status)
468 throws com.liferay.portal.kernel.exception.SystemException {
469 return getService().getGroupMessagesCount(groupId, status);
470 }
471
472 public static int getGroupMessagesCount(long groupId, long userId,
473 int status) throws com.liferay.portal.kernel.exception.SystemException {
474 return getService().getGroupMessagesCount(groupId, userId, status);
475 }
476
477 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
478 long messageId)
479 throws com.liferay.portal.kernel.exception.PortalException,
480 com.liferay.portal.kernel.exception.SystemException {
481 return getService().getMessage(messageId);
482 }
483
484 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
485 long messageId, int status, java.lang.String threadView,
486 boolean includePrevAndNext)
487 throws com.liferay.portal.kernel.exception.PortalException,
488 com.liferay.portal.kernel.exception.SystemException {
489 return getService()
490 .getMessageDisplay(messageId, status, threadView,
491 includePrevAndNext);
492 }
493
494 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
495 com.liferay.portlet.messageboards.model.MBMessage message, int status,
496 java.lang.String threadView, boolean includePrevAndNext)
497 throws com.liferay.portal.kernel.exception.PortalException,
498 com.liferay.portal.kernel.exception.SystemException {
499 return getService()
500 .getMessageDisplay(message, status, threadView,
501 includePrevAndNext);
502 }
503
504 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
505 java.lang.String className, long classPK, int status)
506 throws com.liferay.portal.kernel.exception.SystemException {
507 return getService().getMessages(className, classPK, status);
508 }
509
510 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
511 throws com.liferay.portal.kernel.exception.SystemException {
512 return getService().getNoAssetMessages();
513 }
514
515 public static int getPositionInThread(long messageId)
516 throws com.liferay.portal.kernel.exception.PortalException,
517 com.liferay.portal.kernel.exception.SystemException {
518 return getService().getPositionInThread(messageId);
519 }
520
521 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
522 long threadId, int status)
523 throws com.liferay.portal.kernel.exception.SystemException {
524 return getService().getThreadMessages(threadId, status);
525 }
526
527 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
528 long threadId, int status,
529 java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
530 throws com.liferay.portal.kernel.exception.SystemException {
531 return getService().getThreadMessages(threadId, status, comparator);
532 }
533
534 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
535 long threadId, int status, int start, int end)
536 throws com.liferay.portal.kernel.exception.SystemException {
537 return getService().getThreadMessages(threadId, status, start, end);
538 }
539
540 public static int getThreadMessagesCount(long threadId, int status)
541 throws com.liferay.portal.kernel.exception.SystemException {
542 return getService().getThreadMessagesCount(threadId, status);
543 }
544
545 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
546 long threadId, int status, int start, int end)
547 throws com.liferay.portal.kernel.exception.SystemException {
548 return getService()
549 .getThreadRepliesMessages(threadId, status, start, end);
550 }
551
552 public static void subscribeMessage(long userId, long messageId)
553 throws com.liferay.portal.kernel.exception.PortalException,
554 com.liferay.portal.kernel.exception.SystemException {
555 getService().subscribeMessage(userId, messageId);
556 }
557
558 public static void unsubscribeMessage(long userId, long messageId)
559 throws com.liferay.portal.kernel.exception.PortalException,
560 com.liferay.portal.kernel.exception.SystemException {
561 getService().unsubscribeMessage(userId, messageId);
562 }
563
564 public static void updateAsset(long userId,
565 com.liferay.portlet.messageboards.model.MBMessage message,
566 long[] assetCategoryIds, java.lang.String[] assetTagNames)
567 throws com.liferay.portal.kernel.exception.PortalException,
568 com.liferay.portal.kernel.exception.SystemException {
569 getService()
570 .updateAsset(userId, message, assetCategoryIds, assetTagNames);
571 }
572
573 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
574 long userId, long messageId, java.lang.String subject,
575 java.lang.String body, int workflowAction)
576 throws com.liferay.portal.kernel.exception.PortalException,
577 com.liferay.portal.kernel.exception.SystemException {
578 return getService()
579 .updateDiscussionMessage(userId, messageId, subject, body,
580 workflowAction);
581 }
582
583 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
584 long userId, long messageId, java.lang.String subject,
585 java.lang.String body,
586 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
587 java.util.List<java.lang.String> existingFiles, double priority,
588 boolean allowPingbacks,
589 com.liferay.portal.service.ServiceContext serviceContext)
590 throws com.liferay.portal.kernel.exception.PortalException,
591 com.liferay.portal.kernel.exception.SystemException {
592 return getService()
593 .updateMessage(userId, messageId, subject, body, files,
594 existingFiles, priority, allowPingbacks, serviceContext);
595 }
596
597 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
598 long messageId, java.lang.String body)
599 throws com.liferay.portal.kernel.exception.PortalException,
600 com.liferay.portal.kernel.exception.SystemException {
601 return getService().updateMessage(messageId, body);
602 }
603
604 public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
605 long userId, long messageId, int status,
606 com.liferay.portal.service.ServiceContext serviceContext)
607 throws com.liferay.portal.kernel.exception.PortalException,
608 com.liferay.portal.kernel.exception.SystemException {
609 return getService()
610 .updateStatus(userId, messageId, status, serviceContext);
611 }
612
613 public static void updateUserName(long userId, java.lang.String userName)
614 throws com.liferay.portal.kernel.exception.SystemException {
615 getService().updateUserName(userId, userName);
616 }
617
618 public static MBMessageLocalService getService() {
619 if (_service == null) {
620 _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
621 }
622
623 return _service;
624 }
625
626 public void setService(MBMessageLocalService service) {
627 _service = service;
628 }
629
630 private static MBMessageLocalService _service;
631 }