Interface AskRequest

All Known Implementing Classes:
AskRequest.Impl

public interface AskRequest

Brings together all the arguments to ask in to a single request-like object to make it easier to extend/tweak in the future.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Default implementation
  • Method Summary

    Modifier and Type
    Method
    Description
    default nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response>
    bind(Object raw)
    Bind the given response to something suitable for this ask input's question
    static AskRequest
    create(CliPrompter cliPrompter, nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)
    Create a default implementation from the given args
    default Asker
    findAsker(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)
     
    default nz.org.riskscape.engine.bind.BindingContext
     
    nz.org.riskscape.wizard.bld.IncrementalBuildState
    The current state of building the pipeline
    The CLI that is used to interact with the user
    default Class<?>
     
    default nz.org.riskscape.engine.Project
     
    nz.org.riskscape.wizard.Question
    The question being asked
  • Method Details

    • create

      static AskRequest create(CliPrompter cliPrompter, nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)

      Create a default implementation from the given args

    • getCliPrompter

      CliPrompter getCliPrompter()

      The CLI that is used to interact with the user

    • getBuildState

      nz.org.riskscape.wizard.bld.IncrementalBuildState getBuildState()

      The current state of building the pipeline

    • getQuestion

      nz.org.riskscape.wizard.Question getQuestion()

      The question being asked

    • bind

      default nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response> bind(Object raw)

      Bind the given response to something suitable for this ask input's question

    • getProject

      default nz.org.riskscape.engine.Project getProject()
      Returns:
      the project associated with this request
    • getParameterType

      default Class<?> getParameterType()
      Returns:
      the question's parameter type
    • getBindingContext

      default nz.org.riskscape.engine.bind.BindingContext getBindingContext()
      Returns:
      a binding context that can be used for converting user input in to engine-y objects
    • findAsker

      default Asker findAsker(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)
      Returns:
      an Asker for the given question (and build state)