Package org.nuclos.api.context
Class SpringInputContext
java.lang.Object
org.nuclos.api.context.SpringInputContext
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.
- Author:
- thomas.schiffmann
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
destroy()
Get value of requested variablestatic SpringInputContext
boolean
Is the creator of the request able to provide additional input?void
set
(Map<String, Serializable> value) void
setSupported
(boolean value)
-
Method Details
-
getInstance
-
set
-
get
Get value of requested variable- Parameters:
key
- Requested variable- Returns:
- Value of requested variable, null if not answered.
-
clear
public void clear() -
setSupported
public void setSupported(boolean value) -
isSupported
public boolean isSupported()Is the creator of the request able to provide additional input?- Returns:
- True, if request creator can handle
InputRequiredException
s, otherwise false.
-
destroy
@PreDestroy public void destroy()
-