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 IncompletePipelineChange
Chains aStepChain
to an existingStepChain
, appending the chain to the last implicit stepstatic IncompletePipelineChange
default Question
default QuestionSet
nz.org.riskscape.problem.ResultOrProblems<IncrementalBuildState>
make
(IncrementalBuildState currentState) Attempt to create a new IncrementalBuildState for this changestatic IncompletePipelineChange
many
(List<IncompletePipelineChange> children) static IncompletePipelineChange
many
(IncompletePipelineChange... children) static IncompletePipelineChange
Add a newStepChain
to the pipeline, disconnected from any otherStepChain
s.static IncompletePipelineChange
noChange()
default nz.org.riskscape.pipeline.ast.PipelineDeclaration
Helper method to attempt parsing some pipeline dsl source, wrapping anyParseException
s in aBadPipelineChangeException
static IncompletePipelineChange
simple
(BiFunction<Answer, IncrementalBuildState, nz.org.riskscape.pipeline.ast.PipelineDeclaration> function)
-
Method Details
-
chainStep
Chains a
StepChain
to an existingStepChain
, appending the chain to the last implicit step -
newChain
Add a new
StepChain
to the pipeline, disconnected from any otherStepChain
s. -
simple
static IncompletePipelineChange simple(BiFunction<Answer, IncrementalBuildState, nz.org.riskscape.pipeline.ast.PipelineDeclaration> function) - Returns:
- a
PipelineChange
based on a function that returns a newPipelineDeclaration
.
-
many
- Returns:
- a
PipelineChange
that is composed of many other changes that get applied on order
-
many
- Returns:
- a
PipelineChange
that is composed of many other changes that get applied on order
-
noChange
- Returns:
- a
PipelineChange
that does nothing
-
failed
- Returns:
- a
PipelineChange
that 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
PipelineChange
being 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
ParseException
s in aBadPipelineChangeException
-
getQuestionSet
- Returns:
- the QuestionSet that was responsible for this change
-
getQuestion
- Returns:
- the Question that was responsible for this change
-