1
14
15 package com.liferay.portlet.messageboards.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class MBMessageLocalServiceUtil {
40 public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
41 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
42 throws com.liferay.portal.kernel.exception.SystemException {
43 return getService().addMBMessage(mbMessage);
44 }
45
46 public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
47 long messageId) {
48 return getService().createMBMessage(messageId);
49 }
50
51 public static void deleteMBMessage(long messageId)
52 throws com.liferay.portal.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.SystemException {
54 getService().deleteMBMessage(messageId);
55 }
56
57 public static void deleteMBMessage(
58 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
59 throws com.liferay.portal.kernel.exception.SystemException {
60 getService().deleteMBMessage(mbMessage);
61 }
62
63 @SuppressWarnings("unchecked")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.kernel.exception.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("unchecked")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.kernel.exception.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("unchecked")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.kernel.exception.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static long dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
94 long messageId)
95 throws com.liferay.portal.kernel.exception.PortalException,
96 com.liferay.portal.kernel.exception.SystemException {
97 return getService().getMBMessage(messageId);
98 }
99
100 public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
101 java.lang.String uuid, long groupId)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
105 }
106
107 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
108 int start, int end)
109 throws com.liferay.portal.kernel.exception.SystemException {
110 return getService().getMBMessages(start, end);
111 }
112
113 public static int getMBMessagesCount()
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getService().getMBMessagesCount();
116 }
117
118 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
119 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().updateMBMessage(mbMessage);
122 }
123
124 public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
125 com.liferay.portlet.messageboards.model.MBMessage mbMessage,
126 boolean merge)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getService().updateMBMessage(mbMessage, merge);
129 }
130
131 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
132 long userId, java.lang.String userName, long groupId,
133 java.lang.String className, long classPK, int workflowAction)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 return getService()
137 .addDiscussionMessage(userId, userName, groupId, className,
138 classPK, workflowAction);
139 }
140
141 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
142 java.lang.String uuid, long userId, java.lang.String userName,
143 long groupId, java.lang.String className, long classPK, long threadId,
144 long parentMessageId, java.lang.String subject, java.lang.String body,
145 com.liferay.portal.service.ServiceContext serviceContext)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException {
148 return getService()
149 .addDiscussionMessage(uuid, userId, userName, groupId,
150 className, classPK, threadId, parentMessageId, subject, body,
151 serviceContext);
152 }
153
154 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
155 long userId, java.lang.String userName, long groupId, long categoryId,
156 java.lang.String subject, java.lang.String body,
157 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
158 boolean anonymous, double priority, boolean allowPingbacks,
159 com.liferay.portal.service.ServiceContext serviceContext)
160 throws com.liferay.portal.kernel.exception.PortalException,
161 com.liferay.portal.kernel.exception.SystemException {
162 return getService()
163 .addMessage(userId, userName, groupId, categoryId, subject,
164 body, files, anonymous, priority, allowPingbacks, serviceContext);
165 }
166
167 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
168 long userId, java.lang.String userName, long groupId, long categoryId,
169 long threadId, long parentMessageId, java.lang.String subject,
170 java.lang.String body,
171 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
172 boolean anonymous, double priority, boolean allowPingbacks,
173 com.liferay.portal.service.ServiceContext serviceContext)
174 throws com.liferay.portal.kernel.exception.PortalException,
175 com.liferay.portal.kernel.exception.SystemException {
176 return getService()
177 .addMessage(userId, userName, groupId, categoryId, threadId,
178 parentMessageId, subject, body, files, anonymous, priority,
179 allowPingbacks, serviceContext);
180 }
181
182 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
183 java.lang.String uuid, long userId, java.lang.String userName,
184 long groupId, long categoryId, long threadId, long parentMessageId,
185 java.lang.String subject, java.lang.String body,
186 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
187 boolean anonymous, double priority, boolean allowPingbacks,
188 com.liferay.portal.service.ServiceContext serviceContext)
189 throws com.liferay.portal.kernel.exception.PortalException,
190 com.liferay.portal.kernel.exception.SystemException {
191 return getService()
192 .addMessage(uuid, userId, userName, groupId, categoryId,
193 threadId, parentMessageId, subject, body, files, anonymous,
194 priority, allowPingbacks, serviceContext);
195 }
196
197 public static void addMessageResources(long messageId,
198 boolean addCommunityPermissions, boolean addGuestPermissions)
199 throws com.liferay.portal.kernel.exception.PortalException,
200 com.liferay.portal.kernel.exception.SystemException {
201 getService()
202 .addMessageResources(messageId, addCommunityPermissions,
203 addGuestPermissions);
204 }
205
206 public static void addMessageResources(
207 com.liferay.portlet.messageboards.model.MBMessage message,
208 boolean addCommunityPermissions, boolean addGuestPermissions)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 getService()
212 .addMessageResources(message, addCommunityPermissions,
213 addGuestPermissions);
214 }
215
216 public static void addMessageResources(long messageId,
217 java.lang.String[] communityPermissions,
218 java.lang.String[] guestPermissions)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException {
221 getService()
222 .addMessageResources(messageId, communityPermissions,
223 guestPermissions);
224 }
225
226 public static void addMessageResources(
227 com.liferay.portlet.messageboards.model.MBMessage message,
228 java.lang.String[] communityPermissions,
229 java.lang.String[] guestPermissions)
230 throws com.liferay.portal.kernel.exception.PortalException,
231 com.liferay.portal.kernel.exception.SystemException {
232 getService()
233 .addMessageResources(message, communityPermissions, guestPermissions);
234 }
235
236 public static void deleteDiscussionMessage(long messageId)
237 throws com.liferay.portal.kernel.exception.PortalException,
238 com.liferay.portal.kernel.exception.SystemException {
239 getService().deleteDiscussionMessage(messageId);
240 }
241
242 public static void deleteDiscussionMessages(java.lang.String className,
243 long classPK)
244 throws com.liferay.portal.kernel.exception.PortalException,
245 com.liferay.portal.kernel.exception.SystemException {
246 getService().deleteDiscussionMessages(className, classPK);
247 }
248
249 public static void deleteMessage(long messageId)
250 throws com.liferay.portal.kernel.exception.PortalException,
251 com.liferay.portal.kernel.exception.SystemException {
252 getService().deleteMessage(messageId);
253 }
254
255 public static void deleteMessage(
256 com.liferay.portlet.messageboards.model.MBMessage message)
257 throws com.liferay.portal.kernel.exception.PortalException,
258 com.liferay.portal.kernel.exception.SystemException {
259 getService().deleteMessage(message);
260 }
261
262 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
263 long groupId, long categoryId, int status, int start, int end)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getService()
266 .getCategoryMessages(groupId, categoryId, status, start, end);
267 }
268
269 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
270 long groupId, long categoryId, int status, int start, int end,
271 com.liferay.portal.kernel.util.OrderByComparator obc)
272 throws com.liferay.portal.kernel.exception.SystemException {
273 return getService()
274 .getCategoryMessages(groupId, categoryId, status, start,
275 end, obc);
276 }
277
278 public static int getCategoryMessagesCount(long groupId, long categoryId,
279 int status) throws com.liferay.portal.kernel.exception.SystemException {
280 return getService().getCategoryMessagesCount(groupId, categoryId, status);
281 }
282
283 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
284 long companyId, int status, int start, int end)
285 throws com.liferay.portal.kernel.exception.SystemException {
286 return getService().getCompanyMessages(companyId, status, start, end);
287 }
288
289 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
290 long companyId, int status, int start, int end,
291 com.liferay.portal.kernel.util.OrderByComparator obc)
292 throws com.liferay.portal.kernel.exception.SystemException {
293 return getService()
294 .getCompanyMessages(companyId, status, start, end, obc);
295 }
296
297 public static int getCompanyMessagesCount(long companyId, int status)
298 throws com.liferay.portal.kernel.exception.SystemException {
299 return getService().getCompanyMessagesCount(companyId, status);
300 }
301
302 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
303 long userId, long groupId, java.lang.String className, long classPK,
304 int status)
305 throws com.liferay.portal.kernel.exception.PortalException,
306 com.liferay.portal.kernel.exception.SystemException {
307 return getService()
308 .getDiscussionMessageDisplay(userId, groupId, className,
309 classPK, status);
310 }
311
312 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
313 long userId, long groupId, java.lang.String className, long classPK,
314 int status, java.lang.String threadView)
315 throws com.liferay.portal.kernel.exception.PortalException,
316 com.liferay.portal.kernel.exception.SystemException {
317 return getService()
318 .getDiscussionMessageDisplay(userId, groupId, className,
319 classPK, status, threadView);
320 }
321
322 public static int getDiscussionMessagesCount(long classNameId,
323 long classPK, int status)
324 throws com.liferay.portal.kernel.exception.SystemException {
325 return getService()
326 .getDiscussionMessagesCount(classNameId, classPK, status);
327 }
328
329 public static int getDiscussionMessagesCount(java.lang.String className,
330 long classPK, int status)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getService()
333 .getDiscussionMessagesCount(className, classPK, status);
334 }
335
336 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
337 java.lang.String className)
338 throws com.liferay.portal.kernel.exception.SystemException {
339 return getService().getDiscussions(className);
340 }
341
342 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
343 long groupId, int status, int start, int end)
344 throws com.liferay.portal.kernel.exception.SystemException {
345 return getService().getGroupMessages(groupId, status, start, end);
346 }
347
348 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
349 long groupId, int status, int start, int end,
350 com.liferay.portal.kernel.util.OrderByComparator obc)
351 throws com.liferay.portal.kernel.exception.SystemException {
352 return getService().getGroupMessages(groupId, status, start, end, obc);
353 }
354
355 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
356 long groupId, long userId, int status, int start, int end)
357 throws com.liferay.portal.kernel.exception.SystemException {
358 return getService().getGroupMessages(groupId, userId, status, start, end);
359 }
360
361 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
362 long groupId, long userId, int status, int start, int end,
363 com.liferay.portal.kernel.util.OrderByComparator obc)
364 throws com.liferay.portal.kernel.exception.SystemException {
365 return getService()
366 .getGroupMessages(groupId, userId, status, start, end, obc);
367 }
368
369 public static int getGroupMessagesCount(long groupId, int status)
370 throws com.liferay.portal.kernel.exception.SystemException {
371 return getService().getGroupMessagesCount(groupId, status);
372 }
373
374 public static int getGroupMessagesCount(long groupId, long userId,
375 int status) throws com.liferay.portal.kernel.exception.SystemException {
376 return getService().getGroupMessagesCount(groupId, userId, status);
377 }
378
379 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
380 long messageId)
381 throws com.liferay.portal.kernel.exception.PortalException,
382 com.liferay.portal.kernel.exception.SystemException {
383 return getService().getMessage(messageId);
384 }
385
386 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
387 java.lang.String className, long classPK, int status)
388 throws com.liferay.portal.kernel.exception.SystemException {
389 return getService().getMessages(className, classPK, status);
390 }
391
392 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
393 long messageId, int status, java.lang.String threadView,
394 boolean includePrevAndNext)
395 throws com.liferay.portal.kernel.exception.PortalException,
396 com.liferay.portal.kernel.exception.SystemException {
397 return getService()
398 .getMessageDisplay(messageId, status, threadView,
399 includePrevAndNext);
400 }
401
402 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
403 com.liferay.portlet.messageboards.model.MBMessage message, int status,
404 java.lang.String threadView, boolean includePrevAndNext)
405 throws com.liferay.portal.kernel.exception.PortalException,
406 com.liferay.portal.kernel.exception.SystemException {
407 return getService()
408 .getMessageDisplay(message, status, threadView,
409 includePrevAndNext);
410 }
411
412 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
413 throws com.liferay.portal.kernel.exception.SystemException {
414 return getService().getNoAssetMessages();
415 }
416
417 public static int getPositionInThread(long messageId)
418 throws com.liferay.portal.kernel.exception.PortalException,
419 com.liferay.portal.kernel.exception.SystemException {
420 return getService().getPositionInThread(messageId);
421 }
422
423 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
424 long threadId, int status)
425 throws com.liferay.portal.kernel.exception.SystemException {
426 return getService().getThreadMessages(threadId, status);
427 }
428
429 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
430 long threadId, int status,
431 java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
432 throws com.liferay.portal.kernel.exception.SystemException {
433 return getService().getThreadMessages(threadId, status, comparator);
434 }
435
436 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
437 long threadId, int status, int start, int end)
438 throws com.liferay.portal.kernel.exception.SystemException {
439 return getService().getThreadMessages(threadId, status, start, end);
440 }
441
442 public static int getThreadMessagesCount(long threadId, int status)
443 throws com.liferay.portal.kernel.exception.SystemException {
444 return getService().getThreadMessagesCount(threadId, status);
445 }
446
447 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
448 long threadId, int status, int start, int end)
449 throws com.liferay.portal.kernel.exception.SystemException {
450 return getService()
451 .getThreadRepliesMessages(threadId, status, start, end);
452 }
453
454 public static void subscribeMessage(long userId, long messageId)
455 throws com.liferay.portal.kernel.exception.PortalException,
456 com.liferay.portal.kernel.exception.SystemException {
457 getService().subscribeMessage(userId, messageId);
458 }
459
460 public static void unsubscribeMessage(long userId, long messageId)
461 throws com.liferay.portal.kernel.exception.PortalException,
462 com.liferay.portal.kernel.exception.SystemException {
463 getService().unsubscribeMessage(userId, messageId);
464 }
465
466 public static void updateAsset(long userId,
467 com.liferay.portlet.messageboards.model.MBMessage message,
468 long[] assetCategoryIds, java.lang.String[] assetTagNames)
469 throws com.liferay.portal.kernel.exception.PortalException,
470 com.liferay.portal.kernel.exception.SystemException {
471 getService()
472 .updateAsset(userId, message, assetCategoryIds, assetTagNames);
473 }
474
475 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
476 long userId, long messageId, java.lang.String subject,
477 java.lang.String body, int workflowAction)
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 return getService()
481 .updateDiscussionMessage(userId, messageId, subject, body,
482 workflowAction);
483 }
484
485 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
486 long userId, long messageId, java.lang.String subject,
487 java.lang.String body,
488 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
489 java.util.List<java.lang.String> existingFiles, double priority,
490 boolean allowPingbacks,
491 com.liferay.portal.service.ServiceContext serviceContext)
492 throws com.liferay.portal.kernel.exception.PortalException,
493 com.liferay.portal.kernel.exception.SystemException {
494 return getService()
495 .updateMessage(userId, messageId, subject, body, files,
496 existingFiles, priority, allowPingbacks, serviceContext);
497 }
498
499 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
500 long messageId, java.lang.String body)
501 throws com.liferay.portal.kernel.exception.PortalException,
502 com.liferay.portal.kernel.exception.SystemException {
503 return getService().updateMessage(messageId, body);
504 }
505
506 public static void updateUserName(long userId, java.lang.String userName)
507 throws com.liferay.portal.kernel.exception.SystemException {
508 getService().updateUserName(userId, userName);
509 }
510
511 public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
512 long userId, long messageId, int status,
513 com.liferay.portal.service.ServiceContext serviceContext)
514 throws com.liferay.portal.kernel.exception.PortalException,
515 com.liferay.portal.kernel.exception.SystemException {
516 return getService()
517 .updateStatus(userId, messageId, status, serviceContext);
518 }
519
520 public static MBMessageLocalService getService() {
521 if (_service == null) {
522 _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
523 }
524
525 return _service;
526 }
527
528 public void setService(MBMessageLocalService service) {
529 _service = service;
530 }
531
532 private static MBMessageLocalService _service;
533 }