Class DefaultNotificationManager
java.lang.Object
org.apache.syncope.core.provisioning.java.notification.DefaultNotificationManager
- All Implemented Interfaces:
NotificationManager
@Transactional(rollbackFor=java.lang.Throwable.class)
public class DefaultNotificationManager
extends Object
implements NotificationManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AnyMatchDAO
protected final AnyObjectDAO
protected final AnyObjectDataBinder
protected final AnySearchDAO
protected final ConfParamOps
protected final DerAttrHandler
protected final DerSchemaDAO
protected final EntityFactory
protected final GroupDAO
protected final GroupDataBinder
protected final IntAttrNameParser
protected static final Logger
protected final NotificationDAO
protected Optional
<RecipientsProvider> protected final SearchCondVisitor
protected final TaskDAO
protected final UserDAO
protected final UserDataBinder
protected final VirAttrHandler
protected final VirSchemaDAO
-
Constructor Summary
ConstructorDescriptionDefaultNotificationManager
(DerSchemaDAO derSchemaDAO, VirSchemaDAO virSchemaDAO, NotificationDAO notificationDAO, AnyObjectDAO anyObjectDAO, UserDAO userDAO, GroupDAO groupDAO, AnySearchDAO anySearchDAO, AnyMatchDAO anyMatchDAO, TaskDAO taskDAO, DerAttrHandler derAttrHandler, VirAttrHandler virAttrHandler, UserDataBinder userDataBinder, GroupDataBinder groupDataBinder, AnyObjectDataBinder anyObjectDataBinder, ConfParamOps confParamOps, EntityFactory entityFactory, IntAttrNameParser intAttrNameParser, SearchCondVisitor searchCondVisitor) -
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
protected NotificationTask
getNotificationTask
(Notification notification, Any<?> any, Map<String, Object> jexlVars) Create a notification task.protected String
getRecipientEmail
(String recipientAttrName, User user) 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.
-
Field Details
-
LOG
-
derSchemaDAO
-
virSchemaDAO
-
notificationDAO
-
anyObjectDAO
-
userDAO
-
groupDAO
-
anySearchDAO
-
anyMatchDAO
-
taskDAO
-
derAttrHandler
-
virAttrHandler
-
userDataBinder
-
groupDataBinder
-
anyObjectDataBinder
-
confParamOps
-
entityFactory
-
intAttrNameParser
-
searchCondVisitor
-
perContextRecipientsProvider
-
-
Constructor Details
-
DefaultNotificationManager
public DefaultNotificationManager(DerSchemaDAO derSchemaDAO, VirSchemaDAO virSchemaDAO, NotificationDAO notificationDAO, AnyObjectDAO anyObjectDAO, UserDAO userDAO, GroupDAO groupDAO, AnySearchDAO anySearchDAO, AnyMatchDAO anyMatchDAO, TaskDAO taskDAO, DerAttrHandler derAttrHandler, VirAttrHandler virAttrHandler, UserDataBinder userDataBinder, GroupDataBinder groupDataBinder, AnyObjectDataBinder anyObjectDataBinder, ConfParamOps confParamOps, EntityFactory entityFactory, IntAttrNameParser intAttrNameParser, SearchCondVisitor searchCondVisitor)
-
-
Method Details
-
getMaxRetries
- Specified by:
getMaxRetries
in interfaceNotificationManager
-
getNotificationTask
protected NotificationTask getNotificationTask(Notification notification, Any<?> any, Map<String, Object> jexlVars) Create a notification task.- Parameters:
notification
- notification to take as modelany
- the any object this task is aboutjexlVars
- JEXL variables- Returns:
- notification task, fully populated
-
notificationsAvailable
public boolean notificationsAvailable(String domain, OpEvent.CategoryType type, String category, String subcategory, String op) Description copied from interface:NotificationManager
Checks if notifications are available matching the provided conditions.- Specified by:
notificationsAvailable
in interfaceNotificationManager
- Parameters:
domain
- domaintype
- event category typecategory
- event categorysubcategory
- event subcategoryop
- operation- Returns:
- created notification tasks
-
createTasks
Description copied from interface:NotificationManager
Create notification tasks according to the provided event.- Specified by:
createTasks
in interfaceNotificationManager
- Parameters:
event
- Spring event raised during Logic processing
-
createTasks
public List<NotificationTask> createTasks(String who, OpEvent.CategoryType type, String category, String subcategory, String op, OpEvent.Outcome outcome, Object before, Object output, Object... input) Description copied from interface:NotificationManager
Create notification tasks for each notification matching provided conditions.- Specified by:
createTasks
in interfaceNotificationManager
- 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
-
getRecipientEmail
-
storeExec
Description copied from interface:NotificationManager
Store execution of a NotificationTask.- Specified by:
storeExec
in interfaceNotificationManager
- Parameters:
execution
- task execution.- Returns:
- merged task execution.
-
setTaskExecuted
Description copied from interface:NotificationManager
Set execution state of NotificationTask with provided id.- Specified by:
setTaskExecuted
in interfaceNotificationManager
- Parameters:
taskKey
- task to be updatedexecuted
- execution state
-
countExecutionsWithStatus
Description copied from interface:NotificationManager
Count the number of task executions of a given task with a given status.- Specified by:
countExecutionsWithStatus
in interfaceNotificationManager
- Parameters:
taskKey
- taskstatus
- status- Returns:
- number of task executions
-