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:
SchedTaskJobDelegate
-
Field Summary
Modifier and TypeFieldDescriptionprotected ImplementationDAO
static final String
protected final Map
<String, MacroActions> protected VirtualThreadPoolTaskExecutor
protected Validator
Fields inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
auditManager, executor, LOG, manageOperationId, notificationManager, publisher, securityProperties, task, taskDAO, taskExecDAO, taskType, taskUtilsFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Optional
<JexlContext> check
(SyncopeForm macroTaskForm, Optional<MacroActions> actions, StringBuilder output) protected String
doExecute
(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
end, endExecution, execute, init, initExecution, register, setStatus
-
Field Details
-
MACRO_TASK_FORM_JOBDETAIL_KEY
- See Also:
-
implementationDAO
-
validator
-
taskExecutor
-
perContextActions
-
perContextCommands
-
-
Constructor Details
-
MacroJobDelegate
public MacroJobDelegate()
-
-
Method Details
-
check
protected Optional<JexlContext> check(SyncopeForm macroTaskForm, Optional<MacroActions> actions, StringBuilder output) throws JobExecutionException - Throws:
JobExecutionException
-
run
protected String run(List<Pair<Command<CommandArgs>, CommandArgs>> commands, Optional<MacroActions> actions, StringBuilder output, boolean dryRun) throws JobExecutionException- Throws:
JobExecutionException
-
doExecute
Description copied from class:AbstractSchedTaskJobDelegate
The actual execution, delegated to child classes.- Specified by:
doExecute
in classAbstractSchedTaskJobDelegate<MacroTask>
- 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
-
hasToBeRegistered
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
-