001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.annotation.Isolation;
018 import com.liferay.portal.kernel.annotation.Propagation;
019 import com.liferay.portal.kernel.annotation.Transactional;
020 import com.liferay.portal.kernel.exception.PortalException;
021 import com.liferay.portal.kernel.exception.SystemException;
022
023
040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
041 PortalException.class, SystemException.class})
042 public interface MBMessageLocalService {
043
050 public com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
051 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
052 throws com.liferay.portal.kernel.exception.SystemException;
053
054
060 public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
061 long messageId);
062
063
070 public void deleteMBMessage(long messageId)
071 throws com.liferay.portal.kernel.exception.PortalException,
072 com.liferay.portal.kernel.exception.SystemException;
073
074
080 public void deleteMBMessage(
081 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
082 throws com.liferay.portal.kernel.exception.SystemException;
083
084
091 @SuppressWarnings("rawtypes")
092 public java.util.List dynamicQuery(
093 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094 throws com.liferay.portal.kernel.exception.SystemException;
095
096
109 @SuppressWarnings("rawtypes")
110 public java.util.List dynamicQuery(
111 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112 int end) throws com.liferay.portal.kernel.exception.SystemException;
113
114
128 @SuppressWarnings("rawtypes")
129 public java.util.List dynamicQuery(
130 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
131 int end,
132 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133 throws com.liferay.portal.kernel.exception.SystemException;
134
135
142 public long dynamicQueryCount(
143 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
144 throws com.liferay.portal.kernel.exception.SystemException;
145
146
154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155 public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
156 long messageId)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException;
159
160
169 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170 public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
171 java.lang.String uuid, long groupId)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException;
174
175
187 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
189 int start, int end)
190 throws com.liferay.portal.kernel.exception.SystemException;
191
192
198 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199 public int getMBMessagesCount()
200 throws com.liferay.portal.kernel.exception.SystemException;
201
202
209 public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
210 com.liferay.portlet.messageboards.model.MBMessage mbMessage)
211 throws com.liferay.portal.kernel.exception.SystemException;
212
213
221 public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
222 com.liferay.portlet.messageboards.model.MBMessage mbMessage,
223 boolean merge)
224 throws com.liferay.portal.kernel.exception.SystemException;
225
226 public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
227 long userId, java.lang.String userName, long groupId,
228 java.lang.String className, long classPK, int workflowAction)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException;
231
232 public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
233 long userId, java.lang.String userName, long groupId,
234 java.lang.String className, long classPK, long threadId,
235 long parentMessageId, java.lang.String subject, java.lang.String body,
236 com.liferay.portal.service.ServiceContext serviceContext)
237 throws com.liferay.portal.kernel.exception.PortalException,
238 com.liferay.portal.kernel.exception.SystemException;
239
240 public com.liferay.portlet.messageboards.model.MBMessage addMessage(
241 long userId, java.lang.String userName, long groupId, long categoryId,
242 long threadId, long parentMessageId, java.lang.String subject,
243 java.lang.String body,
244 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
245 boolean anonymous, double priority, boolean allowPingbacks,
246 com.liferay.portal.service.ServiceContext serviceContext)
247 throws com.liferay.portal.kernel.exception.PortalException,
248 com.liferay.portal.kernel.exception.SystemException;
249
250 public com.liferay.portlet.messageboards.model.MBMessage addMessage(
251 long userId, java.lang.String userName, long groupId, long categoryId,
252 java.lang.String subject, java.lang.String body,
253 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
254 boolean anonymous, double priority, boolean allowPingbacks,
255 com.liferay.portal.service.ServiceContext serviceContext)
256 throws com.liferay.portal.kernel.exception.PortalException,
257 com.liferay.portal.kernel.exception.SystemException;
258
259 public void addMessageResources(long messageId,
260 boolean addCommunityPermissions, boolean addGuestPermissions)
261 throws com.liferay.portal.kernel.exception.PortalException,
262 com.liferay.portal.kernel.exception.SystemException;
263
264 public void addMessageResources(long messageId,
265 java.lang.String[] communityPermissions,
266 java.lang.String[] guestPermissions)
267 throws com.liferay.portal.kernel.exception.PortalException,
268 com.liferay.portal.kernel.exception.SystemException;
269
270 public void addMessageResources(
271 com.liferay.portlet.messageboards.model.MBMessage message,
272 boolean addCommunityPermissions, boolean addGuestPermissions)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException;
275
276 public void addMessageResources(
277 com.liferay.portlet.messageboards.model.MBMessage message,
278 java.lang.String[] communityPermissions,
279 java.lang.String[] guestPermissions)
280 throws com.liferay.portal.kernel.exception.PortalException,
281 com.liferay.portal.kernel.exception.SystemException;
282
283 public void deleteDiscussionMessage(long messageId)
284 throws com.liferay.portal.kernel.exception.PortalException,
285 com.liferay.portal.kernel.exception.SystemException;
286
287 public void deleteDiscussionMessages(java.lang.String className,
288 long classPK)
289 throws com.liferay.portal.kernel.exception.PortalException,
290 com.liferay.portal.kernel.exception.SystemException;
291
292 public void deleteMessage(long messageId)
293 throws com.liferay.portal.kernel.exception.PortalException,
294 com.liferay.portal.kernel.exception.SystemException;
295
296 public void deleteMessage(
297 com.liferay.portlet.messageboards.model.MBMessage message)
298 throws com.liferay.portal.kernel.exception.PortalException,
299 com.liferay.portal.kernel.exception.SystemException;
300
301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
303 long groupId, long categoryId, int status, int start, int end)
304 throws com.liferay.portal.kernel.exception.SystemException;
305
306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
308 long groupId, long categoryId, int status, int start, int end,
309 com.liferay.portal.kernel.util.OrderByComparator obc)
310 throws com.liferay.portal.kernel.exception.SystemException;
311
312 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313 public int getCategoryMessagesCount(long groupId, long categoryId,
314 int status) throws com.liferay.portal.kernel.exception.SystemException;
315
316 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
318 long companyId, int status, int start, int end)
319 throws com.liferay.portal.kernel.exception.SystemException;
320
321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
323 long companyId, int status, int start, int end,
324 com.liferay.portal.kernel.util.OrderByComparator obc)
325 throws com.liferay.portal.kernel.exception.SystemException;
326
327 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328 public int getCompanyMessagesCount(long companyId, int status)
329 throws com.liferay.portal.kernel.exception.SystemException;
330
331 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332 public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
333 long userId, long groupId, java.lang.String className, long classPK,
334 int status)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException;
337
338 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339 public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
340 long userId, long groupId, java.lang.String className, long classPK,
341 int status, java.lang.String threadView)
342 throws com.liferay.portal.kernel.exception.PortalException,
343 com.liferay.portal.kernel.exception.SystemException;
344
345 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346 public int getDiscussionMessagesCount(long classNameId, long classPK,
347 int status) throws com.liferay.portal.kernel.exception.SystemException;
348
349 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350 public int getDiscussionMessagesCount(java.lang.String className,
351 long classPK, int status)
352 throws com.liferay.portal.kernel.exception.SystemException;
353
354 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355 public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
356 java.lang.String className)
357 throws com.liferay.portal.kernel.exception.SystemException;
358
359 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
361 long groupId, int status, int start, int end)
362 throws com.liferay.portal.kernel.exception.SystemException;
363
364 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
366 long groupId, int status, int start, int end,
367 com.liferay.portal.kernel.util.OrderByComparator obc)
368 throws com.liferay.portal.kernel.exception.SystemException;
369
370 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
372 long groupId, long userId, int status, int start, int end)
373 throws com.liferay.portal.kernel.exception.SystemException;
374
375 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
377 long groupId, long userId, int status, int start, int end,
378 com.liferay.portal.kernel.util.OrderByComparator obc)
379 throws com.liferay.portal.kernel.exception.SystemException;
380
381 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
382 public int getGroupMessagesCount(long groupId, int status)
383 throws com.liferay.portal.kernel.exception.SystemException;
384
385 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386 public int getGroupMessagesCount(long groupId, long userId, int status)
387 throws com.liferay.portal.kernel.exception.SystemException;
388
389 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390 public com.liferay.portlet.messageboards.model.MBMessage getMessage(
391 long messageId)
392 throws com.liferay.portal.kernel.exception.PortalException,
393 com.liferay.portal.kernel.exception.SystemException;
394
395 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396 public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
397 long messageId, int status, java.lang.String threadView,
398 boolean includePrevAndNext)
399 throws com.liferay.portal.kernel.exception.PortalException,
400 com.liferay.portal.kernel.exception.SystemException;
401
402 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
403 public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
404 com.liferay.portlet.messageboards.model.MBMessage message, int status,
405 java.lang.String threadView, boolean includePrevAndNext)
406 throws com.liferay.portal.kernel.exception.PortalException,
407 com.liferay.portal.kernel.exception.SystemException;
408
409 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
410 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
411 java.lang.String className, long classPK, int status)
412 throws com.liferay.portal.kernel.exception.SystemException;
413
414 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
415 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
416 throws com.liferay.portal.kernel.exception.SystemException;
417
418 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
419 public int getPositionInThread(long messageId)
420 throws com.liferay.portal.kernel.exception.PortalException,
421 com.liferay.portal.kernel.exception.SystemException;
422
423 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
424 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
425 long threadId, int status)
426 throws com.liferay.portal.kernel.exception.SystemException;
427
428 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
429 public 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
434 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
435 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
436 long threadId, int status, int start, int end)
437 throws com.liferay.portal.kernel.exception.SystemException;
438
439 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
440 public int getThreadMessagesCount(long threadId, int status)
441 throws com.liferay.portal.kernel.exception.SystemException;
442
443 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
444 public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
445 long threadId, int status, int start, int end)
446 throws com.liferay.portal.kernel.exception.SystemException;
447
448 public void subscribeMessage(long userId, long messageId)
449 throws com.liferay.portal.kernel.exception.PortalException,
450 com.liferay.portal.kernel.exception.SystemException;
451
452 public void unsubscribeMessage(long userId, long messageId)
453 throws com.liferay.portal.kernel.exception.PortalException,
454 com.liferay.portal.kernel.exception.SystemException;
455
456 public void updateAsset(long userId,
457 com.liferay.portlet.messageboards.model.MBMessage message,
458 long[] assetCategoryIds, java.lang.String[] assetTagNames)
459 throws com.liferay.portal.kernel.exception.PortalException,
460 com.liferay.portal.kernel.exception.SystemException;
461
462 public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
463 long userId, long messageId, java.lang.String subject,
464 java.lang.String body, int workflowAction)
465 throws com.liferay.portal.kernel.exception.PortalException,
466 com.liferay.portal.kernel.exception.SystemException;
467
468 public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
469 long userId, long messageId, java.lang.String subject,
470 java.lang.String body,
471 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
472 java.util.List<java.lang.String> existingFiles, double priority,
473 boolean allowPingbacks,
474 com.liferay.portal.service.ServiceContext serviceContext)
475 throws com.liferay.portal.kernel.exception.PortalException,
476 com.liferay.portal.kernel.exception.SystemException;
477
478 public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
479 long messageId, java.lang.String body)
480 throws com.liferay.portal.kernel.exception.PortalException,
481 com.liferay.portal.kernel.exception.SystemException;
482
483 public 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
489 public void updateUserName(long userId, java.lang.String userName)
490 throws com.liferay.portal.kernel.exception.SystemException;
491 }