Class UIThreadLocal

java.lang.Object
edu.internet2.middleware.grouper.ui.UIThreadLocal

public class UIThreadLocal extends Object
Convenience class which allows disparate parts of code keep track of goings on within a thread

Version:
$Id: UIThreadLocal.java,v 1.6 2008-04-04 13:53:13 isgwb Exp $
  • Constructor Details

    • UIThreadLocal

      public UIThreadLocal()
  • Method Details

    • clear

      public static void clear()
      Resets any values - use at beginning of Thread use e.g. Filter in servlet engine
    • put

      public static void put(String key, Object value)
      Stores a value. If there is an existing value for the key which is a List, then it appends the value to that List
      Parameters:
      key - to set
      value - for key
    • replace

      public static void replace(String key, Object value)
      Replaces any current value for the key with the new value - regardless of type. Use instead of put when appending to existing List should not hapen
      Parameters:
      key - to set
      value - for key
    • put

      public static void put(String key, String key1, Object value)
      If value indicated by key is itself a Map, put(key1,value) If no value create a new HashMap first
      Parameters:
      key - for nested Map
      key1 - to set
      value - for key1
    • get

      public static Object get(String key)
      Retrieve object previously saved
      Parameters:
      key - to retrieve
      Returns:
      Object previously set
    • get

      public static Object get(String key, String key1)
      Retrieve nested value from Map defined by key
      Parameters:
      key - for nested Map
      key1 - for value to retrieve
      Returns:
      value for key1
    • setDebug

      public static void setDebug(boolean debug)
      Set debug mode
      Parameters:
      debug -
    • isDebug

      public static boolean isDebug()
      Returns:
      true if debug mode is on