ca.bc.gov.webade.security
Class WebADESecurityManager

java.lang.Object
  extended byca.bc.gov.webade.security.WebADESecurityManager

public final class WebADESecurityManager
extends java.lang.Object

Author:
jross

Constructor Summary
WebADESecurityManager()
           
 
Method Summary
 UserCredentials getCurrentUserCredentials()
          Returns the current user for this thread.
 WebADEUserInfo getCurrentUserInfo()
          Returns the current user for this thread.
 WebADECurrentUserPermissions getCurrentUserPermissions()
          Returns the current user for this thread.
static WebADESecurityManager getWebADESecurityManager()
          Returns the WebADESecurityManager singleton, or throws a Security exception if the requesting class is not permitted to access the security manager.
 void setCurrentUserCredentials(UserCredentials userCredentials)
          Sets the current user for this thread.
 void setCurrentUserInfo(WebADEUserInfo userInfo)
          Sets the current user for this thread.
 void setCurrentUserPermissions(WebADECurrentUserPermissions userPermissions)
          Sets the current user for this thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebADESecurityManager

public WebADESecurityManager()
Method Detail

getWebADESecurityManager

public static final WebADESecurityManager getWebADESecurityManager()
                                                            throws WebADESecurityException
Returns the WebADESecurityManager singleton, or throws a Security exception if the requesting class is not permitted to access the security manager.

Returns:
The WebADESecurityManager singleton.
Throws:
WebADESecurityException - Thrown if the requesting class is not permitted to access this method.

getCurrentUserCredentials

public UserCredentials getCurrentUserCredentials()
                                          throws java.lang.SecurityException
Returns the current user for this thread. This is an internal method, and should not be called by non-WebADE code.

Returns:
The current user credentials object.
Throws:
java.lang.SecurityException - Thrown if called by a class that is not permitted to call this method.

setCurrentUserCredentials

public void setCurrentUserCredentials(UserCredentials userCredentials)
                               throws java.lang.SecurityException
Sets the current user for this thread. This is an internal method, and should not be called by non-WebADE code.

Parameters:
userCredentials - The thread's associated user's credentials object.
Throws:
java.lang.SecurityException - Thrown if called by a class that is not permitted to call this method.

getCurrentUserPermissions

public WebADECurrentUserPermissions getCurrentUserPermissions()
                                                       throws java.lang.SecurityException
Returns the current user for this thread. This is an internal method, and should not be called by non-WebADE code.

Returns:
The current user credentials object.
Throws:
java.lang.SecurityException - Thrown if called by a class that is not permitted to call this method.

setCurrentUserPermissions

public void setCurrentUserPermissions(WebADECurrentUserPermissions userPermissions)
                               throws java.lang.SecurityException
Sets the current user for this thread. This is an internal method, and should not be called by non-WebADE code.

Parameters:
userPermissions - The thread's associated user's permissions object.
Throws:
java.lang.SecurityException - Thrown if called by a class that is not permitted to call this method.

getCurrentUserInfo

public WebADEUserInfo getCurrentUserInfo()
                                  throws java.lang.SecurityException
Returns the current user for this thread. This is an internal method, and should not be called by non-WebADE code.

Returns:
The current user credentials object.
Throws:
java.lang.SecurityException - Thrown if called by a class that is not permitted to call this method.

setCurrentUserInfo

public void setCurrentUserInfo(WebADEUserInfo userInfo)
                        throws java.lang.SecurityException
Sets the current user for this thread. This is an internal method, and should not be called by non-WebADE code.

Parameters:
userInfo - The thread's associated user's user info object.
Throws:
java.lang.SecurityException - Thrown if called by a class that is not permitted to call this method.