Class TestSampleJobDelegate
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<SchedTask>
-
- org.apache.syncope.fit.core.reference.TestSampleJobDelegate
-
- All Implemented Interfaces:
JobDelegate,SchedTaskJobDelegate
public class TestSampleJobDelegate extends AbstractSchedTaskJobDelegate<SchedTask>
Sample implementation for executing a scheduled task.
-
-
Field Summary
-
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 TestSampleJobDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdoExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)The actual execution, delegated to child classes.protected booleanhasToBeRegistered(TaskExec<?> execution)Template method to determine whether this job's task execution has to be persisted or not.voidinterrupt()booleanisInterrupted()-
Methods inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
execute, register, setStatus
-
-
-
-
Method Detail
-
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<SchedTask>- 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
-
interrupt
public void interrupt()
- Specified by:
interruptin interfaceJobDelegate- Overrides:
interruptin classAbstractSchedTaskJobDelegate<SchedTask>
-
isInterrupted
public boolean isInterrupted()
- Specified by:
isInterruptedin interfaceJobDelegate- Overrides:
isInterruptedin classAbstractSchedTaskJobDelegate<SchedTask>
-
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<SchedTask>- Parameters:
execution- task execution- Returns:
- whether to persist or not
-
-