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