Class ContextHolder

java.lang.Object
com.emc.documentum.rest.config.ContextHolder

public class ContextHolder extends Object
A context holder can contains the information for an authenticated security context. Authentication procedure can leverage it to hold context information.
  • Method Details

    • put

      public static void put(String key, Object value)
      Stores the context info For example, save the login name ("loginname", "Joe")
      Parameters:
      key - key of the context info
      value - value of the context info
    • get

      public static Object get(String key)
      Gets context info for the key
      Parameters:
      key - key of the context info
      Returns:
      context info for the key
    • get

      public static <T> T get(String key, T defaultValue)
      Gets context info for the key. If the value does not exist, the default value will be returned
      Type Parameters:
      T - type of the default value and return value
      Parameters:
      key - key of the context info
      defaultValue - the default value
      Returns:
      context info for the key
    • clear

      public static void clear()
      Clear all the saved context info