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
FieldsModifier and TypeFieldDescriptionprotected final AnyMatchDAOprotected final AnyObjectDAOprotected final AnyObjectDataBinderprotected final AnySearchDAOprotected final ConfParamOpsprotected final DerAttrHandlerprotected final DerSchemaDAOprotected final EntityFactoryprotected final GroupDAOprotected final GroupDataBinderprotected final IntAttrNameParserprotected static final Loggerprotected final NotificationDAOprotected Optional<RecipientsProvider> protected final SearchCondVisitorprotected final TaskDAOprotected final UserDAOprotected final UserDataBinder -
Constructor Summary
ConstructorsConstructorDescriptionDefaultNotificationManager(DerSchemaDAO derSchemaDAO, NotificationDAO notificationDAO, AnyObjectDAO anyObjectDAO, UserDAO userDAO, GroupDAO groupDAO, AnySearchDAO anySearchDAO, AnyMatchDAO anyMatchDAO, TaskDAO taskDAO, DerAttrHandler derAttrHandler, UserDataBinder userDataBinder, GroupDataBinder groupDataBinder, AnyObjectDataBinder anyObjectDataBinder, ConfParamOps confParamOps, EntityFactory entityFactory, IntAttrNameParser intAttrNameParser, SearchCondVisitor searchCondVisitor) -
Method Summary
Modifier and TypeMethodDescriptionlongcountExecutionsWithStatus(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.voidcreateTasks(AfterHandlingEvent event) Create notification tasks according to the provided event.longprotected NotificationTaskgetNotificationTask(Notification notification, Any any, Map<String, Object> jexlVars) Create a notification task.protected StringgetRecipientEmail(String recipientAttrName, User user) booleannotificationsAvailable(String domain, OpEvent.CategoryType type, String category, String subcategory, String op) Checks if notifications are available matching the provided conditions.voidsetTaskExecuted(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
-
notificationDAO
-
anyObjectDAO
-
userDAO
-
groupDAO
-
anySearchDAO
-
anyMatchDAO
-
taskDAO
-
derAttrHandler
-
userDataBinder
-
groupDataBinder
-
anyObjectDataBinder
-
confParamOps
-
entityFactory
-
intAttrNameParser
-
searchCondVisitor
-
perContextRecipientsProvider
-
-
Constructor Details
-
DefaultNotificationManager
public DefaultNotificationManager(DerSchemaDAO derSchemaDAO, NotificationDAO notificationDAO, AnyObjectDAO anyObjectDAO, UserDAO userDAO, GroupDAO groupDAO, AnySearchDAO anySearchDAO, AnyMatchDAO anyMatchDAO, TaskDAO taskDAO, DerAttrHandler derAttrHandler, UserDataBinder userDataBinder, GroupDataBinder groupDataBinder, AnyObjectDataBinder anyObjectDataBinder, ConfParamOps confParamOps, EntityFactory entityFactory, IntAttrNameParser intAttrNameParser, SearchCondVisitor searchCondVisitor)
-
-
Method Details
-
getMaxRetries
- Specified by:
getMaxRetriesin 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:NotificationManagerChecks if notifications are available matching the provided conditions.- Specified by:
notificationsAvailablein interfaceNotificationManager- Parameters:
domain- domaintype- event category typecategory- event categorysubcategory- event subcategoryop- operation- Returns:
- created notification tasks
-
createTasks
Description copied from interface:NotificationManagerCreate notification tasks according to the provided event.- Specified by:
createTasksin 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:NotificationManagerCreate notification tasks for each notification matching provided conditions.- Specified by:
createTasksin 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:NotificationManagerStore execution of a NotificationTask.- Specified by:
storeExecin interfaceNotificationManager- Parameters:
execution- task execution.- Returns:
- merged task execution.
-
setTaskExecuted
Description copied from interface:NotificationManagerSet execution state of NotificationTask with provided id.- Specified by:
setTaskExecutedin interfaceNotificationManager- Parameters:
taskKey- task to be updatedexecuted- execution state
-
countExecutionsWithStatus
Description copied from interface:NotificationManagerCount the number of task executions of a given task with a given status.- Specified by:
countExecutionsWithStatusin interfaceNotificationManager- Parameters:
taskKey- taskstatus- status- Returns:
- number of task executions
-