Class MacroJobDelegate
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<MacroTask>
-
- org.apache.syncope.core.provisioning.java.job.MacroJobDelegate
-
- All Implemented Interfaces:
JobDelegate
,SchedTaskJobDelegate
public class MacroJobDelegate extends AbstractSchedTaskJobDelegate<MacroTask>
-
-
Field Summary
Fields Modifier and Type Field Description protected ThreadPoolTaskExecutor
executor
protected ImplementationDAO
implementationDAO
static String
MACRO_TASK_FORM_JOBDETAIL_KEY
protected Map<String,MacroActions>
perContextActions
protected Map<String,Command<?>>
perContextCommands
protected javax.validation.Validator
validator
-
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 MacroJobDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<JexlContext>
check(SyncopeForm macroTaskForm, Optional<MacroActions> actions, StringBuilder output)
protected String
doExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)
The actual execution, delegated to child classes.protected boolean
hasToBeRegistered(TaskExec<?> execution)
Template method to determine whether this job's task execution has to be persisted or not.protected String
run(List<Pair<Command<CommandArgs>,CommandArgs>> commands, Optional<MacroActions> actions, StringBuilder output, boolean dryRun)
-
Methods inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
execute, interrupt, isInterrupted, register, setStatus
-
-
-
-
Field Detail
-
MACRO_TASK_FORM_JOBDETAIL_KEY
public static final String MACRO_TASK_FORM_JOBDETAIL_KEY
- See Also:
- Constant Field Values
-
implementationDAO
@Autowired protected ImplementationDAO implementationDAO
-
validator
@Autowired protected javax.validation.Validator validator
-
executor
protected ThreadPoolTaskExecutor executor
-
perContextActions
protected final Map<String,MacroActions> perContextActions
-
-
Method Detail
-
check
protected Optional<JexlContext> check(SyncopeForm macroTaskForm, Optional<MacroActions> actions, StringBuilder output) throws org.quartz.JobExecutionException
- Throws:
org.quartz.JobExecutionException
-
run
protected String run(List<Pair<Command<CommandArgs>,CommandArgs>> commands, Optional<MacroActions> actions, StringBuilder output, boolean dryRun) 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<MacroTask>
- 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
-
hasToBeRegistered
protected boolean hasToBeRegistered(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<MacroTask>
- Parameters:
execution
- task execution- Returns:
- whether to persist or not
-
-