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
053 public static java.lang.String getBeanIdentifier() {
054 return getService().getBeanIdentifier();
055 }
056
057 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
058 long groupId, long userId, java.util.Date modifiedDate, int status,
059 int start, int end)
060 throws com.liferay.portal.kernel.exception.PortalException {
061 return getService()
062 .getGroupThreads(groupId, userId, modifiedDate, status,
063 start, 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 return getService().getGroupThreads(groupId, userId, status, 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,
074 boolean includeAnonymous, int start, int end)
075 throws com.liferay.portal.kernel.exception.PortalException {
076 return getService()
077 .getGroupThreads(groupId, userId, status, subscribed,
078 includeAnonymous, start, end);
079 }
080
081 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
082 long groupId, long userId, int status, boolean subscribed, int start,
083 int end) throws com.liferay.portal.kernel.exception.PortalException {
084 return getService()
085 .getGroupThreads(groupId, userId, status, subscribed, start,
086 end);
087 }
088
089 public static int getGroupThreadsCount(long groupId, long userId,
090 java.util.Date modifiedDate, int status) {
091 return getService()
092 .getGroupThreadsCount(groupId, userId, modifiedDate, status);
093 }
094
095 public static int getGroupThreadsCount(long groupId, long userId, int status) {
096 return getService().getGroupThreadsCount(groupId, userId, status);
097 }
098
099 public static int getGroupThreadsCount(long groupId, long userId,
100 int status, boolean subscribed) {
101 return getService()
102 .getGroupThreadsCount(groupId, userId, status, subscribed);
103 }
104
105 public static int getGroupThreadsCount(long groupId, long userId,
106 int status, boolean subscribed, boolean includeAnonymous) {
107 return getService()
108 .getGroupThreadsCount(groupId, userId, status, subscribed,
109 includeAnonymous);
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
169 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
170 getService().setBeanIdentifier(beanIdentifier);
171 }
172
173 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
174 long messageId, java.lang.String subject,
175 com.liferay.portal.service.ServiceContext serviceContext)
176 throws com.liferay.portal.kernel.exception.PortalException {
177 return getService().splitThread(messageId, subject, serviceContext);
178 }
179
180 public static void unlockThread(long threadId)
181 throws com.liferay.portal.kernel.exception.PortalException {
182 getService().unlockThread(threadId);
183 }
184
185 public static MBThreadService getService() {
186 if (_service == null) {
187 _service = (MBThreadService)PortalBeanLocatorUtil.locate(MBThreadService.class.getName());
188
189 ReferenceRegistry.registerReference(MBThreadServiceUtil.class,
190 "_service");
191 }
192
193 return _service;
194 }
195
196
199 @Deprecated
200 public void setService(MBThreadService service) {
201 }
202
203 private static MBThreadService _service;
204 }