001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class MBThreadServiceUtil {
038
043 public static void deleteThread(long threadId)
044 throws com.liferay.portal.kernel.exception.PortalException {
045 getService().deleteThread(threadId);
046 }
047
048 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
049 long groupId, long userId, java.util.Date modifiedDate, int status,
050 int start, int end)
051 throws com.liferay.portal.kernel.exception.PortalException {
052 return getService()
053 .getGroupThreads(groupId, userId, modifiedDate, status,
054 start, end);
055 }
056
057 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
058 long groupId, long userId, int status, int start, int end)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 return getService().getGroupThreads(groupId, userId, status, start, end);
061 }
062
063 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
064 long groupId, long userId, int status, boolean subscribed,
065 boolean includeAnonymous, int start, int end)
066 throws com.liferay.portal.kernel.exception.PortalException {
067 return getService()
068 .getGroupThreads(groupId, userId, status, subscribed,
069 includeAnonymous, start, end);
070 }
071
072 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
073 long groupId, long userId, int status, boolean subscribed, int start,
074 int end) throws com.liferay.portal.kernel.exception.PortalException {
075 return getService()
076 .getGroupThreads(groupId, userId, status, subscribed, start,
077 end);
078 }
079
080 public static int getGroupThreadsCount(long groupId, long userId,
081 java.util.Date modifiedDate, int status) {
082 return getService()
083 .getGroupThreadsCount(groupId, userId, modifiedDate, status);
084 }
085
086 public static int getGroupThreadsCount(long groupId, long userId, int status) {
087 return getService().getGroupThreadsCount(groupId, userId, status);
088 }
089
090 public static int getGroupThreadsCount(long groupId, long userId,
091 int status, boolean subscribed) {
092 return getService()
093 .getGroupThreadsCount(groupId, userId, status, subscribed);
094 }
095
096 public static int getGroupThreadsCount(long groupId, long userId,
097 int status, boolean subscribed, boolean includeAnonymous) {
098 return getService()
099 .getGroupThreadsCount(groupId, userId, status, subscribed,
100 includeAnonymous);
101 }
102
103
108 public static java.lang.String getOSGiServiceIdentifier() {
109 return getService().getOSGiServiceIdentifier();
110 }
111
112 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
113 long groupId, long categoryId, int status, int start, int end) {
114 return getService().getThreads(groupId, categoryId, status, start, end);
115 }
116
117 public static int getThreadsCount(long groupId, long categoryId, int status) {
118 return getService().getThreadsCount(groupId, categoryId, status);
119 }
120
121 public static com.liferay.portal.kernel.lock.Lock lockThread(long threadId)
122 throws com.liferay.portal.kernel.exception.PortalException {
123 return getService().lockThread(threadId);
124 }
125
126 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
127 long categoryId, long threadId)
128 throws com.liferay.portal.kernel.exception.PortalException {
129 return getService().moveThread(categoryId, threadId);
130 }
131
132 public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
133 long categoryId, long threadId)
134 throws com.liferay.portal.kernel.exception.PortalException {
135 return getService().moveThreadFromTrash(categoryId, threadId);
136 }
137
138 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
139 long threadId)
140 throws com.liferay.portal.kernel.exception.PortalException {
141 return getService().moveThreadToTrash(threadId);
142 }
143
144 public static void restoreThreadFromTrash(long threadId)
145 throws com.liferay.portal.kernel.exception.PortalException {
146 getService().restoreThreadFromTrash(threadId);
147 }
148
149 public static com.liferay.portal.kernel.search.Hits search(long groupId,
150 long creatorUserId, long startDate, long endDate, int status,
151 int start, int end)
152 throws com.liferay.portal.kernel.exception.PortalException {
153 return getService()
154 .search(groupId, creatorUserId, startDate, endDate, status,
155 start, end);
156 }
157
158 public static com.liferay.portal.kernel.search.Hits search(long groupId,
159 long creatorUserId, int status, int start, int end)
160 throws com.liferay.portal.kernel.exception.PortalException {
161 return getService().search(groupId, creatorUserId, status, start, end);
162 }
163
164 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
165 long messageId, java.lang.String subject,
166 com.liferay.portal.service.ServiceContext serviceContext)
167 throws com.liferay.portal.kernel.exception.PortalException {
168 return getService().splitThread(messageId, subject, serviceContext);
169 }
170
171 public static void unlockThread(long threadId)
172 throws com.liferay.portal.kernel.exception.PortalException {
173 getService().unlockThread(threadId);
174 }
175
176 public static MBThreadService getService() {
177 if (_service == null) {
178 _service = (MBThreadService)PortalBeanLocatorUtil.locate(MBThreadService.class.getName());
179
180 ReferenceRegistry.registerReference(MBThreadServiceUtil.class,
181 "_service");
182 }
183
184 return _service;
185 }
186
187 private static MBThreadService _service;
188 }