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 MBThreadServiceUtil {
035
040 public static void deleteThread(long threadId)
041 throws com.liferay.portal.kernel.exception.PortalException,
042 com.liferay.portal.kernel.exception.SystemException {
043 getService().deleteThread(threadId);
044 }
045
046 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
047 long groupId, long userId, int status, boolean subscribed,
048 boolean includeAnonymous, int start, int end)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 return getService()
052 .getGroupThreads(groupId, userId, status, subscribed,
053 includeAnonymous, start, end);
054 }
055
056 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
057 long groupId, long userId, int status, boolean subscribed, int start,
058 int end)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 return getService()
062 .getGroupThreads(groupId, userId, status, subscribed, start,
063 end);
064 }
065
066 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
067 long groupId, long userId, int status, int start, int end)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 return getService().getGroupThreads(groupId, userId, status, start, end);
071 }
072
073 public static int getGroupThreadsCount(long groupId, long userId, int status)
074 throws com.liferay.portal.kernel.exception.SystemException {
075 return getService().getGroupThreadsCount(groupId, userId, status);
076 }
077
078 public static int getGroupThreadsCount(long groupId, long userId,
079 int status, boolean subscribed)
080 throws com.liferay.portal.kernel.exception.SystemException {
081 return getService()
082 .getGroupThreadsCount(groupId, userId, status, subscribed);
083 }
084
085 public static int getGroupThreadsCount(long groupId, long userId,
086 int status, boolean subscribed, boolean includeAnonymous)
087 throws com.liferay.portal.kernel.exception.SystemException {
088 return getService()
089 .getGroupThreadsCount(groupId, userId, status, subscribed,
090 includeAnonymous);
091 }
092
093 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
094 long groupId, long categoryId, int status, int start, int end)
095 throws com.liferay.portal.kernel.exception.SystemException {
096 return getService().getThreads(groupId, categoryId, status, start, end);
097 }
098
099 public static int getThreadsCount(long groupId, long categoryId, int status)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().getThreadsCount(groupId, categoryId, status);
102 }
103
104 public static com.liferay.portal.model.Lock lockThread(long threadId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 return getService().lockThread(threadId);
108 }
109
110 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
111 long categoryId, long threadId)
112 throws com.liferay.portal.kernel.exception.PortalException,
113 com.liferay.portal.kernel.exception.SystemException {
114 return getService().moveThread(categoryId, threadId);
115 }
116
117 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
118 long messageId, java.lang.String subject,
119 com.liferay.portal.service.ServiceContext serviceContext)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getService().splitThread(messageId, subject, serviceContext);
123 }
124
125 public static void unlockThread(long threadId)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException {
128 getService().unlockThread(threadId);
129 }
130
131 public static MBThreadService getService() {
132 if (_service == null) {
133 _service = (MBThreadService)PortalBeanLocatorUtil.locate(MBThreadService.class.getName());
134
135 ReferenceRegistry.registerReference(MBThreadServiceUtil.class,
136 "_service");
137 MethodCache.remove(MBThreadService.class);
138 }
139
140 return _service;
141 }
142
143 public void setService(MBThreadService service) {
144 MethodCache.remove(MBThreadService.class);
145
146 _service = service;
147
148 ReferenceRegistry.registerReference(MBThreadServiceUtil.class,
149 "_service");
150 MethodCache.remove(MBThreadService.class);
151 }
152
153 private static MBThreadService _service;
154 }