Package org.kinotic.continuum.grind.api
Interface JobDefinition
-
- All Superinterfaces:
HasSteps
- All Known Implementing Classes:
DefaultJobDefinition
public interface JobDefinition extends HasSteps
AJobDefinitionprovides a unit of work comprised ofTask's and otherJobDefinitionFor everyJobDefinitiona SpringApplicationContextis provided, to allowTask's to automatically store and access data produced byTask's Created by Navid Mitchell on 3/19/20
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static JobDefinitioncreate()static JobDefinitioncreate(java.lang.String description)static JobDefinitioncreate(java.lang.String description, boolean parallel)static JobDefinitioncreate(java.lang.String description, JobScope jobScope)static JobDefinitioncreate(java.lang.String description, JobScope jobScope, boolean parallel)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
-
-
-
Method Detail
-
getDescription
java.lang.String getDescription()
- Returns:
- the description of this
JobDefinition
-
isParallel
boolean isParallel()
If thisJobDefinitionsupports running it'sTask's in parallel- Returns:
- true if
Tasks's can be run in parallel false if not
-
getScope
JobScope getScope()
TheJobScopethat will be used during the execution of thisJobDefinition- Returns:
- the
JobScopethe default isJobScope.CHILD
-
task
JobDefinition task(Task<?> task)
- Parameters:
task- to add- Returns:
- this for fluent use
-
taskStoreResult
JobDefinition taskStoreResult(Task<?> task)
Adds aTaskto the list ofTask's that will be executed by thisJobDefinitionand stores the result of theTaskexecution within the context for thisJobDefinition- Parameters:
task- to add- Returns:
- this for fluent use
-
taskStoreResult
JobDefinition taskStoreResult(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- Parameters:
task- to addvariableName- the name to use when storing theTaskresult in the context for thisJobDefinition- Returns:
- this for fluent use
-
jobDefinition
JobDefinition jobDefinition(JobDefinition jobDefinition)
Adds a innerJobDefinitionto thisJobDefinition- Parameters:
jobDefinition- to add into thisJobDefinition- Returns:
- this for fluent use
-
getSteps
java.util.List<Step> getSteps()
- Specified by:
getStepsin interfaceHasSteps- Returns:
- the
Step's defined for thisJobDefinition
-
create
static JobDefinition create()
- Returns:
- the new
JobDefinition
-
create
static JobDefinition create(java.lang.String description)
-
create
static JobDefinition create(java.lang.String description, JobScope jobScope)
-
create
static JobDefinition create(java.lang.String description, JobScope jobScope, boolean parallel)
-
create
static JobDefinition create(java.lang.String description, boolean parallel)
-
-