Interface AbstractTextComponent.TextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T,C>>
- All Superinterfaces:
ComponentContext<C>
- All Known Subinterfaces:
ConfirmationInput.ConfirmationInputContext
,PathInput.PathInputContext
,PathSearch.PathSearchContext
,StringInput.StringInputContext
- All Known Implementing Classes:
AbstractTextComponent.BaseTextComponentContext
- Enclosing class:
- AbstractTextComponent<T,
C extends AbstractTextComponent.TextComponentContext<T, C>>
public static interface AbstractTextComponent.TextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T,C>>
extends ComponentContext<C>
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Message levels which can be used to alter how message is shown. -
Method Summary
Modifier and TypeMethodDescriptiongetInput()
Gets an input.Sets a message.getName()
Gets a name.Sets a result value.void
Sets an input.void
setMessage
(String message) Sets a message.void
setMessage
(String message, AbstractTextComponent.TextComponentContext.MessageLevel level) Sets a message with level.void
void
Sets a name.void
setResultValue
(T resultValue) Sets a result value.Methods inherited from interface org.springframework.shell.component.context.ComponentContext
containsKey, get, get, getTerminalWidth, put, setTerminalWidth, stream, toTemplateModel
-
Method Details
-
getName
String getName()Gets a name.- Returns:
- a name
-
setName
Sets a name.- Parameters:
name
- the name
-
getInput
String getInput()Gets an input.- Returns:
- an input
-
setInput
Sets an input.- Parameters:
input
- the input
-
getResultValue
T getResultValue()Sets a result value.- Returns:
- a result value
-
setResultValue
Sets a result value.- Parameters:
resultValue
- the result value
-
getMessage
String getMessage()Sets a message.- Returns:
- a message
-
setMessage
Sets a message.- Parameters:
message
- the message
-
setMessage
Sets a message with level.- Parameters:
message
- the messagelevel
- the message level
-
getMessageLevel
AbstractTextComponent.TextComponentContext.MessageLevel getMessageLevel()- Returns:
- a message level
-
setMessageLevel
- Parameters:
level
- the message level
-