Class DefaultNotificationManager
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.notification.DefaultNotificationManager
-
- All Implemented Interfaces:
org.apache.syncope.core.provisioning.api.notification.NotificationManager
@Transactional(rollbackFor=java.lang.Throwable.class) public class DefaultNotificationManager extends Object implements org.apache.syncope.core.provisioning.api.notification.NotificationManager
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.syncope.core.persistence.api.dao.AnyMatchDAO
anyMatchDAO
protected org.apache.syncope.core.persistence.api.dao.AnyObjectDAO
anyObjectDAO
protected org.apache.syncope.core.provisioning.api.data.AnyObjectDataBinder
anyObjectDataBinder
protected org.apache.syncope.core.persistence.api.dao.AnySearchDAO
anySearchDAO
protected org.apache.syncope.common.keymaster.client.api.ConfParamOps
confParamOps
protected org.apache.syncope.core.provisioning.api.DerAttrHandler
derAttrHandler
protected org.apache.syncope.core.persistence.api.dao.DerSchemaDAO
derSchemaDAO
protected org.apache.syncope.core.persistence.api.entity.EntityFactory
entityFactory
protected org.apache.syncope.core.persistence.api.dao.GroupDAO
groupDAO
protected org.apache.syncope.core.provisioning.api.data.GroupDataBinder
groupDataBinder
protected org.apache.syncope.core.provisioning.api.IntAttrNameParser
intAttrNameParser
protected static org.slf4j.Logger
LOG
protected org.apache.syncope.core.persistence.api.dao.NotificationDAO
notificationDAO
protected Optional<org.apache.syncope.core.provisioning.api.notification.RecipientsProvider>
perContextRecipientsProvider
protected org.apache.syncope.core.persistence.api.search.SearchCondVisitor
searchCondVisitor
protected org.apache.syncope.core.persistence.api.dao.TaskDAO
taskDAO
protected org.apache.syncope.core.persistence.api.dao.UserDAO
userDAO
protected org.apache.syncope.core.provisioning.api.data.UserDataBinder
userDataBinder
protected org.apache.syncope.core.provisioning.api.VirAttrHandler
virAttrHandler
protected org.apache.syncope.core.persistence.api.dao.VirSchemaDAO
virSchemaDAO
-
Constructor Summary
Constructors Constructor Description DefaultNotificationManager(org.apache.syncope.core.persistence.api.dao.DerSchemaDAO derSchemaDAO, org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO, org.apache.syncope.core.persistence.api.dao.NotificationDAO notificationDAO, org.apache.syncope.core.persistence.api.dao.AnyObjectDAO anyObjectDAO, org.apache.syncope.core.persistence.api.dao.UserDAO userDAO, org.apache.syncope.core.persistence.api.dao.GroupDAO groupDAO, org.apache.syncope.core.persistence.api.dao.AnySearchDAO anySearchDAO, org.apache.syncope.core.persistence.api.dao.AnyMatchDAO anyMatchDAO, org.apache.syncope.core.persistence.api.dao.TaskDAO taskDAO, org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler, org.apache.syncope.core.provisioning.api.VirAttrHandler virAttrHandler, org.apache.syncope.core.provisioning.api.data.UserDataBinder userDataBinder, org.apache.syncope.core.provisioning.api.data.GroupDataBinder groupDataBinder, org.apache.syncope.core.provisioning.api.data.AnyObjectDataBinder anyObjectDataBinder, org.apache.syncope.common.keymaster.client.api.ConfParamOps confParamOps, org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory, org.apache.syncope.core.provisioning.api.IntAttrNameParser intAttrNameParser, org.apache.syncope.core.persistence.api.search.SearchCondVisitor searchCondVisitor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countExecutionsWithStatus(String taskKey, String status)
List<org.apache.syncope.core.persistence.api.entity.task.NotificationTask>
createTasks(String who, org.apache.syncope.common.lib.types.AuditElements.EventCategoryType type, String category, String subcategory, String event, org.apache.syncope.common.lib.types.AuditElements.Result condition, Object before, Object output, Object... input)
void
createTasks(org.apache.syncope.core.provisioning.api.event.AfterHandlingEvent event)
protected static String
evaluate(String template, Map<String,Object> jexlVars)
long
getMaxRetries()
protected org.apache.syncope.core.persistence.api.entity.task.NotificationTask
getNotificationTask(org.apache.syncope.core.persistence.api.entity.Notification notification, org.apache.syncope.core.persistence.api.entity.Any<?> any, Map<String,Object> jexlVars)
Create a notification task.protected String
getRecipientEmail(String recipientAttrName, org.apache.syncope.core.persistence.api.entity.user.User user)
boolean
notificationsAvailable(org.apache.syncope.common.lib.types.AuditElements.EventCategoryType type, String category, String subcategory, String event)
void
setTaskExecuted(String taskKey, boolean executed)
org.apache.syncope.core.persistence.api.entity.task.TaskExec<org.apache.syncope.core.persistence.api.entity.task.NotificationTask>
storeExec(org.apache.syncope.core.persistence.api.entity.task.TaskExec<org.apache.syncope.core.persistence.api.entity.task.NotificationTask> execution)
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
derSchemaDAO
protected final org.apache.syncope.core.persistence.api.dao.DerSchemaDAO derSchemaDAO
-
virSchemaDAO
protected final org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO
-
notificationDAO
protected final org.apache.syncope.core.persistence.api.dao.NotificationDAO notificationDAO
-
anyObjectDAO
protected final org.apache.syncope.core.persistence.api.dao.AnyObjectDAO anyObjectDAO
-
userDAO
protected final org.apache.syncope.core.persistence.api.dao.UserDAO userDAO
-
groupDAO
protected final org.apache.syncope.core.persistence.api.dao.GroupDAO groupDAO
-
anySearchDAO
protected final org.apache.syncope.core.persistence.api.dao.AnySearchDAO anySearchDAO
-
anyMatchDAO
protected final org.apache.syncope.core.persistence.api.dao.AnyMatchDAO anyMatchDAO
-
taskDAO
protected final org.apache.syncope.core.persistence.api.dao.TaskDAO taskDAO
-
derAttrHandler
protected final org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler
-
virAttrHandler
protected final org.apache.syncope.core.provisioning.api.VirAttrHandler virAttrHandler
-
userDataBinder
protected final org.apache.syncope.core.provisioning.api.data.UserDataBinder userDataBinder
-
groupDataBinder
protected final org.apache.syncope.core.provisioning.api.data.GroupDataBinder groupDataBinder
-
anyObjectDataBinder
protected final org.apache.syncope.core.provisioning.api.data.AnyObjectDataBinder anyObjectDataBinder
-
confParamOps
protected final org.apache.syncope.common.keymaster.client.api.ConfParamOps confParamOps
-
entityFactory
protected final org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory
-
intAttrNameParser
protected final org.apache.syncope.core.provisioning.api.IntAttrNameParser intAttrNameParser
-
searchCondVisitor
protected final org.apache.syncope.core.persistence.api.search.SearchCondVisitor searchCondVisitor
-
perContextRecipientsProvider
protected Optional<org.apache.syncope.core.provisioning.api.notification.RecipientsProvider> perContextRecipientsProvider
-
-
Constructor Detail
-
DefaultNotificationManager
public DefaultNotificationManager(org.apache.syncope.core.persistence.api.dao.DerSchemaDAO derSchemaDAO, org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO, org.apache.syncope.core.persistence.api.dao.NotificationDAO notificationDAO, org.apache.syncope.core.persistence.api.dao.AnyObjectDAO anyObjectDAO, org.apache.syncope.core.persistence.api.dao.UserDAO userDAO, org.apache.syncope.core.persistence.api.dao.GroupDAO groupDAO, org.apache.syncope.core.persistence.api.dao.AnySearchDAO anySearchDAO, org.apache.syncope.core.persistence.api.dao.AnyMatchDAO anyMatchDAO, org.apache.syncope.core.persistence.api.dao.TaskDAO taskDAO, org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler, org.apache.syncope.core.provisioning.api.VirAttrHandler virAttrHandler, org.apache.syncope.core.provisioning.api.data.UserDataBinder userDataBinder, org.apache.syncope.core.provisioning.api.data.GroupDataBinder groupDataBinder, org.apache.syncope.core.provisioning.api.data.AnyObjectDataBinder anyObjectDataBinder, org.apache.syncope.common.keymaster.client.api.ConfParamOps confParamOps, org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory, org.apache.syncope.core.provisioning.api.IntAttrNameParser intAttrNameParser, org.apache.syncope.core.persistence.api.search.SearchCondVisitor searchCondVisitor)
-
-
Method Detail
-
getMaxRetries
@Transactional(readOnly=true) public long getMaxRetries()
- Specified by:
getMaxRetries
in interfaceorg.apache.syncope.core.provisioning.api.notification.NotificationManager
-
getNotificationTask
protected org.apache.syncope.core.persistence.api.entity.task.NotificationTask getNotificationTask(org.apache.syncope.core.persistence.api.entity.Notification notification, org.apache.syncope.core.persistence.api.entity.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(org.apache.syncope.common.lib.types.AuditElements.EventCategoryType type, String category, String subcategory, String event)
- Specified by:
notificationsAvailable
in interfaceorg.apache.syncope.core.provisioning.api.notification.NotificationManager
-
createTasks
public void createTasks(org.apache.syncope.core.provisioning.api.event.AfterHandlingEvent event)
- Specified by:
createTasks
in interfaceorg.apache.syncope.core.provisioning.api.notification.NotificationManager
-
createTasks
public List<org.apache.syncope.core.persistence.api.entity.task.NotificationTask> createTasks(String who, org.apache.syncope.common.lib.types.AuditElements.EventCategoryType type, String category, String subcategory, String event, org.apache.syncope.common.lib.types.AuditElements.Result condition, Object before, Object output, Object... input)
- Specified by:
createTasks
in interfaceorg.apache.syncope.core.provisioning.api.notification.NotificationManager
-
getRecipientEmail
protected String getRecipientEmail(String recipientAttrName, org.apache.syncope.core.persistence.api.entity.user.User user)
-
storeExec
public org.apache.syncope.core.persistence.api.entity.task.TaskExec<org.apache.syncope.core.persistence.api.entity.task.NotificationTask> storeExec(org.apache.syncope.core.persistence.api.entity.task.TaskExec<org.apache.syncope.core.persistence.api.entity.task.NotificationTask> execution)
- Specified by:
storeExec
in interfaceorg.apache.syncope.core.provisioning.api.notification.NotificationManager
-
setTaskExecuted
public void setTaskExecuted(String taskKey, boolean executed)
- Specified by:
setTaskExecuted
in interfaceorg.apache.syncope.core.provisioning.api.notification.NotificationManager
-
-