Interface NotificationManager

    • Method Detail

      • countExecutionsWithStatus

        long countExecutionsWithStatus​(String taskKey,
                                       String status)
        Count the number of task executions of a given task with a given status.
        Parameters:
        taskKey - task
        status - status
        Returns:
        number of task executions
      • notificationsAvailable

        boolean notificationsAvailable​(AuditElements.EventCategoryType type,
                                       String category,
                                       String subcategory,
                                       String event)
        Checks if notifications are available matching the provided conditions.
        Parameters:
        type - event category type
        category - event category
        subcategory - event subcategory
        event - event
        Returns:
        created notification tasks
      • createTasks

        void createTasks​(AfterHandlingEvent event)
        Create notification tasks according to the provided event.
        Parameters:
        event - Spring event raised during Logic processing
      • createTasks

        List<NotificationTask> createTasks​(String who,
                                           AuditElements.EventCategoryType type,
                                           String category,
                                           String subcategory,
                                           String event,
                                           AuditElements.Result condition,
                                           Object before,
                                           Object output,
                                           Object... input)
        Create notification tasks for each notification matching provided conditions.
        Parameters:
        who - user triggering the event
        type - event category type
        category - event category
        subcategory - event subcategory
        event - event
        condition - result value condition.
        before - object(s) availabile before the event
        output - object(s) produced by the event
        input - object(s) provided to the event
        Returns:
        created notification tasks
      • getMaxRetries

        long getMaxRetries()
      • setTaskExecuted

        void setTaskExecuted​(String taskKey,
                             boolean executed)
        Set execution state of NotificationTask with provided id.
        Parameters:
        taskKey - task to be updated
        executed - execution state