Class InputContext

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

public class InputContext extends Object
InputContext 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 InputContext getInstance()
    • get

      public static Serializable get(String key)
      Get value of requested variable
      Parameters:
      key - Requested variable
      Returns:
      Value of requested variable, null if not answered.
    • isSupported

      public static boolean isSupported()
      Is the creator of the request able to provide additional input?
      Returns:
      True, if request creator can handle InputRequiredExceptions, otherwise false.