Class CommentNotificationEventListener

  • All Implemented Interfaces:
    EventListener, org.jbpm.casemgmt.api.event.CaseEventListener, org.kie.internal.runtime.Cacheable

    public class CommentNotificationEventListener
    extends Object
    implements org.jbpm.casemgmt.api.event.CaseEventListener, org.kie.internal.runtime.Cacheable
    Event listener that allows to fire notification based on mentions in the case comments that refer to case roles - meaning all role assignments (users or groups) will be notified whenever mentioned.
    • Constructor Detail

      • CommentNotificationEventListener

        public CommentNotificationEventListener()
      • CommentNotificationEventListener

        public CommentNotificationEventListener​(String sender,
                                                String template,
                                                String subject)
    • Method Detail

      • afterCaseCommentAdded

        public void afterCaseCommentAdded​(org.jbpm.casemgmt.api.event.CaseCommentEvent event)
        Specified by:
        afterCaseCommentAdded in interface org.jbpm.casemgmt.api.event.CaseEventListener
      • afterCaseCommentUpdated

        public void afterCaseCommentUpdated​(org.jbpm.casemgmt.api.event.CaseCommentEvent event)
        Specified by:
        afterCaseCommentUpdated in interface org.jbpm.casemgmt.api.event.CaseEventListener
      • buildAndPublishNotification

        protected void buildAndPublishNotification​(org.jbpm.casemgmt.api.event.CaseCommentEvent event)
      • extractMentionedRoles

        protected List<String> extractMentionedRoles​(String commentText)
      • collectOrgEntitiesByRole

        protected Set<org.kie.api.task.model.OrganizationalEntity> collectOrgEntitiesByRole​(List<String> mentionedRoles,
                                                                                            org.jbpm.casemgmt.api.event.CaseCommentEvent event,
                                                                                            StringBuilder commentContent)
      • buildParams

        protected Map<String,​Object> buildParams​(org.jbpm.casemgmt.api.event.CaseCommentEvent event,
                                                       StringBuilder commentContent)
      • addPublisher

        public void addPublisher​(org.kie.internal.utils.NotificationPublisher publisher)
      • close

        public void close()
        Specified by:
        close in interface org.kie.internal.runtime.Cacheable