public class SpringInputContext
extends java.lang.Object
SpringInputContext
adds support for requesting input from the user.
To check if the creator of the request that is executed is able to provide
additional information, use isSupported()
.
There is only one instance of this class (i.e. a singleton). Compared to all-static methods, this works better in a Spring-driven environment.
InputSpecification
,
InputRequiredException
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
destroy() |
java.io.Serializable |
get(java.lang.String key)
Get value of requested variable
|
static SpringInputContext |
getInstance() |
boolean |
isSupported()
Is the creator of the request able to provide additional input?
|
void |
set(java.util.Map<java.lang.String,java.io.Serializable> value) |
void |
setSupported(boolean value) |
public static SpringInputContext getInstance()
public void set(java.util.Map<java.lang.String,java.io.Serializable> value)
public java.io.Serializable get(java.lang.String key)
key
- Requested variablepublic void clear()
public void setSupported(boolean value)
public boolean isSupported()
InputRequiredException
s, otherwise false.@PreDestroy public void destroy()
Copyright © 2024. All rights reserved.