001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class MBThreadServiceUtil {
033 public static void deleteThread(long threadId)
034 throws com.liferay.portal.kernel.exception.PortalException,
035 com.liferay.portal.kernel.exception.SystemException {
036 getService().deleteThread(threadId);
037 }
038
039 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
040 long groupId, long userId, int status, boolean subscribed,
041 boolean includeAnonymous, int start, int end)
042 throws com.liferay.portal.kernel.exception.PortalException,
043 com.liferay.portal.kernel.exception.SystemException {
044 return getService()
045 .getGroupThreads(groupId, userId, status, subscribed,
046 includeAnonymous, start, end);
047 }
048
049 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
050 long groupId, long userId, int status, boolean subscribed, int start,
051 int end)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException {
054 return getService()
055 .getGroupThreads(groupId, userId, status, subscribed, start,
056 end);
057 }
058
059 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
060 long groupId, long userId, int status, int start, int end)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 return getService().getGroupThreads(groupId, userId, status, start, end);
064 }
065
066 public static int getGroupThreadsCount(long groupId, long userId, int status)
067 throws com.liferay.portal.kernel.exception.SystemException {
068 return getService().getGroupThreadsCount(groupId, userId, status);
069 }
070
071 public static int getGroupThreadsCount(long groupId, long userId,
072 int status, boolean subscribed)
073 throws com.liferay.portal.kernel.exception.SystemException {
074 return getService()
075 .getGroupThreadsCount(groupId, userId, status, subscribed);
076 }
077
078 public static int getGroupThreadsCount(long groupId, long userId,
079 int status, boolean subscribed, boolean includeAnonymous)
080 throws com.liferay.portal.kernel.exception.SystemException {
081 return getService()
082 .getGroupThreadsCount(groupId, userId, status, subscribed,
083 includeAnonymous);
084 }
085
086 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
087 long groupId, long categoryId, int status, int start, int end)
088 throws com.liferay.portal.kernel.exception.SystemException {
089 return getService().getThreads(groupId, categoryId, status, start, end);
090 }
091
092 public static int getThreadsCount(long groupId, long categoryId, int status)
093 throws com.liferay.portal.kernel.exception.SystemException {
094 return getService().getThreadsCount(groupId, categoryId, status);
095 }
096
097 public static com.liferay.portal.model.Lock lockThread(long threadId)
098 throws com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 return getService().lockThread(threadId);
101 }
102
103 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
104 long categoryId, long threadId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 return getService().moveThread(categoryId, threadId);
108 }
109
110 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
111 long messageId, com.liferay.portal.service.ServiceContext serviceContext)
112 throws com.liferay.portal.kernel.exception.PortalException,
113 com.liferay.portal.kernel.exception.SystemException {
114 return getService().splitThread(messageId, serviceContext);
115 }
116
117 public static void unlockThread(long threadId)
118 throws com.liferay.portal.kernel.exception.PortalException,
119 com.liferay.portal.kernel.exception.SystemException {
120 getService().unlockThread(threadId);
121 }
122
123 public static MBThreadService getService() {
124 if (_service == null) {
125 _service = (MBThreadService)PortalBeanLocatorUtil.locate(MBThreadService.class.getName());
126 }
127
128 return _service;
129 }
130
131 public void setService(MBThreadService service) {
132 _service = service;
133 }
134
135 private static MBThreadService _service;
136 }