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
Nested Classes -
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 AskRequestcreate(CliPrompter cliPrompter, nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question) Create a default implementation from the given argsdefault AskerfindAsker(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question) default nz.org.riskscape.engine.bind.BindingContextnz.org.riskscape.wizard.bld.IncrementalBuildStateThe current state of building the pipelineThe CLI that is used to interact with the userdefault Class<?>default nz.org.riskscape.engine.Projectnz.org.riskscape.wizard.QuestionThe 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
- 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)
-