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 TypeMethodDescriptionvoidclear()voiddestroy()Get value of requested variablestatic SpringInputContextbooleanIs the creator of the request able to provide additional input?voidset(Map<String, Serializable> value) voidsetSupported(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
InputRequiredExceptions, otherwise false.
-
destroy
@PreDestroy public void destroy()
-