Package nz.org.riskscape.wizard.ask
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
-
Method Summary
Modifier and TypeMethodDescriptiondefault nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response>
Bind the given response to something suitable for this ask input's questionstatic 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 datastatic 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 argsnz.org.riskscape.wizard.survey2.BackingData
AnyBackingData
provided with theQuestion
.nz.org.riskscape.wizard.bld.IncrementalBuildState
The current state of building the pipelineThe CLI that is used to interact with the userdefault 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 theQuestion
. 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
- Returns:
- the question's parameter type
-