ca.bc.gov.webade
Class Role

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

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

Contains all information about an application role. This information is read from the WebADE Directory.

See Also:
Serialized Form

Constructor Summary
Role(Role role)
          Creates a new Role object with the same settings as the given role.
Role(java.lang.String name, Action[] actions)
          Create a role with all associated security information.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Action[] getActions()
          get the names of the actions mapped to this role.
 java.lang.String getName()
          Return Role Name
 boolean hasAction(Action action)
          Returns true if the given action is found in this role.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Role

public Role(Role role)
Creates a new Role object with the same settings as the given role.

Parameters:
role -

Role

public Role(java.lang.String name,
            Action[] actions)
Create a role with all associated security information.

Parameters:
name - The application-unique name of the role.
actions - The set of actions assigned to this role.
Method Detail

getName

public java.lang.String getName()
Return Role Name

Returns:
The application-unique name of the role.

getActions

public Action[] getActions()
get the names of the actions mapped to this role. If no actions were set, just return null.

Returns:
The set of actions assigned to this role.

hasAction

public boolean hasAction(Action action)
Returns true if the given action is found in this role.

Parameters:
action - The target action to find.
Returns:
True if found in this role's actions.

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public java.lang.String toString()
See Also:
Object.toString()