Class BasePathInput
java.lang.Object
org.springframework.shell.component.flow.BaseInput<PathInputSpec>
org.springframework.shell.component.flow.BasePathInput
- All Implemented Interfaces:
org.springframework.core.Ordered
,BaseInputSpec<PathInputSpec>
,PathInputSpec
- Direct Known Subclasses:
DefaultPathInputSpec
Base impl for
PathInputSpec
.-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionand()
Build and return parent builder.defaultValue
(String defaultValue) Sets a default value.getName()
getNext()
Function<PathInput.PathInputContext,
List<org.jline.utils.AttributedString>> getThis()
Usual this trick to get typed child.boolean
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 class org.springframework.shell.component.flow.BaseInput
getBuilder, getId, getOrder, order, setOrder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.shell.component.flow.BaseInputSpec
order
-
Constructor Details
-
BasePathInput
-
-
Method Details
-
name
Description copied from interface:PathInputSpec
Sets a name.- Specified by:
name
in interfacePathInputSpec
- Parameters:
name
- the name- Returns:
- a builder
-
resultValue
Description copied from interface:PathInputSpec
Sets a result value.- Specified by:
resultValue
in interfacePathInputSpec
- Parameters:
resultValue
- the result value- Returns:
- a builder
-
resultMode
Description copied from interface:PathInputSpec
Sets a result mode.- Specified by:
resultMode
in interfacePathInputSpec
- Parameters:
resultMode
- the result mode- Returns:
- a builder
-
defaultValue
Description copied from interface:PathInputSpec
Sets a default value.- Specified by:
defaultValue
in interfacePathInputSpec
- Parameters:
defaultValue
- the defult value- Returns:
- a builder
-
renderer
public PathInputSpec renderer(Function<PathInput.PathInputContext, List<org.jline.utils.AttributedString>> renderer) Description copied from interface:PathInputSpec
Sets a renderer function.- Specified by:
renderer
in interfacePathInputSpec
- Parameters:
renderer
- the renderer- Returns:
- a builder
-
template
Description copied from interface:PathInputSpec
Sets a default renderer template location.- Specified by:
template
in interfacePathInputSpec
- Parameters:
location
- the template location- Returns:
- a builder
-
preHandler
Description copied from interface:PathInputSpec
Adds a pre-run context handler.- Specified by:
preHandler
in interfacePathInputSpec
- Parameters:
handler
- the context handler- Returns:
- a builder
-
postHandler
Description copied from interface:PathInputSpec
Adds a post-run context handler.- Specified by:
postHandler
in interfacePathInputSpec
- Parameters:
handler
- the context handler- Returns:
- a builder
-
storeResult
Description copied from interface:PathInputSpec
Automatically stores result from aStringInput.StringInputContext
intoComponentContext
with key given to builder. Defaults totrue
.- Specified by:
storeResult
in interfacePathInputSpec
- Parameters:
store
- the flag if storing result- Returns:
- a builder
-
next
Description copied from interface:PathInputSpec
Define a function which may return id of a next component to go. Returning anull
or non existent id indicates that flow should stop.- Specified by:
next
in interfacePathInputSpec
- Parameters:
next
- next component function- Returns:
- a builder
-
and
Description copied from interface:PathInputSpec
Build and return parent builder.- Specified by:
and
in interfacePathInputSpec
- Returns:
- the parent builder
-
getThis
Description copied from interface:BaseInputSpec
Usual this trick to get typed child.- Specified by:
getThis
in interfaceBaseInputSpec<PathInputSpec>
- Returns:
- a builder
-
getName
-
getResultValue
-
getResultMode
-
getDefaultValue
-
getRenderer
-
getTemplateLocation
-
getPreHandlers
-
getPostHandlers
-
isStoreResult
public boolean isStoreResult() -
getNext
-