Package com.atlassian.bamboo.task
Class TaskActionExecutorImpl
- java.lang.Object
-
- com.atlassian.bamboo.task.TaskActionExecutorImpl
-
- All Implemented Interfaces:
TaskActionExecutor
@Internal public class TaskActionExecutorImpl extends Object implements TaskActionExecutor
-
-
Constructor Summary
Constructors Constructor Description TaskActionExecutorImpl(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskResult
executePostTaskActions(@NotNull InternalTaskType task, @Nullable TaskResult taskResult, @NotNull Collection<PrePostTaskActions> taskActions)
Run post-task execution actions.Collection<PrePostTaskActions>
executePreTaskActions(@NotNull InternalTaskType task, @NotNull CommonTaskContext taskContext)
Run pre-task execution actions.protected <D extends PrePostTaskActionsDescriptor,T extends InternalTaskType>
Collection<PrePostTaskActions>getTaskActionsFor(Class<D> descriptorClass, T task)
Find all module descriptors ofdescriptorClass
type, next reduce a list to those which are intended to be used with tasks oftask
type (descriptor.getTaskClass()).
-
-
-
Method Detail
-
getTaskActionsFor
protected <D extends PrePostTaskActionsDescriptor,T extends InternalTaskType> Collection<PrePostTaskActions> getTaskActionsFor(Class<D> descriptorClass, T task)
Find all module descriptors ofdescriptorClass
type, next reduce a list to those which are intended to be used with tasks oftask
type (descriptor.getTaskClass()). Extract actions from module descriptors.- Type Parameters:
D
- module descriptors for our PrePostTaskActionsT
- type of a current task, in our case CommonTaskType / TaskType / DeploymentTaskType- Parameters:
descriptorClass
- type of a plugin points we're looking fortask
- current task being executed- Returns:
- Collection<BPM> list of plugin point actions for this task
-
executePreTaskActions
public Collection<PrePostTaskActions> executePreTaskActions(@NotNull @NotNull InternalTaskType task, @NotNull @NotNull CommonTaskContext taskContext)
Description copied from interface:TaskActionExecutor
Run pre-task execution actions.- Specified by:
executePreTaskActions
in interfaceTaskActionExecutor
- Parameters:
task
- a current task which will be executed after these pre-task actionstaskContext
- a current task context- Returns:
- Collection<PrePostTaskActions> a list of actions which have been executed
-
executePostTaskActions
public TaskResult executePostTaskActions(@NotNull @NotNull InternalTaskType task, @Nullable @Nullable TaskResult taskResult, @NotNull @NotNull Collection<PrePostTaskActions> taskActions)
Description copied from interface:TaskActionExecutor
Run post-task execution actions.- Specified by:
executePostTaskActions
in interfaceTaskActionExecutor
- Parameters:
task
- a current task which was be executed before these post-task actionstaskResult
- a result returned by the task; may benull
in case the task terminated abnormally- Returns:
- TaskResult task result (may be modified by post-task actions)
-
-