Class SpringInputContext

java.lang.Object
org.nuclos.api.context.SpringInputContext

public class SpringInputContext extends 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.

Author:
thomas.schiffmann
See Also:
  • Method Details

    • getInstance

      public static SpringInputContext getInstance()
    • set

      public void set(Map<String,Serializable> value)
    • get

      public Serializable get(String key)
      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()