org.kuali.rice.kns.util
Class GlobalVariables

java.lang.Object
  extended by org.kuali.rice.kns.util.GlobalVariables

public class GlobalVariables
extends Object

This class will hold all of our thread local variables and accessors for those


Constructor Summary
GlobalVariables()
           
 
Method Summary
static void clear()
          Clears out GlobalVariable objects with the exception of the UserSession
static HashMap getAuditErrorMap()
           
static ErrorMap getErrorMap()
          Deprecated. use getMessageMap() instead.
static KualiForm getKualiForm()
           
static MessageList getMessageList()
           
static MessageMap getMessageMap()
           
static Object getRequestCache(String cacheName)
           
static UserSession getUserSession()
           
static void mergeErrorMap(MessageMap messageMap)
          Merges a message map into the global variables error map
static void setAuditErrorMap(HashMap errorMap)
          Sets a new (clean) AuditErrorList
static void setErrorMap(ErrorMap errorMap)
          Deprecated. use setMessageMap(MessageMap) instead
static void setHideSessionFromTestsMessage(String message)
          Sets an error message for tests that try to use the session without declaring it.
static void setKualiForm(KualiForm kualiForm)
          sets the kualiForm object into the global variable for this thread
static void setMessageList(MessageList messageList)
          Sets a new message list
static void setMessageMap(MessageMap messageMap)
          Sets a new (clean) MessageMap
static void setRequestCache(String cacheName, Object cacheObject)
           
static void setUserSession(UserSession userSession)
          sets the userSession object into the global variable for this thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalVariables

public GlobalVariables()
Method Detail

getUserSession

public static UserSession getUserSession()
Returns:
the UserSession that has been assigned to this thread of execution it is important that this not be called by anything that lives outside

setHideSessionFromTestsMessage

public static void setHideSessionFromTestsMessage(String message)
Sets an error message for tests that try to use the session without declaring it. This method should be use by only KualiTestBase, not by other test code and especially not by production code.

Parameters:
message - the detail to throw, or null to allow access to the session

setUserSession

public static void setUserSession(UserSession userSession)
sets the userSession object into the global variable for this thread

Parameters:
userSession -

getErrorMap

@Deprecated
public static ErrorMap getErrorMap()
Deprecated. use getMessageMap() instead.

Returns:
ErrorMap containing error messages.

getMessageMap

public static MessageMap getMessageMap()

mergeErrorMap

public static void mergeErrorMap(MessageMap messageMap)
Merges a message map into the global variables error map

Parameters:
messageMap -

setMessageMap

public static void setMessageMap(MessageMap messageMap)
Sets a new (clean) MessageMap

Parameters:
messageMap -

setErrorMap

@Deprecated
public static void setErrorMap(ErrorMap errorMap)
Deprecated. use setMessageMap(MessageMap) instead

Sets a new (clean) ErrorMap

Parameters:
errorMap -

getMessageList

public static MessageList getMessageList()
Returns:
ArrayList containing messages.

setMessageList

public static void setMessageList(MessageList messageList)
Sets a new message list

Parameters:
messageList -

getAuditErrorMap

public static HashMap getAuditErrorMap()
Returns:
ArrayList containing audit error messages.

setAuditErrorMap

public static void setAuditErrorMap(HashMap errorMap)
Sets a new (clean) AuditErrorList

Parameters:
errorMap -

getKualiForm

public static KualiForm getKualiForm()
Returns:
KualiForm that has been assigned to this thread of execution.

setKualiForm

public static void setKualiForm(KualiForm kualiForm)
sets the kualiForm object into the global variable for this thread

Parameters:
kualiForm -

getRequestCache

public static Object getRequestCache(String cacheName)

setRequestCache

public static void setRequestCache(String cacheName,
                                   Object cacheObject)

clear

public static void clear()
Clears out GlobalVariable objects with the exception of the UserSession



Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.