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);
}
Aggregations