1
22
23 package com.liferay.portlet.messageboards.service;
24
25
26
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,
135 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, subject, body,
143 files, anonymous, priority, serviceContext);
144 }
145
146 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
147 long userId, java.lang.String userName, long categoryId, long threadId,
148 long parentMessageId, java.lang.String subject, java.lang.String body,
149 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
150 boolean anonymous, double priority,
151 com.liferay.portal.service.ServiceContext serviceContext)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException {
154 return getService()
155 .addMessage(userId, userName, categoryId, threadId,
156 parentMessageId, subject, body, files, anonymous, priority,
157 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(
185 com.liferay.portlet.messageboards.model.MBMessage message,
186 boolean addCommunityPermissions, boolean addGuestPermissions)
187 throws com.liferay.portal.PortalException,
188 com.liferay.portal.SystemException {
189 getService()
190 .addMessageResources(message, addCommunityPermissions,
191 addGuestPermissions);
192 }
193
194 public static void addMessageResources(long messageId,
195 java.lang.String[] communityPermissions,
196 java.lang.String[] guestPermissions)
197 throws com.liferay.portal.PortalException,
198 com.liferay.portal.SystemException {
199 getService()
200 .addMessageResources(messageId, communityPermissions,
201 guestPermissions);
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 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
348 java.lang.String className, long classPK)
349 throws com.liferay.portal.SystemException {
350 return getService().getMessages(className, classPK);
351 }
352
353 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
354 long messageId, java.lang.String threadView)
355 throws com.liferay.portal.PortalException,
356 com.liferay.portal.SystemException {
357 return getService().getMessageDisplay(messageId, threadView);
358 }
359
360 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
361 com.liferay.portlet.messageboards.model.MBMessage message,
362 java.lang.String threadView)
363 throws com.liferay.portal.PortalException,
364 com.liferay.portal.SystemException {
365 return getService().getMessageDisplay(message, threadView);
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 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
374 long threadId) throws com.liferay.portal.SystemException {
375 return getService().getThreadMessages(threadId);
376 }
377
378 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
379 long threadId,
380 java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
381 throws com.liferay.portal.SystemException {
382 return getService().getThreadMessages(threadId, comparator);
383 }
384
385 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
386 long threadId, int start, int end)
387 throws com.liferay.portal.SystemException {
388 return getService().getThreadMessages(threadId, start, end);
389 }
390
391 public static int getThreadMessagesCount(long threadId)
392 throws com.liferay.portal.SystemException {
393 return getService().getThreadMessagesCount(threadId);
394 }
395
396 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
397 long threadId, int start, int end)
398 throws com.liferay.portal.SystemException {
399 return getService().getThreadRepliesMessages(threadId, start, end);
400 }
401
402 public static void reIndex(long messageId)
403 throws com.liferay.portal.SystemException {
404 getService().reIndex(messageId);
405 }
406
407 public static void reIndex(
408 com.liferay.portlet.messageboards.model.MBMessage message)
409 throws com.liferay.portal.SystemException {
410 getService().reIndex(message);
411 }
412
413 public static void subscribeMessage(long userId, long messageId)
414 throws com.liferay.portal.PortalException,
415 com.liferay.portal.SystemException {
416 getService().subscribeMessage(userId, messageId);
417 }
418
419 public static void unsubscribeMessage(long userId, long messageId)
420 throws com.liferay.portal.PortalException,
421 com.liferay.portal.SystemException {
422 getService().unsubscribeMessage(userId, messageId);
423 }
424
425 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
426 long userId, long messageId, java.lang.String subject,
427 java.lang.String body)
428 throws com.liferay.portal.PortalException,
429 com.liferay.portal.SystemException {
430 return getService()
431 .updateDiscussionMessage(userId, messageId, subject, body);
432 }
433
434 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
435 long userId, long messageId, java.lang.String subject,
436 java.lang.String body,
437 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
438 java.util.List<String> existingFiles, double priority,
439 com.liferay.portal.service.ServiceContext serviceContext)
440 throws com.liferay.portal.PortalException,
441 com.liferay.portal.SystemException {
442 return getService()
443 .updateMessage(userId, messageId, subject, body, files,
444 existingFiles, priority, serviceContext);
445 }
446
447 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
448 long messageId, java.util.Date createDate, java.util.Date modifiedDate)
449 throws com.liferay.portal.PortalException,
450 com.liferay.portal.SystemException {
451 return getService().updateMessage(messageId, createDate, modifiedDate);
452 }
453
454 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
455 long messageId, java.lang.String body)
456 throws com.liferay.portal.PortalException,
457 com.liferay.portal.SystemException {
458 return getService().updateMessage(messageId, body);
459 }
460
461 public static void updateTagsAsset(long userId,
462 com.liferay.portlet.messageboards.model.MBMessage message,
463 java.lang.String[] tagsEntries)
464 throws com.liferay.portal.PortalException,
465 com.liferay.portal.SystemException {
466 getService().updateTagsAsset(userId, message, tagsEntries);
467 }
468
469 public static MBMessageLocalService getService() {
470 if (_service == null) {
471 throw new RuntimeException("MBMessageLocalService is not set");
472 }
473
474 return _service;
475 }
476
477 public void setService(MBMessageLocalService service) {
478 _service = service;
479 }
480
481 private static MBMessageLocalService _service;
482 }