Class AbstractPropagationTaskExecutor
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.propagation.AbstractPropagationTaskExecutor
-
- All Implemented Interfaces:
PropagationTaskExecutor
- Direct Known Subclasses:
PriorityPropagationTaskExecutor
@Transactional(rollbackFor=java.lang.Throwable.class) public abstract class AbstractPropagationTaskExecutor extends Object implements PropagationTaskExecutor
-
-
Field Summary
Fields Modifier and Type Field Description protected AnyUtilsFactoryanyUtilsFactoryprotected AuditManagerauditManagerprotected ConnectorManagerconnectorManagerprotected ConnObjectUtilsconnObjectUtilsprotected static LoggerLOGprotected NotificationManagernotificationManagerprotected OutboundMatcheroutboundMatcherprotected Map<String,PropagationActions>perContextActionsprotected PlainSchemaDAOplainSchemaDAOprotected ApplicationEventPublisherpublisherprotected ExternalResourceDAOresourceDAOprotected Map<String,org.springframework.retry.support.RetryTemplate>retryTemplatesprotected TaskDAOtaskDAOprotected TaskDataBindertaskDataBinderprotected TaskUtilsFactorytaskUtilsFactoryprotected PlainAttrValidationManagervalidator
-
Constructor Summary
Constructors Constructor Description AbstractPropagationTaskExecutor(ConnectorManager connectorManager, ConnObjectUtils connObjectUtils, TaskDAO taskDAO, ExternalResourceDAO resourceDAO, PlainSchemaDAO plainSchemaDAO, NotificationManager notificationManager, AuditManager auditManager, TaskDataBinder taskDataBinder, AnyUtilsFactory anyUtilsFactory, TaskUtilsFactory taskUtilsFactory, OutboundMatcher outboundMatcher, PlainAttrValidationManager validator, ApplicationEventPublisher publisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckMandatoryMissing(PropagationTaskInfo taskInfo, Set<Attribute> attrs, boolean enablePasswordCheck)protected UidcreateOrUpdate(PropagationTaskInfo taskInfo, boolean fetchRemoteObj, ConnectorObject beforeObj, Connector connector, AtomicReference<Boolean> propagationAttempted)protected Uiddelete(PropagationTaskInfo taskInfo, boolean fetchRemoteObj, ConnectorObject beforeObj, Connector connector, AtomicReference<Boolean> propagationAttempted)protected UiddoCreate(PropagationTaskInfo taskInfo, Connector connector, AtomicReference<Boolean> propagationAttempted)protected TaskExec<PropagationTask>doExecute(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor)protected UiddoUpdate(PropagationTaskInfo taskInfo, Connector connector, ConnectorObject beforeObj, AtomicReference<Boolean> propagationAttempted)protected UiddoUpdateDelta(PropagationTaskInfo taskInfo, Set<AttributeDelta> modifications, Connector connector, AtomicReference<Boolean> propagationAttempted)TaskExec<PropagationTask>execute(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor)Execute the given task and returns the generatedTaskExec.voidexpireRetryTemplate(String resource)Remove any RetryTemplate defined for the given External Resource from local cache.protected List<PropagationActions>getPropagationActions(ExternalResource resource)protected ConnectorObjectgetRemoteObject(PropagationTaskInfo taskInfo, Connector connector, OrgUnit orgUnit, List<PropagationActions> actions, boolean latest)Get remote object for given task.protected ConnectorObjectgetRemoteObject(PropagationTaskInfo taskInfo, Connector connector, Provision provision, List<PropagationActions> actions, boolean latest)Get remote object for given task.protected Optional<PropagationTask>hasToBeregistered(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution)Check whether an execution has to be stored, for a given task.protected booleanisFetchRemoteObj(PropagationTaskInfo taskInfo)protected TaskExec<PropagationTask>rejected(PropagationTaskInfo taskInfo, String rejectReason, PropagationReporter reporter, String executor)protected Optional<org.springframework.retry.support.RetryTemplate>retryTemplate(ExternalResource resource)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor
execute
-
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
retryTemplates
protected final Map<String,org.springframework.retry.support.RetryTemplate> retryTemplates
-
connectorManager
protected final ConnectorManager connectorManager
-
connObjectUtils
protected final ConnObjectUtils connObjectUtils
-
taskDAO
protected final TaskDAO taskDAO
-
resourceDAO
protected final ExternalResourceDAO resourceDAO
-
plainSchemaDAO
protected final PlainSchemaDAO plainSchemaDAO
-
notificationManager
protected final NotificationManager notificationManager
-
auditManager
protected final AuditManager auditManager
-
taskDataBinder
protected final TaskDataBinder taskDataBinder
-
anyUtilsFactory
protected final AnyUtilsFactory anyUtilsFactory
-
taskUtilsFactory
protected final TaskUtilsFactory taskUtilsFactory
-
outboundMatcher
protected final OutboundMatcher outboundMatcher
-
validator
protected final PlainAttrValidationManager validator
-
publisher
protected final ApplicationEventPublisher publisher
-
perContextActions
protected final Map<String,PropagationActions> perContextActions
-
-
Constructor Detail
-
AbstractPropagationTaskExecutor
public AbstractPropagationTaskExecutor(ConnectorManager connectorManager, ConnObjectUtils connObjectUtils, TaskDAO taskDAO, ExternalResourceDAO resourceDAO, PlainSchemaDAO plainSchemaDAO, NotificationManager notificationManager, AuditManager auditManager, TaskDataBinder taskDataBinder, AnyUtilsFactory anyUtilsFactory, TaskUtilsFactory taskUtilsFactory, OutboundMatcher outboundMatcher, PlainAttrValidationManager validator, ApplicationEventPublisher publisher)
-
-
Method Detail
-
expireRetryTemplate
public void expireRetryTemplate(String resource)
Description copied from interface:PropagationTaskExecutorRemove any RetryTemplate defined for the given External Resource from local cache.- Specified by:
expireRetryTemplatein interfacePropagationTaskExecutor- Parameters:
resource- External Resource name
-
getPropagationActions
protected List<PropagationActions> getPropagationActions(ExternalResource resource)
-
checkMandatoryMissing
protected void checkMandatoryMissing(PropagationTaskInfo taskInfo, Set<Attribute> attrs, boolean enablePasswordCheck)
-
doCreate
protected Uid doCreate(PropagationTaskInfo taskInfo, Connector connector, AtomicReference<Boolean> propagationAttempted)
-
doUpdate
protected Uid doUpdate(PropagationTaskInfo taskInfo, Connector connector, ConnectorObject beforeObj, AtomicReference<Boolean> propagationAttempted)
-
doUpdateDelta
protected Uid doUpdateDelta(PropagationTaskInfo taskInfo, Set<AttributeDelta> modifications, Connector connector, AtomicReference<Boolean> propagationAttempted)
-
createOrUpdate
protected Uid createOrUpdate(PropagationTaskInfo taskInfo, boolean fetchRemoteObj, ConnectorObject beforeObj, Connector connector, AtomicReference<Boolean> propagationAttempted)
-
delete
protected Uid delete(PropagationTaskInfo taskInfo, boolean fetchRemoteObj, ConnectorObject beforeObj, Connector connector, AtomicReference<Boolean> propagationAttempted)
-
retryTemplate
protected Optional<org.springframework.retry.support.RetryTemplate> retryTemplate(ExternalResource resource)
-
execute
public TaskExec<PropagationTask> execute(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor)
Description copied from interface:PropagationTaskExecutorExecute the given task and returns the generatedTaskExec.- Specified by:
executein interfacePropagationTaskExecutor- Parameters:
taskInfo- to be executedreporter- to report propagation execution statusexecutor- the executor of this task- Returns:
- the generated TaskExec
-
isFetchRemoteObj
protected boolean isFetchRemoteObj(PropagationTaskInfo taskInfo)
-
doExecute
protected TaskExec<PropagationTask> doExecute(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor)
-
rejected
protected TaskExec<PropagationTask> rejected(PropagationTaskInfo taskInfo, String rejectReason, PropagationReporter reporter, String executor)
-
hasToBeregistered
protected Optional<PropagationTask> hasToBeregistered(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution)
Check whether an execution has to be stored, for a given task.- Parameters:
taskInfo- propagation taskexecution- to be decide whether to store or not- Returns:
- true if execution has to be store, false otherwise
-
getRemoteObject
protected ConnectorObject getRemoteObject(PropagationTaskInfo taskInfo, Connector connector, Provision provision, List<PropagationActions> actions, boolean latest)
Get remote object for given task.- Parameters:
connector- connector facade proxytaskInfo- current propagation taskprovision- provisionactions- propagation actionslatest- 'FALSE' to retrieve object using old connObjectKey if not null.- Returns:
- remote connector object.
-
getRemoteObject
protected ConnectorObject getRemoteObject(PropagationTaskInfo taskInfo, Connector connector, OrgUnit orgUnit, List<PropagationActions> actions, boolean latest)
Get remote object for given task.- Parameters:
connector- connector facade proxytaskInfo- current propagation taskorgUnit- orgUnitactions- propagation actionslatest- 'FALSE' to retrieve object using old connObjectKey if not null.- Returns:
- remote connector object.
-
-