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
Constructors -
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.booleanSets 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.StringInputContextintoComponentContextwith key given to builder.Sets a default renderer template location.Methods inherited from class org.springframework.shell.component.flow.BaseInput
getBuilder, getId, getOrder, order, setOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.shell.component.flow.BaseInputSpec
order
-
Constructor Details
-
BasePathInput
-
-
Method Details
-
name
Description copied from interface:PathInputSpecSets a name.- Specified by:
namein interfacePathInputSpec- Parameters:
name- the name- Returns:
- a builder
-
resultValue
Description copied from interface:PathInputSpecSets a result value.- Specified by:
resultValuein interfacePathInputSpec- Parameters:
resultValue- the result value- Returns:
- a builder
-
resultMode
Description copied from interface:PathInputSpecSets a result mode.- Specified by:
resultModein interfacePathInputSpec- Parameters:
resultMode- the result mode- Returns:
- a builder
-
defaultValue
Description copied from interface:PathInputSpecSets a default value.- Specified by:
defaultValuein 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:PathInputSpecSets a renderer function.- Specified by:
rendererin interfacePathInputSpec- Parameters:
renderer- the renderer- Returns:
- a builder
-
template
Description copied from interface:PathInputSpecSets a default renderer template location.- Specified by:
templatein interfacePathInputSpec- Parameters:
location- the template location- Returns:
- a builder
-
preHandler
Description copied from interface:PathInputSpecAdds a pre-run context handler.- Specified by:
preHandlerin interfacePathInputSpec- Parameters:
handler- the context handler- Returns:
- a builder
-
postHandler
Description copied from interface:PathInputSpecAdds a post-run context handler.- Specified by:
postHandlerin interfacePathInputSpec- Parameters:
handler- the context handler- Returns:
- a builder
-
storeResult
Description copied from interface:PathInputSpecAutomatically stores result from aStringInput.StringInputContextintoComponentContextwith key given to builder. Defaults totrue.- Specified by:
storeResultin interfacePathInputSpec- Parameters:
store- the flag if storing result- Returns:
- a builder
-
next
Description copied from interface:PathInputSpecDefine a function which may return id of a next component to go. Returning anullor non existent id indicates that flow should stop.- Specified by:
nextin interfacePathInputSpec- Parameters:
next- next component function- Returns:
- a builder
-
and
Description copied from interface:PathInputSpecBuild and return parent builder.- Specified by:
andin interfacePathInputSpec- Returns:
- the parent builder
-
getThis
Description copied from interface:BaseInputSpecUsual this trick to get typed child.- Specified by:
getThisin interfaceBaseInputSpec<PathInputSpec>- Returns:
- a builder
-
getName
-
getResultValue
-
getResultMode
-
getDefaultValue
-
getRenderer
-
getTemplateLocation
-
getPreHandlers
-
getPostHandlers
-
isStoreResult
public boolean isStoreResult() -
getNext
-