Package nz.org.riskscape.wizard.bld
Interface PipelineChange
- All Known Implementing Classes:
AppendJoinChange,AppendStepChange,BasePipelineChange,MultipleChanges,NoChange,SimpleChange,StartChainChange
public interface PipelineChange
An operation that can return a possibly new IncrementalBuildState in response to an Answer. The
returned build state reflects the change.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IncompletePipelineChangeChains aStepChainto an existingStepChain, appending the chain to the last implicit stepstatic IncompletePipelineChangedefault Questiondefault QuestionSetnz.org.riskscape.problem.ResultOrProblems<IncrementalBuildState>make(IncrementalBuildState currentState) Attempt to create a new IncrementalBuildState for this changestatic IncompletePipelineChangemany(List<IncompletePipelineChange> children) static IncompletePipelineChangemany(IncompletePipelineChange... children) static IncompletePipelineChangeAdd a newStepChainto the pipeline, disconnected from any otherStepChains.static IncompletePipelineChangenoChange()default nz.org.riskscape.pipeline.ast.PipelineDeclarationHelper method to attempt parsing some pipeline dsl source, wrapping anyParseExceptions in aBadPipelineChangeExceptionstatic IncompletePipelineChangesimple(BiFunction<Answer, IncrementalBuildState, nz.org.riskscape.pipeline.ast.PipelineDeclaration> function)
-
Method Details
-
chainStep
Chains a
StepChainto an existingStepChain, appending the chain to the last implicit step -
newChain
Add a new
StepChainto the pipeline, disconnected from any otherStepChains. -
simple
static IncompletePipelineChange simple(BiFunction<Answer, IncrementalBuildState, nz.org.riskscape.pipeline.ast.PipelineDeclaration> function) - Returns:
- a
PipelineChangebased on a function that returns a newPipelineDeclaration.
-
many
- Returns:
- a
PipelineChangethat is composed of many other changes that get applied on order
-
many
- Returns:
- a
PipelineChangethat is composed of many other changes that get applied on order
-
noChange
- Returns:
- a
PipelineChangethat does nothing
-
failed
- Returns:
- a
PipelineChangethat will always fail with the given problems.
-
make
nz.org.riskscape.problem.ResultOrProblems<IncrementalBuildState> make(IncrementalBuildState currentState) throws BadPipelineChangeException Attempt to create a new IncrementalBuildState for this change
- Returns:
- a new IncrementalBuildState with this change applied
- Throws:
BadPipelineChangeException- if something went wrong that wasn't the user's fault
-
getAnswer
Answer getAnswer()- Returns:
- the Answer that was ultimately responsible for this
PipelineChangebeing introduced. Note that this might not be the only thing that predicated this change, but it is the last thing that caused it (the straw that broke the camel's back, so to speak)
-
parse
Helper method to attempt parsing some pipeline dsl source, wrapping any
ParseExceptions in aBadPipelineChangeException -
getQuestionSet
- Returns:
- the QuestionSet that was responsible for this change
-
getQuestion
- Returns:
- the Question that was responsible for this change
-