Class AbstractSchedTaskJobDelegate<T extends SchedTask>
java.lang.Object
org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<T>
- All Implemented Interfaces:
- SchedTaskJobDelegate
- Direct Known Subclasses:
- AbstractProvisioningJobDelegate,- ElasticsearchReindex,- ExpiredAccessTokenCleanup,- ExpiredBatchCleanup,- GroupMemberProvisionTaskJobDelegate,- MacroJobDelegate,- OpenFGAReinit,- OpenSearchReindex,- TestSampleJobDelegate
public abstract class AbstractSchedTaskJobDelegate<T extends SchedTask>
extends Object
implements SchedTaskJobDelegate
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AuditManagerAudit manager.protected Stringprotected static final Loggerprotected booleanprotected NotificationManagerNotification manager.protected ApplicationEventPublisherprotected SecurityPropertiesprotected TThe actual task to be executed.protected TaskDAOTask DAO.protected TaskExecDAOTask execution DAO.protected TaskTypeprotected TaskUtilsFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract StringdoExecute(JobExecutionContext context) The actual execution, delegated to child classes.protected voidend()protected voidendExecution(TaskExec<SchedTask> execution, String message, String status, OpEvent.Outcome result) voidexecute(TaskType taskType, String taskKey, JobExecutionContext context) Executes a Job to run the given Task.protected booleanhasToBeRegistered(TaskExec<?> execution) Template method to determine whether this job's task execution has to be persisted or not.protected voidinit(TaskType taskType, String taskKey, JobExecutionContext context) protected voidprotected void
- 
Field Details- 
LOG
- 
securityProperties
- 
taskType
- 
taskThe actual task to be executed.
- 
taskExecDAOTask execution DAO.
- 
taskDAOTask DAO.
- 
taskUtilsFactory
- 
notificationManagerNotification manager.
- 
auditManagerAudit manager.
- 
publisher
- 
manageOperationIdprotected boolean manageOperationId
- 
executor
 
- 
- 
Constructor Details- 
AbstractSchedTaskJobDelegatepublic AbstractSchedTaskJobDelegate()
 
- 
- 
Method Details- 
setStatus
- 
initprotected void init(TaskType taskType, String taskKey, JobExecutionContext context) throws JobExecutionException - Throws:
- JobExecutionException
 
- 
initExecution
- 
endExecutionprotected void endExecution(TaskExec<SchedTask> execution, String message, String status, OpEvent.Outcome result) 
- 
endprotected void end()
- 
execute@Transactional public void execute(TaskType taskType, String taskKey, JobExecutionContext context) throws JobExecutionException Description copied from interface:SchedTaskJobDelegateExecutes a Job to run the given Task.- Specified by:
- executein interface- SchedTaskJobDelegate
- Parameters:
- taskType- Type of task to run
- taskKey- Task key to run
- context- execution context, can be used to pass parameters to the job
- Throws:
- JobExecutionException- if anything goes wrong
 
- 
doExecuteThe actual execution, delegated to child classes.- Parameters:
- context- job execution context, can be used to pass parameters to the job
- Returns:
- the task execution status to be set
- Throws:
- JobExecutionException- if anything goes wrong
 
- 
hasToBeRegisteredTemplate method to determine whether this job's task execution has to be persisted or not.- Parameters:
- execution- task execution
- Returns:
- whether to persist or not
 
- 
register
 
-