Interface NotificationManager
- All Known Implementing Classes:
DefaultNotificationManager
public interface NotificationManager
Create notification tasks that will be executed by NotificationJob.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlong
countExecutionsWithStatus
(String taskKey, String status) Count the number of task executions of a given task with a given status.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.void
createTasks
(AfterHandlingEvent event) Create notification tasks according to the provided event.long
boolean
notificationsAvailable
(String domain, OpEvent.CategoryType type, String category, String subcategory, String op) Checks if notifications are available matching the provided conditions.void
setTaskExecuted
(String taskKey, boolean executed) Set execution state of NotificationTask with provided id.storeExec
(TaskExec<NotificationTask> execution) Store execution of a NotificationTask.
-
Method Details
-
countExecutionsWithStatus
Count the number of task executions of a given task with a given status.- Parameters:
taskKey
- taskstatus
- 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
- domaintype
- event category typecategory
- event categorysubcategory
- event subcategoryop
- operation- Returns:
- created notification tasks
-
createTasks
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 eventtype
- event category typecategory
- event categorysubcategory
- event subcategoryop
- operationoutcome
- result value condition.before
- object(s) availabile before the eventoutput
- object(s) produced by the eventinput
- object(s) provided to the event- Returns:
- created notification tasks
-
getMaxRetries
long getMaxRetries() -
setTaskExecuted
Set execution state of NotificationTask with provided id.- Parameters:
taskKey
- task to be updatedexecuted
- execution state
-
storeExec
Store execution of a NotificationTask.- Parameters:
execution
- task execution.- Returns:
- merged task execution.
-