Interface PathInputSpec
- All Superinterfaces:
BaseInputSpec<PathInputSpec>
- All Known Implementing Classes:
BasePathInput
,DefaultPathInputSpec
Interface for path input spec builder.
-
Method Summary
Modifier and TypeMethodDescriptionand()
Build and return parent builder.defaultValue
(String defaultValue) Sets a default value.Sets a name.Define a function which may return id of a next component to go.postHandler
(Consumer<PathInput.PathInputContext> handler) Adds a post-run context handler.preHandler
(Consumer<PathInput.PathInputContext> handler) Adds a pre-run context handler.renderer
(Function<PathInput.PathInputContext, List<org.jline.utils.AttributedString>> renderer) Sets a renderer function.resultMode
(ResultMode resultMode) Sets a result mode.resultValue
(String resultValue) Sets a result value.storeResult
(boolean store) Automatically stores result from aStringInput.StringInputContext
intoComponentContext
with 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
PathInputSpec renderer(Function<PathInput.PathInputContext, 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 aStringInput.StringInputContext
intoComponentContext
with 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 anull
or 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
-