Interface ConfirmationInputSpec
- All Superinterfaces:
BaseInputSpec<ConfirmationInputSpec>
- All Known Implementing Classes:
BaseConfirmationInput,DefaultConfirmationInputSpec
Interface for string input spec builder.
-
Method Summary
Modifier and TypeMethodDescriptionand()Build and return parent builder.defaultValue(Boolean defaultValue) Sets a default value.Sets a name.Define a function which may return id of a next component to go.Adds a post-run context handler.Adds a pre-run context handler.renderer(Function<ConfirmationInput.ConfirmationInputContext, List<org.jline.utils.AttributedString>> renderer) Sets a renderer function.resultMode(ResultMode resultMode) Sets a result mode.resultValue(Boolean resultValue) Sets a result value.storeResult(boolean store) Automatically stores result from aConfirmationInput.ConfirmationInputContextintoComponentContextwith key given to builder.Sets a default renderer template location.Methods inherited from interface org.springframework.shell.component.flow.BaseInputSpec
getThis, order
-
Method Details
-
name
Sets a name.- Parameters:
name- the name- Returns:
- a builder
-
resultValue
Sets a result value.- Parameters:
resultValue- the result value- Returns:
- a builder
-
resultMode
Sets a result mode.- Parameters:
resultMode- the result mode- Returns:
- a builder
-
defaultValue
Sets a default value.- Parameters:
defaultValue- the defult value- Returns:
- a builder
-
renderer
ConfirmationInputSpec renderer(Function<ConfirmationInput.ConfirmationInputContext, List<org.jline.utils.AttributedString>> renderer) Sets a renderer function.- Parameters:
renderer- the renderer- Returns:
- a builder
-
template
Sets a default renderer template location.- Parameters:
location- the template location- Returns:
- a builder
-
preHandler
Adds a pre-run context handler.- Parameters:
handler- the context handler- Returns:
- a builder
-
postHandler
Adds a post-run context handler.- Parameters:
handler- the context handler- Returns:
- a builder
-
storeResult
Automatically stores result from aConfirmationInput.ConfirmationInputContextintoComponentContextwith key given to builder. Defaults totrue.- Parameters:
store- the flag if storing result- Returns:
- a builder
-
next
Define a function which may return id of a next component to go. Returning anullor non existent id indicates that flow should stop.- Parameters:
next- next component function- Returns:
- a builder
-
and
ComponentFlow.Builder and()Build and return parent builder.- Returns:
- the parent builder
-