@Transactional(rollbackFor=java.lang.Throwable.class) public class DefaultNotificationManager extends Object implements NotificationManager
Constructor and Description |
---|
DefaultNotificationManager() |
Modifier and Type | Method and Description |
---|---|
long |
countExecutionsWithStatus(String taskKey,
String status)
Count the number of task executions of a given task with a given status.
|
void |
createTasks(AfterHandlingEvent event)
Create notification tasks according to the provided event.
|
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.
|
protected Map<String,String> |
findAllSyncopeConfs() |
long |
getMaxRetries() |
boolean |
notificationsAvailable(AuditElements.EventCategoryType type,
String category,
String subcategory,
String event)
Checks if notifications are available matching the provided conditions.
|
void |
setTaskExecuted(String taskKey,
boolean executed)
Set execution state of NotificationTask with provided id.
|
TaskExec |
storeExec(TaskExec execution)
Store execution of a NotificationTask.
|
@Transactional(readOnly=true) public long getMaxRetries()
getMaxRetries
in interface NotificationManager
public boolean notificationsAvailable(AuditElements.EventCategoryType type, String category, String subcategory, String event)
NotificationManager
notificationsAvailable
in interface NotificationManager
type
- event category typecategory
- event categorysubcategory
- event subcategoryevent
- eventpublic void createTasks(AfterHandlingEvent event)
NotificationManager
createTasks
in interface NotificationManager
event
- Spring event raised during Logic processingpublic List<NotificationTask> createTasks(String who, AuditElements.EventCategoryType type, String category, String subcategory, String event, AuditElements.Result condition, Object before, Object output, Object... input)
NotificationManager
createTasks
in interface NotificationManager
who
- user triggering the eventtype
- event category typecategory
- event categorysubcategory
- event subcategoryevent
- eventcondition
- result value condition.before
- object(s) availabile before the eventoutput
- object(s) produced by the eventinput
- object(s) provided to the eventpublic TaskExec storeExec(TaskExec execution)
NotificationManager
storeExec
in interface NotificationManager
execution
- task execution.public void setTaskExecuted(String taskKey, boolean executed)
NotificationManager
setTaskExecuted
in interface NotificationManager
taskKey
- task to be updatedexecuted
- execution statepublic long countExecutionsWithStatus(String taskKey, String status)
NotificationManager
countExecutionsWithStatus
in interface NotificationManager
taskKey
- taskstatus
- statusCopyright © 2010–2023 The Apache Software Foundation. All rights reserved.