001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class MBMessageLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
049 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addMBMessage(mbMessage);
052 }
053
054
060 public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
061 long messageId) {
062 return getService().createMBMessage(messageId);
063 }
064
065
072 public static void deleteMBMessage(long messageId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteMBMessage(messageId);
076 }
077
078
084 public static void deleteMBMessage(
085 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteMBMessage(mbMessage);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
170 long messageId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getMBMessage(messageId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
192 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
193 java.lang.String uuid, long groupId)
194 throws com.liferay.portal.kernel.exception.PortalException,
195 com.liferay.portal.kernel.exception.SystemException {
196 return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
197 }
198
199
211 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
212 int start, int end)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getMBMessages(start, end);
215 }
216
217
223 public static int getMBMessagesCount()
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getService().getMBMessagesCount();
226 }
227
228
235 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
236 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 return getService().updateMBMessage(mbMessage);
239 }
240
241
249 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
250 com.liferay.portlet.messageboards.model.MBMessage mbMessage,
251 boolean merge)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 return getService().updateMBMessage(mbMessage, merge);
254 }
255
256
261 public static java.lang.String getBeanIdentifier() {
262 return getService().getBeanIdentifier();
263 }
264
265
270 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
271 getService().setBeanIdentifier(beanIdentifier);
272 }
273
274 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
275 long userId, java.lang.String userName, long groupId,
276 java.lang.String className, long classPK, int workflowAction)
277 throws com.liferay.portal.kernel.exception.PortalException,
278 com.liferay.portal.kernel.exception.SystemException {
279 return getService()
280 .addDiscussionMessage(userId, userName, groupId, className,
281 classPK, workflowAction);
282 }
283
284 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
285 long userId, java.lang.String userName, long groupId,
286 java.lang.String className, long classPK, long threadId,
287 long parentMessageId, java.lang.String subject, java.lang.String body,
288 com.liferay.portal.service.ServiceContext serviceContext)
289 throws com.liferay.portal.kernel.exception.PortalException,
290 com.liferay.portal.kernel.exception.SystemException {
291 return getService()
292 .addDiscussionMessage(userId, userName, groupId, className,
293 classPK, threadId, parentMessageId, subject, body, serviceContext);
294 }
295
296 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
297 long userId, java.lang.String userName, long groupId, long categoryId,
298 long threadId, long parentMessageId, java.lang.String subject,
299 java.lang.String body,
300 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
301 boolean anonymous, double priority, boolean allowPingbacks,
302 com.liferay.portal.service.ServiceContext serviceContext)
303 throws com.liferay.portal.kernel.exception.PortalException,
304 com.liferay.portal.kernel.exception.SystemException {
305 return getService()
306 .addMessage(userId, userName, groupId, categoryId, threadId,
307 parentMessageId, subject, body, files, anonymous, priority,
308 allowPingbacks, serviceContext);
309 }
310
311 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
312 long userId, java.lang.String userName, long groupId, long categoryId,
313 java.lang.String subject, java.lang.String body,
314 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
315 boolean anonymous, double priority, boolean allowPingbacks,
316 com.liferay.portal.service.ServiceContext serviceContext)
317 throws com.liferay.portal.kernel.exception.PortalException,
318 com.liferay.portal.kernel.exception.SystemException {
319 return getService()
320 .addMessage(userId, userName, groupId, categoryId, subject,
321 body, files, anonymous, priority, allowPingbacks, serviceContext);
322 }
323
324 public static void addMessageResources(long messageId,
325 boolean addCommunityPermissions, boolean addGuestPermissions)
326 throws com.liferay.portal.kernel.exception.PortalException,
327 com.liferay.portal.kernel.exception.SystemException {
328 getService()
329 .addMessageResources(messageId, addCommunityPermissions,
330 addGuestPermissions);
331 }
332
333 public static void addMessageResources(long messageId,
334 java.lang.String[] communityPermissions,
335 java.lang.String[] guestPermissions)
336 throws com.liferay.portal.kernel.exception.PortalException,
337 com.liferay.portal.kernel.exception.SystemException {
338 getService()
339 .addMessageResources(messageId, communityPermissions,
340 guestPermissions);
341 }
342
343 public static void addMessageResources(
344 com.liferay.portlet.messageboards.model.MBMessage message,
345 boolean addCommunityPermissions, boolean addGuestPermissions)
346 throws com.liferay.portal.kernel.exception.PortalException,
347 com.liferay.portal.kernel.exception.SystemException {
348 getService()
349 .addMessageResources(message, addCommunityPermissions,
350 addGuestPermissions);
351 }
352
353 public static void addMessageResources(
354 com.liferay.portlet.messageboards.model.MBMessage message,
355 java.lang.String[] communityPermissions,
356 java.lang.String[] guestPermissions)
357 throws com.liferay.portal.kernel.exception.PortalException,
358 com.liferay.portal.kernel.exception.SystemException {
359 getService()
360 .addMessageResources(message, communityPermissions, guestPermissions);
361 }
362
363 public static void deleteDiscussionMessage(long messageId)
364 throws com.liferay.portal.kernel.exception.PortalException,
365 com.liferay.portal.kernel.exception.SystemException {
366 getService().deleteDiscussionMessage(messageId);
367 }
368
369 public static void deleteDiscussionMessages(java.lang.String className,
370 long classPK)
371 throws com.liferay.portal.kernel.exception.PortalException,
372 com.liferay.portal.kernel.exception.SystemException {
373 getService().deleteDiscussionMessages(className, classPK);
374 }
375
376 public static void deleteMessage(long messageId)
377 throws com.liferay.portal.kernel.exception.PortalException,
378 com.liferay.portal.kernel.exception.SystemException {
379 getService().deleteMessage(messageId);
380 }
381
382 public static void deleteMessage(
383 com.liferay.portlet.messageboards.model.MBMessage message)
384 throws com.liferay.portal.kernel.exception.PortalException,
385 com.liferay.portal.kernel.exception.SystemException {
386 getService().deleteMessage(message);
387 }
388
389 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
390 long groupId, long categoryId, int status, int start, int end)
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return getService()
393 .getCategoryMessages(groupId, categoryId, status, start, end);
394 }
395
396 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
397 long groupId, long categoryId, int status, int start, int end,
398 com.liferay.portal.kernel.util.OrderByComparator obc)
399 throws com.liferay.portal.kernel.exception.SystemException {
400 return getService()
401 .getCategoryMessages(groupId, categoryId, status, start,
402 end, obc);
403 }
404
405 public static int getCategoryMessagesCount(long groupId, long categoryId,
406 int status) throws com.liferay.portal.kernel.exception.SystemException {
407 return getService().getCategoryMessagesCount(groupId, categoryId, status);
408 }
409
410 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
411 long companyId, int status, int start, int end)
412 throws com.liferay.portal.kernel.exception.SystemException {
413 return getService().getCompanyMessages(companyId, status, start, end);
414 }
415
416 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
417 long companyId, int status, int start, int end,
418 com.liferay.portal.kernel.util.OrderByComparator obc)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 return getService()
421 .getCompanyMessages(companyId, status, start, end, obc);
422 }
423
424 public static int getCompanyMessagesCount(long companyId, int status)
425 throws com.liferay.portal.kernel.exception.SystemException {
426 return getService().getCompanyMessagesCount(companyId, status);
427 }
428
429 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
430 long userId, long groupId, java.lang.String className, long classPK,
431 int status)
432 throws com.liferay.portal.kernel.exception.PortalException,
433 com.liferay.portal.kernel.exception.SystemException {
434 return getService()
435 .getDiscussionMessageDisplay(userId, groupId, className,
436 classPK, status);
437 }
438
439 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
440 long userId, long groupId, java.lang.String className, long classPK,
441 int status, java.lang.String threadView)
442 throws com.liferay.portal.kernel.exception.PortalException,
443 com.liferay.portal.kernel.exception.SystemException {
444 return getService()
445 .getDiscussionMessageDisplay(userId, groupId, className,
446 classPK, status, threadView);
447 }
448
449 public static int getDiscussionMessagesCount(long classNameId,
450 long classPK, int status)
451 throws com.liferay.portal.kernel.exception.SystemException {
452 return getService()
453 .getDiscussionMessagesCount(classNameId, classPK, status);
454 }
455
456 public static int getDiscussionMessagesCount(java.lang.String className,
457 long classPK, int status)
458 throws com.liferay.portal.kernel.exception.SystemException {
459 return getService()
460 .getDiscussionMessagesCount(className, classPK, status);
461 }
462
463 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
464 java.lang.String className)
465 throws com.liferay.portal.kernel.exception.SystemException {
466 return getService().getDiscussions(className);
467 }
468
469 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
470 long groupId, int status, int start, int end)
471 throws com.liferay.portal.kernel.exception.SystemException {
472 return getService().getGroupMessages(groupId, status, start, end);
473 }
474
475 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
476 long groupId, int status, int start, int end,
477 com.liferay.portal.kernel.util.OrderByComparator obc)
478 throws com.liferay.portal.kernel.exception.SystemException {
479 return getService().getGroupMessages(groupId, status, start, end, obc);
480 }
481
482 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
483 long groupId, long userId, int status, int start, int end)
484 throws com.liferay.portal.kernel.exception.SystemException {
485 return getService().getGroupMessages(groupId, userId, status, start, end);
486 }
487
488 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
489 long groupId, long userId, int status, int start, int end,
490 com.liferay.portal.kernel.util.OrderByComparator obc)
491 throws com.liferay.portal.kernel.exception.SystemException {
492 return getService()
493 .getGroupMessages(groupId, userId, status, start, end, obc);
494 }
495
496 public static int getGroupMessagesCount(long groupId, int status)
497 throws com.liferay.portal.kernel.exception.SystemException {
498 return getService().getGroupMessagesCount(groupId, status);
499 }
500
501 public static int getGroupMessagesCount(long groupId, long userId,
502 int status) throws com.liferay.portal.kernel.exception.SystemException {
503 return getService().getGroupMessagesCount(groupId, userId, status);
504 }
505
506 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
507 long messageId)
508 throws com.liferay.portal.kernel.exception.PortalException,
509 com.liferay.portal.kernel.exception.SystemException {
510 return getService().getMessage(messageId);
511 }
512
513 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
514 long messageId, int status, java.lang.String threadView,
515 boolean includePrevAndNext)
516 throws com.liferay.portal.kernel.exception.PortalException,
517 com.liferay.portal.kernel.exception.SystemException {
518 return getService()
519 .getMessageDisplay(messageId, status, threadView,
520 includePrevAndNext);
521 }
522
523 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
524 com.liferay.portlet.messageboards.model.MBMessage message, int status,
525 java.lang.String threadView, boolean includePrevAndNext)
526 throws com.liferay.portal.kernel.exception.PortalException,
527 com.liferay.portal.kernel.exception.SystemException {
528 return getService()
529 .getMessageDisplay(message, status, threadView,
530 includePrevAndNext);
531 }
532
533 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
534 java.lang.String className, long classPK, int status)
535 throws com.liferay.portal.kernel.exception.SystemException {
536 return getService().getMessages(className, classPK, status);
537 }
538
539 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
540 throws com.liferay.portal.kernel.exception.SystemException {
541 return getService().getNoAssetMessages();
542 }
543
544 public static int getPositionInThread(long messageId)
545 throws com.liferay.portal.kernel.exception.PortalException,
546 com.liferay.portal.kernel.exception.SystemException {
547 return getService().getPositionInThread(messageId);
548 }
549
550 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
551 long threadId, int status)
552 throws com.liferay.portal.kernel.exception.SystemException {
553 return getService().getThreadMessages(threadId, status);
554 }
555
556 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
557 long threadId, int status,
558 java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
559 throws com.liferay.portal.kernel.exception.SystemException {
560 return getService().getThreadMessages(threadId, status, comparator);
561 }
562
563 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
564 long threadId, int status, int start, int end)
565 throws com.liferay.portal.kernel.exception.SystemException {
566 return getService().getThreadMessages(threadId, status, start, end);
567 }
568
569 public static int getThreadMessagesCount(long threadId, int status)
570 throws com.liferay.portal.kernel.exception.SystemException {
571 return getService().getThreadMessagesCount(threadId, status);
572 }
573
574 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
575 long threadId, int status, int start, int end)
576 throws com.liferay.portal.kernel.exception.SystemException {
577 return getService()
578 .getThreadRepliesMessages(threadId, status, start, end);
579 }
580
581 public static void subscribeMessage(long userId, long messageId)
582 throws com.liferay.portal.kernel.exception.PortalException,
583 com.liferay.portal.kernel.exception.SystemException {
584 getService().subscribeMessage(userId, messageId);
585 }
586
587 public static void unsubscribeMessage(long userId, long messageId)
588 throws com.liferay.portal.kernel.exception.PortalException,
589 com.liferay.portal.kernel.exception.SystemException {
590 getService().unsubscribeMessage(userId, messageId);
591 }
592
593 public static void updateAsset(long userId,
594 com.liferay.portlet.messageboards.model.MBMessage message,
595 long[] assetCategoryIds, java.lang.String[] assetTagNames)
596 throws com.liferay.portal.kernel.exception.PortalException,
597 com.liferay.portal.kernel.exception.SystemException {
598 getService()
599 .updateAsset(userId, message, assetCategoryIds, assetTagNames);
600 }
601
602
606 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
607 long userId, long messageId, java.lang.String className, long classPK,
608 java.lang.String subject, java.lang.String body, int workflowAction)
609 throws com.liferay.portal.kernel.exception.PortalException,
610 com.liferay.portal.kernel.exception.SystemException {
611 return getService()
612 .updateDiscussionMessage(userId, messageId, className,
613 classPK, subject, body, workflowAction);
614 }
615
616 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
617 long userId, long messageId, java.lang.String className, long classPK,
618 java.lang.String subject, java.lang.String body,
619 com.liferay.portal.service.ServiceContext serviceContext)
620 throws com.liferay.portal.kernel.exception.PortalException,
621 com.liferay.portal.kernel.exception.SystemException {
622 return getService()
623 .updateDiscussionMessage(userId, messageId, className,
624 classPK, subject, body, serviceContext);
625 }
626
627 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
628 long userId, long messageId, java.lang.String subject,
629 java.lang.String body,
630 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
631 java.util.List<java.lang.String> existingFiles, double priority,
632 boolean allowPingbacks,
633 com.liferay.portal.service.ServiceContext serviceContext)
634 throws com.liferay.portal.kernel.exception.PortalException,
635 com.liferay.portal.kernel.exception.SystemException {
636 return getService()
637 .updateMessage(userId, messageId, subject, body, files,
638 existingFiles, priority, allowPingbacks, serviceContext);
639 }
640
641 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
642 long messageId, java.lang.String body)
643 throws com.liferay.portal.kernel.exception.PortalException,
644 com.liferay.portal.kernel.exception.SystemException {
645 return getService().updateMessage(messageId, body);
646 }
647
648 public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
649 long userId, long messageId, int status,
650 com.liferay.portal.service.ServiceContext serviceContext)
651 throws com.liferay.portal.kernel.exception.PortalException,
652 com.liferay.portal.kernel.exception.SystemException {
653 return getService()
654 .updateStatus(userId, messageId, status, serviceContext);
655 }
656
657 public static void updateUserName(long userId, java.lang.String userName)
658 throws com.liferay.portal.kernel.exception.SystemException {
659 getService().updateUserName(userId, userName);
660 }
661
662 public static MBMessageLocalService getService() {
663 if (_service == null) {
664 _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
665
666 ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
667 "_service");
668 MethodCache.remove(MBMessageLocalService.class);
669 }
670
671 return _service;
672 }
673
674 public void setService(MBMessageLocalService service) {
675 MethodCache.remove(MBMessageLocalService.class);
676
677 _service = service;
678
679 ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
680 "_service");
681 MethodCache.remove(MBMessageLocalService.class);
682 }
683
684 private static MBMessageLocalService _service;
685 }