Interface NotificationManager

All Known Implementing Classes:
DefaultNotificationManager

public interface NotificationManager
Create notification tasks that will be executed by NotificationJob.
See Also:
  • Method Details

    • 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(String domain, OpEvent.CategoryType type, String category, String subcategory, String op)
      Checks if notifications are available matching the provided conditions.
      Parameters:
      domain - domain
      type - event category type
      category - event category
      subcategory - event subcategory
      op - operation
      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, OpEvent.CategoryType type, String category, String subcategory, String op, OpEvent.Outcome outcome, 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
      op - operation
      outcome - 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
    • storeExec

      Store execution of a NotificationTask.
      Parameters:
      execution - task execution.
      Returns:
      merged task execution.