Package step.core.plans.builder
Class PlanBuilder
java.lang.Object
step.core.plans.builder.PlanBuilder
This class provides an API for the creation of
Plan
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(AbstractArtefact artefact) Adds a node to the current parentbuild()
static PlanBuilder
create()
endBlock()
Removes the current parent from the stack and switch back to the previous parentstartBlock
(AbstractArtefact artefact) Adds a node to the current parent and defines it as the new current parent
-
Field Details
-
root
-
stack
-
-
Constructor Details
-
PlanBuilder
public PlanBuilder()
-
-
Method Details
-
create
-
build
- Returns:
- the
Plan
created by this builder
-
add
Adds a node to the current parent- Parameters:
artefact
- theAbstractArtefact
to be added- Returns:
- this instance of the
PlanBuilder
-
startBlock
Adds a node to the current parent and defines it as the new current parent- Parameters:
artefact
- theAbstractArtefact
to be added and set as current parent- Returns:
- this instance of the
PlanBuilder
-
endBlock
Removes the current parent from the stack and switch back to the previous parent- Returns:
- this instance of the
PlanBuilder
-