Class AbstractProvisioningJobDelegate<T extends 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:
JobDelegate,SchedTaskJobDelegate
- Direct Known Subclasses:
PullJobDelegate,PushJobDelegate
public abstract class AbstractProvisioningJobDelegate<T extends ProvisioningTask<T>> extends AbstractSchedTaskJobDelegate<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected AnyTypeDAOanyTypeDAOAnyTypeDAO DAOprotected ConnectorManagerconnectorManagerConnInstance loader.protected EntityFactoryentityFactoryprotected Optional<ProvisionSorter>perContextProvisionSorterprotected PolicyDAOpolicyDAOPolicy DAO.protected ExternalResourceDAOresourceDAOResource DAO.-
Fields inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
auditManager, interrupt, interrupted, LOG, notificationManager, publisher, securityProperties, task, taskDAO, taskDataBinder, taskExecDAO, taskType, taskUtilsFactory
-
Fields inherited from interface org.apache.syncope.core.provisioning.api.job.JobDelegate
OPERATION_ID
-
-
Constructor Summary
Constructors Constructor Description AbstractProvisioningJobDelegate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringcreateReport(Collection<ProvisioningReport> provResults, ExternalResource resource, boolean dryRun)Create a textual report of the provisioning operation, based on the trace level.protected StringdoExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)The actual execution, delegated to child classes.protected abstract StringdoExecuteProvisioning(T task, Connector connector, boolean dryRun, String executor, org.quartz.JobExecutionContext context)protected Stringgenerate(Collection<ProvisioningReport> results, TraceLevel level)Helper method to invoke logging per provisioning result, for the given trace level.protected ConnectorgetConnector(T provisioningTask)protected ProvisionSortergetProvisionSorter(T task)protected Class<T>getTaskClassReference()protected booleanhasToBeRegistered(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 ConnectorManager connectorManager
ConnInstance loader.
-
anyTypeDAO
@Autowired protected AnyTypeDAO anyTypeDAO
AnyTypeDAO DAO
-
resourceDAO
@Autowired protected ExternalResourceDAO resourceDAO
Resource DAO.
-
entityFactory
@Autowired protected EntityFactory entityFactory
-
policyDAO
@Autowired protected PolicyDAO policyDAO
Policy DAO.
-
perContextProvisionSorter
protected Optional<ProvisionSorter> perContextProvisionSorter
-
-
Method Detail
-
getProvisionSorter
protected ProvisionSorter getProvisionSorter(T task)
-
generate
protected String generate(Collection<ProvisioningReport> results, 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<ProvisioningReport> provResults, 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 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:AbstractSchedTaskJobDelegateThe actual execution, delegated to child classes.- Specified by:
doExecutein classAbstractSchedTaskJobDelegate<T extends 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, Connector connector, boolean dryRun, String executor, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
- Throws:
org.quartz.JobExecutionException
-
hasToBeRegistered
protected boolean hasToBeRegistered(TaskExec<?> execution)
Description copied from class:AbstractSchedTaskJobDelegateTemplate method to determine whether this job's task execution has to be persisted or not.- Overrides:
hasToBeRegisteredin classAbstractSchedTaskJobDelegate<T extends ProvisioningTask<T>>- Parameters:
execution- task execution- Returns:
- whether to persist or not
-
-