Class AbstractProvisioningJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<T>
-
- org.apache.syncope.core.provisioning.java.pushpull.AbstractProvisioningJobDelegate<T>
-
- All Implemented Interfaces:
org.apache.syncope.core.provisioning.api.job.JobDelegate
,org.apache.syncope.core.provisioning.api.job.SchedTaskJobDelegate
- Direct Known Subclasses:
PullJobDelegate
,PushJobDelegate
public abstract class AbstractProvisioningJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>> extends AbstractSchedTaskJobDelegate<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.syncope.core.persistence.api.dao.AnyTypeDAO
anyTypeDAO
AnyTypeDAO DAOprotected org.apache.syncope.core.provisioning.api.ConnectorManager
connectorManager
ConnInstance loader.protected org.apache.syncope.core.persistence.api.entity.EntityFactory
entityFactory
protected Optional<org.apache.syncope.core.provisioning.api.ProvisionSorter>
perContextProvisionSorter
protected org.apache.syncope.core.persistence.api.dao.PolicyDAO
policyDAO
Policy DAO.protected org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO
resourceDAO
Resource DAO.-
Fields inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
auditManager, interrupt, interrupted, LOG, notificationManager, publisher, task, taskDAO, taskDataBinder, taskExecDAO, taskType, taskUtilsFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractProvisioningJobDelegate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
createReport(Collection<org.apache.syncope.common.lib.to.ProvisioningReport> provResults, org.apache.syncope.core.persistence.api.entity.ExternalResource resource, boolean dryRun)
Create a textual report of the provisioning operation, based on the trace level.protected String
doExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)
The actual execution, delegated to child classes.protected abstract String
doExecuteProvisioning(T task, org.apache.syncope.core.provisioning.api.Connector connector, boolean dryRun, String executor, org.quartz.JobExecutionContext context)
protected String
generate(Collection<org.apache.syncope.common.lib.to.ProvisioningReport> results, org.apache.syncope.common.lib.types.TraceLevel level)
Helper method to invoke logging per provisioning result, for the given trace level.protected org.apache.syncope.core.provisioning.api.Connector
getConnector(T provisioningTask)
protected org.apache.syncope.core.provisioning.api.ProvisionSorter
getProvisionSorter(T task)
protected Class<T>
getTaskClassReference()
protected boolean
hasToBeRegistered(org.apache.syncope.core.persistence.api.entity.task.TaskExec<?> execution)
Template method to determine whether this job's task execution has to be persisted or not.-
Methods inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
execute, interrupt, isInterrupted, register, setStatus
-
-
-
-
Field Detail
-
connectorManager
@Autowired protected org.apache.syncope.core.provisioning.api.ConnectorManager connectorManager
ConnInstance loader.
-
anyTypeDAO
@Autowired protected org.apache.syncope.core.persistence.api.dao.AnyTypeDAO anyTypeDAO
AnyTypeDAO DAO
-
resourceDAO
@Autowired protected org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO
Resource DAO.
-
entityFactory
@Autowired protected org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory
-
policyDAO
@Autowired protected org.apache.syncope.core.persistence.api.dao.PolicyDAO policyDAO
Policy DAO.
-
perContextProvisionSorter
protected Optional<org.apache.syncope.core.provisioning.api.ProvisionSorter> perContextProvisionSorter
-
-
Method Detail
-
getProvisionSorter
protected org.apache.syncope.core.provisioning.api.ProvisionSorter getProvisionSorter(T task)
-
generate
protected String generate(Collection<org.apache.syncope.common.lib.to.ProvisioningReport> results, org.apache.syncope.common.lib.types.TraceLevel level)
Helper method to invoke logging per provisioning result, for the given trace level.- Parameters:
results
- provisioning resultslevel
- trace level- Returns:
- report as string
-
createReport
protected String createReport(Collection<org.apache.syncope.common.lib.to.ProvisioningReport> provResults, org.apache.syncope.core.persistence.api.entity.ExternalResource resource, boolean dryRun)
Create a textual report of the provisioning operation, based on the trace level.- Parameters:
provResults
- Provisioning resultsresource
- Provisioning resourcedryRun
- dry run?- Returns:
- report as string
-
getConnector
protected org.apache.syncope.core.provisioning.api.Connector getConnector(T provisioningTask) throws org.quartz.JobExecutionException
- Throws:
org.quartz.JobExecutionException
-
doExecute
protected String doExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
Description copied from class:AbstractSchedTaskJobDelegate
The actual execution, delegated to child classes.- Specified by:
doExecute
in classAbstractSchedTaskJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>
- Parameters:
dryRun
- whether to actually touch the dataexecutor
- the user executing this taskcontext
- Quartz' execution context, can be used to pass parameters to the job- Returns:
- the task execution status to be set
- Throws:
org.quartz.JobExecutionException
- if anything goes wrong
-
doExecuteProvisioning
protected abstract String doExecuteProvisioning(T task, org.apache.syncope.core.provisioning.api.Connector connector, boolean dryRun, String executor, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
- Throws:
org.quartz.JobExecutionException
-
hasToBeRegistered
protected boolean hasToBeRegistered(org.apache.syncope.core.persistence.api.entity.task.TaskExec<?> execution)
Description copied from class:AbstractSchedTaskJobDelegate
Template method to determine whether this job's task execution has to be persisted or not.- Overrides:
hasToBeRegistered
in classAbstractSchedTaskJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>
- Parameters:
execution
- task execution- Returns:
- whether to persist or not
-
-