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 MBMessageServiceUtil {
038
043
044
049 public static java.lang.String getBeanIdentifier() {
050 return getService().getBeanIdentifier();
051 }
052
053
058 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059 getService().setBeanIdentifier(beanIdentifier);
060 }
061
062 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
063 long groupId, java.lang.String className, long classPK,
064 java.lang.String permissionClassName, long permissionClassPK,
065 long permissionOwnerId, long threadId, long parentMessageId,
066 java.lang.String subject, java.lang.String body,
067 com.liferay.portal.service.ServiceContext serviceContext)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 return getService()
071 .addDiscussionMessage(groupId, className, classPK,
072 permissionClassName, permissionClassPK, permissionOwnerId,
073 threadId, parentMessageId, subject, body, serviceContext);
074 }
075
076
081 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
082 long groupId, long categoryId, long threadId, long parentMessageId,
083 java.lang.String subject, java.lang.String body,
084 java.lang.String format,
085 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
086 boolean anonymous, double priority, boolean allowPingbacks,
087 com.liferay.portal.service.ServiceContext serviceContext)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException {
090 return getService()
091 .addMessage(groupId, categoryId, threadId, parentMessageId,
092 subject, body, format, inputStreamOVPs, anonymous, priority,
093 allowPingbacks, serviceContext);
094 }
095
096 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
097 long groupId, long categoryId, java.lang.String subject,
098 java.lang.String body, java.lang.String format,
099 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
100 boolean anonymous, double priority, boolean allowPingbacks,
101 com.liferay.portal.service.ServiceContext serviceContext)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getService()
105 .addMessage(groupId, categoryId, subject, body, format,
106 inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
107 }
108
109 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
110 long categoryId, java.lang.String subject, java.lang.String body,
111 com.liferay.portal.service.ServiceContext serviceContext)
112 throws com.liferay.portal.kernel.exception.PortalException,
113 com.liferay.portal.kernel.exception.SystemException {
114 return getService().addMessage(categoryId, subject, body, serviceContext);
115 }
116
117 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
118 long parentMessageId, java.lang.String subject, java.lang.String body,
119 java.lang.String format,
120 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
121 boolean anonymous, double priority, boolean allowPingbacks,
122 com.liferay.portal.service.ServiceContext serviceContext)
123 throws com.liferay.portal.kernel.exception.PortalException,
124 com.liferay.portal.kernel.exception.SystemException {
125 return getService()
126 .addMessage(parentMessageId, subject, body, format,
127 inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
128 }
129
130 public static void deleteDiscussionMessage(long groupId,
131 java.lang.String className, long classPK,
132 java.lang.String permissionClassName, long permissionClassPK,
133 long permissionOwnerId, long messageId)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 getService()
137 .deleteDiscussionMessage(groupId, className, classPK,
138 permissionClassName, permissionClassPK, permissionOwnerId, messageId);
139 }
140
141 public static void deleteMessage(long messageId)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException {
144 getService().deleteMessage(messageId);
145 }
146
147 public static void deleteMessageAttachments(long messageId)
148 throws com.liferay.portal.kernel.exception.PortalException,
149 com.liferay.portal.kernel.exception.SystemException {
150 getService().deleteMessageAttachments(messageId);
151 }
152
153 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
154 long groupId, long categoryId, int status, int start, int end)
155 throws com.liferay.portal.kernel.exception.PortalException,
156 com.liferay.portal.kernel.exception.SystemException {
157 return getService()
158 .getCategoryMessages(groupId, categoryId, status, start, end);
159 }
160
161 public static int getCategoryMessagesCount(long groupId, long categoryId,
162 int status) throws com.liferay.portal.kernel.exception.SystemException {
163 return getService().getCategoryMessagesCount(groupId, categoryId, status);
164 }
165
166 public static java.lang.String getCategoryMessagesRSS(long groupId,
167 long categoryId, int status, int max, java.lang.String type,
168 double version, java.lang.String displayStyle,
169 java.lang.String feedURL, java.lang.String entryURL,
170 com.liferay.portal.theme.ThemeDisplay themeDisplay)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService()
174 .getCategoryMessagesRSS(groupId, categoryId, status, max,
175 type, version, displayStyle, feedURL, entryURL, themeDisplay);
176 }
177
178 public static java.lang.String getCompanyMessagesRSS(long companyId,
179 int status, int max, java.lang.String type, double version,
180 java.lang.String displayStyle, java.lang.String feedURL,
181 java.lang.String entryURL,
182 com.liferay.portal.theme.ThemeDisplay themeDisplay)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService()
186 .getCompanyMessagesRSS(companyId, status, max, type,
187 version, displayStyle, feedURL, entryURL, themeDisplay);
188 }
189
190 public static int getGroupMessagesCount(long groupId, int status)
191 throws com.liferay.portal.kernel.exception.SystemException {
192 return getService().getGroupMessagesCount(groupId, status);
193 }
194
195 public static java.lang.String getGroupMessagesRSS(long groupId,
196 int status, int max, java.lang.String type, double version,
197 java.lang.String displayStyle, java.lang.String feedURL,
198 java.lang.String entryURL,
199 com.liferay.portal.theme.ThemeDisplay themeDisplay)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getService()
203 .getGroupMessagesRSS(groupId, status, max, type, version,
204 displayStyle, feedURL, entryURL, themeDisplay);
205 }
206
207 public static java.lang.String getGroupMessagesRSS(long groupId,
208 long userId, int status, int max, java.lang.String type,
209 double version, java.lang.String displayStyle,
210 java.lang.String feedURL, java.lang.String entryURL,
211 com.liferay.portal.theme.ThemeDisplay themeDisplay)
212 throws com.liferay.portal.kernel.exception.PortalException,
213 com.liferay.portal.kernel.exception.SystemException {
214 return getService()
215 .getGroupMessagesRSS(groupId, userId, status, max, type,
216 version, displayStyle, feedURL, entryURL, themeDisplay);
217 }
218
219 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
220 long messageId)
221 throws com.liferay.portal.kernel.exception.PortalException,
222 com.liferay.portal.kernel.exception.SystemException {
223 return getService().getMessage(messageId);
224 }
225
226 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
227 long messageId, int status, java.lang.String threadView,
228 boolean includePrevAndNext)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException {
231 return getService()
232 .getMessageDisplay(messageId, status, threadView,
233 includePrevAndNext);
234 }
235
236 public static int getThreadAnswersCount(long groupId, long categoryId,
237 long threadId)
238 throws com.liferay.portal.kernel.exception.SystemException {
239 return getService().getThreadAnswersCount(groupId, categoryId, threadId);
240 }
241
242 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
243 long groupId, long categoryId, long threadId, int status, int start,
244 int end) throws com.liferay.portal.kernel.exception.SystemException {
245 return getService()
246 .getThreadMessages(groupId, categoryId, threadId, status,
247 start, end);
248 }
249
250 public static int getThreadMessagesCount(long groupId, long categoryId,
251 long threadId, int status)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 return getService()
254 .getThreadMessagesCount(groupId, categoryId, threadId, status);
255 }
256
257 public static java.lang.String getThreadMessagesRSS(long threadId,
258 int status, int max, java.lang.String type, double version,
259 java.lang.String displayStyle, java.lang.String feedURL,
260 java.lang.String entryURL,
261 com.liferay.portal.theme.ThemeDisplay themeDisplay)
262 throws com.liferay.portal.kernel.exception.PortalException,
263 com.liferay.portal.kernel.exception.SystemException {
264 return getService()
265 .getThreadMessagesRSS(threadId, status, max, type, version,
266 displayStyle, feedURL, entryURL, themeDisplay);
267 }
268
269 public static void restoreMessageAttachmentFromTrash(long messageId,
270 java.lang.String fileName)
271 throws com.liferay.portal.kernel.exception.PortalException,
272 com.liferay.portal.kernel.exception.SystemException {
273 getService().restoreMessageAttachmentFromTrash(messageId, fileName);
274 }
275
276 public static void subscribeMessage(long messageId)
277 throws com.liferay.portal.kernel.exception.PortalException,
278 com.liferay.portal.kernel.exception.SystemException {
279 getService().subscribeMessage(messageId);
280 }
281
282 public static void unsubscribeMessage(long messageId)
283 throws com.liferay.portal.kernel.exception.PortalException,
284 com.liferay.portal.kernel.exception.SystemException {
285 getService().unsubscribeMessage(messageId);
286 }
287
288 public static void updateAnswer(long messageId, boolean answer,
289 boolean cascade)
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 getService().updateAnswer(messageId, answer, cascade);
293 }
294
295 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
296 java.lang.String className, long classPK,
297 java.lang.String permissionClassName, long permissionClassPK,
298 long permissionOwnerId, long messageId, java.lang.String subject,
299 java.lang.String body,
300 com.liferay.portal.service.ServiceContext serviceContext)
301 throws com.liferay.portal.kernel.exception.PortalException,
302 com.liferay.portal.kernel.exception.SystemException {
303 return getService()
304 .updateDiscussionMessage(className, classPK,
305 permissionClassName, permissionClassPK, permissionOwnerId,
306 messageId, subject, body, serviceContext);
307 }
308
309 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
310 long messageId, java.lang.String subject, java.lang.String body,
311 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
312 java.util.List<java.lang.String> existingFiles, double priority,
313 boolean allowPingbacks,
314 com.liferay.portal.service.ServiceContext serviceContext)
315 throws com.liferay.portal.kernel.exception.PortalException,
316 com.liferay.portal.kernel.exception.SystemException {
317 return getService()
318 .updateMessage(messageId, subject, body, inputStreamOVPs,
319 existingFiles, priority, allowPingbacks, serviceContext);
320 }
321
322 public static MBMessageService getService() {
323 if (_service == null) {
324 _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
325
326 ReferenceRegistry.registerReference(MBMessageServiceUtil.class,
327 "_service");
328 }
329
330 return _service;
331 }
332
333
336 public void setService(MBMessageService service) {
337 }
338
339 private static MBMessageService _service;
340 }