001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class MBMessageLocalServiceUtil {
033 public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
034 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
035 throws com.liferay.portal.kernel.exception.SystemException {
036 return getService().addMBMessage(mbMessage);
037 }
038
039 public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
040 long messageId) {
041 return getService().createMBMessage(messageId);
042 }
043
044 public static void deleteMBMessage(long messageId)
045 throws com.liferay.portal.kernel.exception.PortalException,
046 com.liferay.portal.kernel.exception.SystemException {
047 getService().deleteMBMessage(messageId);
048 }
049
050 public static void deleteMBMessage(
051 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
052 throws com.liferay.portal.kernel.exception.SystemException {
053 getService().deleteMBMessage(mbMessage);
054 }
055
056 @SuppressWarnings("unchecked")
057 public static java.util.List dynamicQuery(
058 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059 throws com.liferay.portal.kernel.exception.SystemException {
060 return getService().dynamicQuery(dynamicQuery);
061 }
062
063 @SuppressWarnings("unchecked")
064 public static java.util.List dynamicQuery(
065 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066 int end) throws com.liferay.portal.kernel.exception.SystemException {
067 return getService().dynamicQuery(dynamicQuery, start, end);
068 }
069
070 @SuppressWarnings("unchecked")
071 public static java.util.List dynamicQuery(
072 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073 int end,
074 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075 throws com.liferay.portal.kernel.exception.SystemException {
076 return getService()
077 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078 }
079
080 public static long dynamicQueryCount(
081 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 return getService().dynamicQueryCount(dynamicQuery);
084 }
085
086 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
087 long messageId)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException {
090 return getService().getMBMessage(messageId);
091 }
092
093 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
094 java.lang.String uuid, long groupId)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
098 }
099
100 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
101 int start, int end)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().getMBMessages(start, end);
104 }
105
106 public static int getMBMessagesCount()
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().getMBMessagesCount();
109 }
110
111 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
112 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getService().updateMBMessage(mbMessage);
115 }
116
117 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
118 com.liferay.portlet.messageboards.model.MBMessage mbMessage,
119 boolean merge)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().updateMBMessage(mbMessage, merge);
122 }
123
124 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
125 long userId, java.lang.String userName, long groupId,
126 java.lang.String className, long classPK, int workflowAction)
127 throws com.liferay.portal.kernel.exception.PortalException,
128 com.liferay.portal.kernel.exception.SystemException {
129 return getService()
130 .addDiscussionMessage(userId, userName, groupId, className,
131 classPK, workflowAction);
132 }
133
134 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
135 long userId, java.lang.String userName, long groupId,
136 java.lang.String className, long classPK, long threadId,
137 long parentMessageId, java.lang.String subject, java.lang.String body,
138 com.liferay.portal.service.ServiceContext serviceContext)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 return getService()
142 .addDiscussionMessage(userId, userName, groupId, className,
143 classPK, threadId, parentMessageId, subject, body, serviceContext);
144 }
145
146 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
147 long userId, java.lang.String userName, long groupId, long categoryId,
148 long threadId, long parentMessageId, java.lang.String subject,
149 java.lang.String body,
150 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
151 boolean anonymous, double priority, boolean allowPingbacks,
152 com.liferay.portal.service.ServiceContext serviceContext)
153 throws com.liferay.portal.kernel.exception.PortalException,
154 com.liferay.portal.kernel.exception.SystemException {
155 return getService()
156 .addMessage(userId, userName, groupId, categoryId, threadId,
157 parentMessageId, subject, body, files, anonymous, priority,
158 allowPingbacks, serviceContext);
159 }
160
161 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
162 long userId, java.lang.String userName, long groupId, long categoryId,
163 java.lang.String subject, java.lang.String body,
164 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
165 boolean anonymous, double priority, boolean allowPingbacks,
166 com.liferay.portal.service.ServiceContext serviceContext)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getService()
170 .addMessage(userId, userName, groupId, categoryId, subject,
171 body, files, anonymous, priority, allowPingbacks, serviceContext);
172 }
173
174 public static void addMessageResources(long messageId,
175 boolean addCommunityPermissions, boolean addGuestPermissions)
176 throws com.liferay.portal.kernel.exception.PortalException,
177 com.liferay.portal.kernel.exception.SystemException {
178 getService()
179 .addMessageResources(messageId, addCommunityPermissions,
180 addGuestPermissions);
181 }
182
183 public static void addMessageResources(long messageId,
184 java.lang.String[] communityPermissions,
185 java.lang.String[] guestPermissions)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 getService()
189 .addMessageResources(messageId, communityPermissions,
190 guestPermissions);
191 }
192
193 public static void addMessageResources(
194 com.liferay.portlet.messageboards.model.MBMessage message,
195 boolean addCommunityPermissions, boolean addGuestPermissions)
196 throws com.liferay.portal.kernel.exception.PortalException,
197 com.liferay.portal.kernel.exception.SystemException {
198 getService()
199 .addMessageResources(message, addCommunityPermissions,
200 addGuestPermissions);
201 }
202
203 public static void addMessageResources(
204 com.liferay.portlet.messageboards.model.MBMessage message,
205 java.lang.String[] communityPermissions,
206 java.lang.String[] guestPermissions)
207 throws com.liferay.portal.kernel.exception.PortalException,
208 com.liferay.portal.kernel.exception.SystemException {
209 getService()
210 .addMessageResources(message, communityPermissions, guestPermissions);
211 }
212
213 public static void deleteDiscussionMessage(long messageId)
214 throws com.liferay.portal.kernel.exception.PortalException,
215 com.liferay.portal.kernel.exception.SystemException {
216 getService().deleteDiscussionMessage(messageId);
217 }
218
219 public static void deleteDiscussionMessages(java.lang.String className,
220 long classPK)
221 throws com.liferay.portal.kernel.exception.PortalException,
222 com.liferay.portal.kernel.exception.SystemException {
223 getService().deleteDiscussionMessages(className, classPK);
224 }
225
226 public static void deleteMessage(long messageId)
227 throws com.liferay.portal.kernel.exception.PortalException,
228 com.liferay.portal.kernel.exception.SystemException {
229 getService().deleteMessage(messageId);
230 }
231
232 public static void deleteMessage(
233 com.liferay.portlet.messageboards.model.MBMessage message)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException {
236 getService().deleteMessage(message);
237 }
238
239 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
240 long groupId, long categoryId, int status, int start, int end)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getService()
243 .getCategoryMessages(groupId, categoryId, status, start, end);
244 }
245
246 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
247 long groupId, long categoryId, int status, int start, int end,
248 com.liferay.portal.kernel.util.OrderByComparator obc)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 return getService()
251 .getCategoryMessages(groupId, categoryId, status, start,
252 end, obc);
253 }
254
255 public static int getCategoryMessagesCount(long groupId, long categoryId,
256 int status) throws com.liferay.portal.kernel.exception.SystemException {
257 return getService().getCategoryMessagesCount(groupId, categoryId, status);
258 }
259
260 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
261 long companyId, int status, int start, int end)
262 throws com.liferay.portal.kernel.exception.SystemException {
263 return getService().getCompanyMessages(companyId, status, start, end);
264 }
265
266 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
267 long companyId, int status, int start, int end,
268 com.liferay.portal.kernel.util.OrderByComparator obc)
269 throws com.liferay.portal.kernel.exception.SystemException {
270 return getService()
271 .getCompanyMessages(companyId, status, start, end, obc);
272 }
273
274 public static int getCompanyMessagesCount(long companyId, int status)
275 throws com.liferay.portal.kernel.exception.SystemException {
276 return getService().getCompanyMessagesCount(companyId, status);
277 }
278
279 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
280 long userId, long groupId, java.lang.String className, long classPK,
281 int status)
282 throws com.liferay.portal.kernel.exception.PortalException,
283 com.liferay.portal.kernel.exception.SystemException {
284 return getService()
285 .getDiscussionMessageDisplay(userId, groupId, className,
286 classPK, status);
287 }
288
289 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
290 long userId, long groupId, java.lang.String className, long classPK,
291 int status, java.lang.String threadView)
292 throws com.liferay.portal.kernel.exception.PortalException,
293 com.liferay.portal.kernel.exception.SystemException {
294 return getService()
295 .getDiscussionMessageDisplay(userId, groupId, className,
296 classPK, status, threadView);
297 }
298
299 public static int getDiscussionMessagesCount(long classNameId,
300 long classPK, int status)
301 throws com.liferay.portal.kernel.exception.SystemException {
302 return getService()
303 .getDiscussionMessagesCount(classNameId, classPK, status);
304 }
305
306 public static int getDiscussionMessagesCount(java.lang.String className,
307 long classPK, int status)
308 throws com.liferay.portal.kernel.exception.SystemException {
309 return getService()
310 .getDiscussionMessagesCount(className, classPK, status);
311 }
312
313 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
314 java.lang.String className)
315 throws com.liferay.portal.kernel.exception.SystemException {
316 return getService().getDiscussions(className);
317 }
318
319 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
320 long groupId, int status, int start, int end)
321 throws com.liferay.portal.kernel.exception.SystemException {
322 return getService().getGroupMessages(groupId, status, start, end);
323 }
324
325 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
326 long groupId, int status, int start, int end,
327 com.liferay.portal.kernel.util.OrderByComparator obc)
328 throws com.liferay.portal.kernel.exception.SystemException {
329 return getService().getGroupMessages(groupId, status, start, end, obc);
330 }
331
332 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
333 long groupId, long userId, int status, int start, int end)
334 throws com.liferay.portal.kernel.exception.SystemException {
335 return getService().getGroupMessages(groupId, userId, status, start, end);
336 }
337
338 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
339 long groupId, long userId, int status, int start, int end,
340 com.liferay.portal.kernel.util.OrderByComparator obc)
341 throws com.liferay.portal.kernel.exception.SystemException {
342 return getService()
343 .getGroupMessages(groupId, userId, status, start, end, obc);
344 }
345
346 public static int getGroupMessagesCount(long groupId, int status)
347 throws com.liferay.portal.kernel.exception.SystemException {
348 return getService().getGroupMessagesCount(groupId, status);
349 }
350
351 public static int getGroupMessagesCount(long groupId, long userId,
352 int status) throws com.liferay.portal.kernel.exception.SystemException {
353 return getService().getGroupMessagesCount(groupId, userId, status);
354 }
355
356 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
357 long messageId)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 return getService().getMessage(messageId);
361 }
362
363 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
364 long messageId, int status, java.lang.String threadView,
365 boolean includePrevAndNext)
366 throws com.liferay.portal.kernel.exception.PortalException,
367 com.liferay.portal.kernel.exception.SystemException {
368 return getService()
369 .getMessageDisplay(messageId, status, threadView,
370 includePrevAndNext);
371 }
372
373 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
374 com.liferay.portlet.messageboards.model.MBMessage message, int status,
375 java.lang.String threadView, boolean includePrevAndNext)
376 throws com.liferay.portal.kernel.exception.PortalException,
377 com.liferay.portal.kernel.exception.SystemException {
378 return getService()
379 .getMessageDisplay(message, status, threadView,
380 includePrevAndNext);
381 }
382
383 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
384 java.lang.String className, long classPK, int status)
385 throws com.liferay.portal.kernel.exception.SystemException {
386 return getService().getMessages(className, classPK, status);
387 }
388
389 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
390 throws com.liferay.portal.kernel.exception.SystemException {
391 return getService().getNoAssetMessages();
392 }
393
394 public static int getPositionInThread(long messageId)
395 throws com.liferay.portal.kernel.exception.PortalException,
396 com.liferay.portal.kernel.exception.SystemException {
397 return getService().getPositionInThread(messageId);
398 }
399
400 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
401 long threadId, int status)
402 throws com.liferay.portal.kernel.exception.SystemException {
403 return getService().getThreadMessages(threadId, status);
404 }
405
406 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
407 long threadId, int status,
408 java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return getService().getThreadMessages(threadId, status, comparator);
411 }
412
413 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
414 long threadId, int status, int start, int end)
415 throws com.liferay.portal.kernel.exception.SystemException {
416 return getService().getThreadMessages(threadId, status, start, end);
417 }
418
419 public static int getThreadMessagesCount(long threadId, int status)
420 throws com.liferay.portal.kernel.exception.SystemException {
421 return getService().getThreadMessagesCount(threadId, status);
422 }
423
424 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
425 long threadId, int status, int start, int end)
426 throws com.liferay.portal.kernel.exception.SystemException {
427 return getService()
428 .getThreadRepliesMessages(threadId, status, start, end);
429 }
430
431 public static void subscribeMessage(long userId, long messageId)
432 throws com.liferay.portal.kernel.exception.PortalException,
433 com.liferay.portal.kernel.exception.SystemException {
434 getService().subscribeMessage(userId, messageId);
435 }
436
437 public static void unsubscribeMessage(long userId, long messageId)
438 throws com.liferay.portal.kernel.exception.PortalException,
439 com.liferay.portal.kernel.exception.SystemException {
440 getService().unsubscribeMessage(userId, messageId);
441 }
442
443 public static void updateAsset(long userId,
444 com.liferay.portlet.messageboards.model.MBMessage message,
445 long[] assetCategoryIds, java.lang.String[] assetTagNames)
446 throws com.liferay.portal.kernel.exception.PortalException,
447 com.liferay.portal.kernel.exception.SystemException {
448 getService()
449 .updateAsset(userId, message, assetCategoryIds, assetTagNames);
450 }
451
452 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
453 long userId, long messageId, java.lang.String subject,
454 java.lang.String body, int workflowAction)
455 throws com.liferay.portal.kernel.exception.PortalException,
456 com.liferay.portal.kernel.exception.SystemException {
457 return getService()
458 .updateDiscussionMessage(userId, messageId, subject, body,
459 workflowAction);
460 }
461
462 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
463 long userId, long messageId, java.lang.String subject,
464 java.lang.String body,
465 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
466 java.util.List<java.lang.String> existingFiles, double priority,
467 boolean allowPingbacks,
468 com.liferay.portal.service.ServiceContext serviceContext)
469 throws com.liferay.portal.kernel.exception.PortalException,
470 com.liferay.portal.kernel.exception.SystemException {
471 return getService()
472 .updateMessage(userId, messageId, subject, body, files,
473 existingFiles, priority, allowPingbacks, serviceContext);
474 }
475
476 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
477 long messageId, java.lang.String body)
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 return getService().updateMessage(messageId, body);
481 }
482
483 public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
484 long userId, long messageId, int status,
485 com.liferay.portal.service.ServiceContext serviceContext)
486 throws com.liferay.portal.kernel.exception.PortalException,
487 com.liferay.portal.kernel.exception.SystemException {
488 return getService()
489 .updateStatus(userId, messageId, status, serviceContext);
490 }
491
492 public static void updateUserName(long userId, java.lang.String userName)
493 throws com.liferay.portal.kernel.exception.SystemException {
494 getService().updateUserName(userId, userName);
495 }
496
497 public static MBMessageLocalService getService() {
498 if (_service == null) {
499 _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
500 }
501
502 return _service;
503 }
504
505 public void setService(MBMessageLocalService service) {
506 _service = service;
507 }
508
509 private static MBMessageLocalService _service;
510 }