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