Class DefaultJobDefinition
- java.lang.Object
-
- org.kinotic.continuum.grind.internal.api.DefaultJobDefinition
-
- All Implemented Interfaces:
HasSteps,JobDefinition
public class DefaultJobDefinition extends java.lang.Object implements JobDefinition
NOTE: should not be instantiated directly Created by Navid Mitchell on 3/19/20
-
-
Constructor Summary
Constructors Constructor Description DefaultJobDefinition(java.lang.String description, JobScope jobScope, boolean parallel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()JobScopegetScope()TheJobScopethat will be used during the execution of thisJobDefinitionjava.util.List<Step>getSteps()booleanisParallel()If thisJobDefinitionsupports running it'sTask's in parallelJobDefinitionjobDefinition(JobDefinition jobDefinition)Adds a innerJobDefinitionto thisJobDefinitionJobDefinitiontask(Task<?> task)JobDefinitiontaskStoreResult(Task<?> task)Adds aTaskto the list ofTask's that will be executed by thisJobDefinitionand stores the result of theTaskexecution within the context for thisJobDefinitionJobDefinitiontaskStoreResult(Task<?> task, java.lang.String variableName)Adds aTaskto the list ofTask's that will be executed by thisJobDefinitionand stores the result of theTaskexecution within the context for thisJobDefinition
-
-
-
Constructor Detail
-
DefaultJobDefinition
public DefaultJobDefinition(java.lang.String description, JobScope jobScope, boolean parallel)
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceJobDefinition- Returns:
- the description of this
JobDefinition
-
isParallel
public boolean isParallel()
Description copied from interface:JobDefinitionIf thisJobDefinitionsupports running it'sTask's in parallel- Specified by:
isParallelin interfaceJobDefinition- Returns:
- true if
Tasks's can be run in parallel false if not
-
getScope
public JobScope getScope()
Description copied from interface:JobDefinitionTheJobScopethat will be used during the execution of thisJobDefinition- Specified by:
getScopein interfaceJobDefinition- Returns:
- the
JobScopethe default isJobScope.CHILD
-
task
public JobDefinition task(Task<?> task)
Description copied from interface:JobDefinition- Specified by:
taskin interfaceJobDefinition- Parameters:
task- to add- Returns:
- this for fluent use
-
taskStoreResult
public JobDefinition taskStoreResult(Task<?> task)
Description copied from interface:JobDefinitionAdds aTaskto the list ofTask's that will be executed by thisJobDefinitionand stores the result of theTaskexecution within the context for thisJobDefinition- Specified by:
taskStoreResultin interfaceJobDefinition- Parameters:
task- to add- Returns:
- this for fluent use
-
taskStoreResult
public JobDefinition taskStoreResult(Task<?> task, java.lang.String variableName)
Description copied from interface:JobDefinitionAdds aTaskto the list ofTask's that will be executed by thisJobDefinitionand stores the result of theTaskexecution within the context for thisJobDefinition- Specified by:
taskStoreResultin interfaceJobDefinition- Parameters:
task- to addvariableName- the name to use when storing theTaskresult in the context for thisJobDefinition- Returns:
- this for fluent use
-
jobDefinition
public JobDefinition jobDefinition(JobDefinition jobDefinition)
Description copied from interface:JobDefinitionAdds a innerJobDefinitionto thisJobDefinition- Specified by:
jobDefinitionin interfaceJobDefinition- Parameters:
jobDefinition- to add into thisJobDefinition- Returns:
- this for fluent use
-
getSteps
public java.util.List<Step> getSteps()
- Specified by:
getStepsin interfaceHasSteps- Specified by:
getStepsin interfaceJobDefinition- Returns:
- the
Step's defined for thisJobDefinition
-
-