Class AbstractTextComponent.BaseTextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T,C>>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<Object,Object>
org.springframework.shell.component.context.BaseComponentContext<C>
org.springframework.shell.component.support.AbstractTextComponent.BaseTextComponentContext<T,C>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
,Object> ComponentContext<C>
,AbstractTextComponent.TextComponentContext<T,
C>
- Enclosing class:
- AbstractTextComponent<T,
C extends AbstractTextComponent.TextComponentContext<T, C>>
public static class AbstractTextComponent.BaseTextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T,C>>
extends BaseComponentContext<C>
implements AbstractTextComponent.TextComponentContext<T,C>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> Nested classes/interfaces inherited from interface org.springframework.shell.component.support.AbstractTextComponent.TextComponentContext
AbstractTextComponent.TextComponentContext.MessageLevel
-
Constructor Summary
-
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.Gets context values as a map.Methods inherited from class org.springframework.shell.component.context.BaseComponentContext
get, get, getTerminalWidth, put, setTerminalWidth, stream, toString
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.shell.component.context.ComponentContext
containsKey, get, get, getTerminalWidth, put, setTerminalWidth, stream
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
BaseTextComponentContext
public BaseTextComponentContext()
-
-
Method Details
-
getName
Description copied from interface:AbstractTextComponent.TextComponentContext
Gets a name.- Specified by:
getName
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Returns:
- a name
-
setName
Description copied from interface:AbstractTextComponent.TextComponentContext
Sets a name.- Specified by:
setName
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Parameters:
name
- the name
-
getInput
Description copied from interface:AbstractTextComponent.TextComponentContext
Gets an input.- Specified by:
getInput
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Returns:
- an input
-
setInput
Description copied from interface:AbstractTextComponent.TextComponentContext
Sets an input.- Specified by:
setInput
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Parameters:
input
- the input
-
getResultValue
Description copied from interface:AbstractTextComponent.TextComponentContext
Sets a result value.- Specified by:
getResultValue
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Returns:
- a result value
-
setResultValue
Description copied from interface:AbstractTextComponent.TextComponentContext
Sets a result value.- Specified by:
setResultValue
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Parameters:
resultValue
- the result value
-
getMessage
Description copied from interface:AbstractTextComponent.TextComponentContext
Sets a message.- Specified by:
getMessage
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Returns:
- a message
-
setMessage
Description copied from interface:AbstractTextComponent.TextComponentContext
Sets a message.- Specified by:
setMessage
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Parameters:
message
- the message
-
setMessage
public void setMessage(String message, AbstractTextComponent.TextComponentContext.MessageLevel level) Description copied from interface:AbstractTextComponent.TextComponentContext
Sets a message with level.- Specified by:
setMessage
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Parameters:
message
- the messagelevel
- the message level
-
getMessageLevel
Description copied from interface:AbstractTextComponent.TextComponentContext
- Specified by:
getMessageLevel
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Returns:
- a message level
-
setMessageLevel
Description copied from interface:AbstractTextComponent.TextComponentContext
- Specified by:
setMessageLevel
in interfaceAbstractTextComponent.TextComponentContext<T,
C extends AbstractTextComponent.TextComponentContext<T, C>> - Parameters:
messageLevel
- the message level
-
toTemplateModel
Description copied from interface:ComponentContext
Gets context values as a map. Every context implementation can do their own model as essentially what matter is a one coming out from a last child which is one most likely to feed into a template engine.- Specified by:
toTemplateModel
in interfaceComponentContext<T>
- Overrides:
toTemplateModel
in classBaseComponentContext<C extends AbstractTextComponent.TextComponentContext<T,
C>> - Returns:
- map of context values
-