Interface ChangeLocation

All Known Implementing Classes:
AtLastChange, AtStepNamed, EndOfBranchWith

public interface ChangeLocation

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

    Fields
    Modifier and Type
    Field
    Description
    static final nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found
    Magic value for null
    static 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 inserted
    static 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 Type
    Method
    Description
    atStep(String stepDefinitionName)
     
    List<nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found>
     
    default Optional<nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found>
     
    default boolean
     
     
  • Field Details

    • EMPTY

      static final nz.org.riskscape.pipeline.ast.PipelineDeclaration.Found EMPTY

      Magic value for null

    • START

      static final ChangeLocation 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

      static final ChangeLocation 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()
      Overrides:
      toString in class Object
    • atStep

      static ChangeLocation atStep(String stepDefinitionName)
      Returns:
      a ChangeLocation centred on a step definition with the given name