Class UIThreadLocal
java.lang.Object
edu.internet2.middleware.grouper.ui.UIThreadLocal
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Resets any values - use at beginning of Thread use e.g.static ObjectRetrieve object previously savedstatic ObjectRetrieve nested value from Map defined by keystatic booleanisDebug()static voidStores a value.static voidIf value indicated by key is itself a Map, put(key1,value) If no value create a new HashMap firststatic voidReplaces any current value for the key with the new value - regardless of type.static voidsetDebug(boolean debug) Set debug mode
-
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
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 setvalue- for key
-
replace
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 setvalue- for key
-
put
If value indicated by key is itself a Map, put(key1,value) If no value create a new HashMap first- Parameters:
key- for nested Mapkey1- to setvalue- for key1
-
get
Retrieve object previously saved- Parameters:
key- to retrieve- Returns:
- Object previously set
-
get
Retrieve nested value from Map defined by key- Parameters:
key- for nested Mapkey1- 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
-