ca.bc.gov.webade
Class AppRoles

java.lang.Object
  extended byca.bc.gov.webade.AppRoles
All Implemented Interfaces:
java.io.Serializable

public final class AppRoles
extends java.lang.Object
implements java.io.Serializable

ApplicationRoles contains the Roleobjects for the roles in an Application. The roles are loaded from the WebADE Directory. Currently the WebADE Directory is implemented in the NT Registry.

See Also:
Serialized Form

Method Summary
 Role getRole(java.lang.String roleName)
          get the Roleobject for the given role name.
 java.lang.String[] getRoleNames()
          get the list of valid role names for the parent Application.
 Role[] getRolesByAction(Action action)
          Get the Roles associated with an action, if any.
 Role[] getRolesByAction(java.lang.String actionName)
          Deprecated. Use getRolesByAction(ca.bc.gov.webade.Action) instead.
 boolean isRoleName(java.lang.String roleName)
          Test if the name is a valid role name in the parent Application.
 boolean roleHasAction(java.lang.String roleName, java.lang.String actionName)
          test if the name is a valid role name in the parent Application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRoleNames

public java.lang.String[] getRoleNames()
get the list of valid role names for the parent Application.

Returns:
A set of the role names.

isRoleName

public boolean isRoleName(java.lang.String roleName)
Test if the name is a valid role name in the parent Application.

Parameters:
roleName - The role name to locate in the application's set of roles.
Returns:
True it the role name was found, ignoring case.

roleHasAction

public boolean roleHasAction(java.lang.String roleName,
                             java.lang.String actionName)
test if the name is a valid role name in the parent Application.

Parameters:
roleName - The name of the target role to check.
actionName - The action name to locate in that role.
Returns:
True if the action name is found.

getRole

public Role getRole(java.lang.String roleName)
get the Roleobject for the given role name.

Parameters:
roleName - the name of an role for this application
Returns:
the role, or null if the name is not a valid rolename.

getRolesByAction

public Role[] getRolesByAction(Action action)
Get the Roles associated with an action, if any. This association is maintained in the WebADE Directory.

Parameters:
action - The target action
Returns:
The Role array of roles with the given action.

getRolesByAction

public Role[] getRolesByAction(java.lang.String actionName)
Deprecated. Use getRolesByAction(ca.bc.gov.webade.Action) instead.

Get the Roles associated with an action name, if any. This association is maintained in the WebADE Directory.

Parameters:
actionName - the name of an action
Returns:
the Role, or null if the group name does not map to any role.