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 with empty backing data
    static AskRequest
    create(CliPrompter cliPrompter, nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question, nz.org.riskscape.wizard.survey2.BackingData backingData)
    Create a default implementation from the given args
    nz.org.riskscape.wizard.survey2.BackingData
    Any BackingData provided with the Question.
    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 with empty backing data

    • create

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

      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

    • getBackingData

      nz.org.riskscape.wizard.survey2.BackingData getBackingData()

      Any BackingData provided with the Question. This should be used in preference to querying the survey or the question.

    • 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