Search in sources :

Example 1 with CommentItem

use of org.opencastproject.message.broker.api.comments.CommentItem in project opencast by opencast.

the class EventCommentDatabaseServiceImpl method sendMessageUpdate.

private void sendMessageUpdate(String eventId) throws EventCommentDatabaseException {
    List<EventComment> comments = getComments(eventId);
    boolean openComments = !Stream.$(comments).filter(filterOpenComments).toList().isEmpty();
    boolean needsCutting = !Stream.$(comments).filter(filterNeedsCuttingComment).toList().isEmpty();
    CommentItem update = CommentItem.update(eventId, !comments.isEmpty(), openComments, needsCutting);
    messageSender.sendObjectMessage(CommentItem.COMMENT_QUEUE, MessageSender.DestinationType.Queue, update);
}
Also used : EventComment(org.opencastproject.event.comment.EventComment) CommentItem(org.opencastproject.message.broker.api.comments.CommentItem)

Aggregations

EventComment (org.opencastproject.event.comment.EventComment)1 CommentItem (org.opencastproject.message.broker.api.comments.CommentItem)1