Interface ChangeLocation
- All Known Implementing Classes:
AtLastChange
,AtStepNamed
,EndOfBranchWith
Can identify a location at which a PipelineChange
can apply to the build state of a pipeline during wizard
process.
A change should typically be based on a description of the location and be as independent of the structure of the pipeline as possible to allow new questions and changes to be dropped in as non-invasively as possible. For example, a change that says 'at the end of the chain that contains such and such data' vs 'find step named y'
-
Field Summary
Modifier and TypeFieldDescriptionstatic final nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found
Magic value for nullstatic final ChangeLocation
Magic locator that signals that a change applies at the very end of the pipeline, which might vary in its interpretation, depending on the change it is applied to, but typically only meaningful for a new StepChain being insertedstatic final ChangeLocation
Magic locator that signals that a change applies at the very beginning of the pipeline, which might vary in its interpretation, depending on the change it is applied to, but typically only meaningful for a new StepChain being inserted -
Method Summary
Modifier and TypeMethodDescriptionstatic ChangeLocation
List<nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found>
find
(IncrementalBuildState buildState) default Optional<nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found>
findOne
(IncrementalBuildState buildState) default boolean
toString()
-
Field Details
-
EMPTY
static final nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found EMPTYMagic value for null
-
START
Magic locator that signals that a change applies at the very beginning of the pipeline, which might vary in its interpretation, depending on the change it is applied to, but typically only meaningful for a new StepChain being inserted
-
END
Magic locator that signals that a change applies at the very end of the pipeline, which might vary in its interpretation, depending on the change it is applied to, but typically only meaningful for a new StepChain being inserted
-
-
Method Details
-
isMultiple
default boolean isMultiple()- Returns:
- true if this change location expects to return more than one
PipelineDeclaration.Found
location.
-
find
List<nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found> find(IncrementalBuildState buildState) - Returns:
- a list of locations where the change should be made to the given state.
-
findOne
default Optional<nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found> findOne(IncrementalBuildState buildState) -
toString
String toString() -
atStep
- Returns:
- a ChangeLocation centred on a step definition with the given name
-