com.bea.ales.management
Class RoleManager

java.lang.Object
  |
  +--com.bea.ales.management.RoleManager

public class RoleManager
extends java.lang.Object

This class manages roles. It provides methods to create, delete, rename and find roles.


Field Summary
static java.lang.String ROOT_ROLE
           
 
Method Summary
 Role getRole(java.lang.String name)
          Get a Role WITHOUT checking the view access.
 Role getRoleCheckViewAccess(java.lang.String name)
          Get the role by name.
 java.util.List getRolesWithDeniedRole()
          Get all roles which have excluded roles against them.
 Role getRootRole()
          Get the root role for current application.
 void removeRole(Role role)
          Remove the role.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_ROLE

public static java.lang.String ROOT_ROLE
Method Detail

getRoleCheckViewAccess

public Role getRoleCheckViewAccess(java.lang.String name)
                            throws ManagementException
Get the role by name.

Parameters:
name - the name of the role
Returns:
the role object which has the given name.
Throws:
ManagementException - if the operation fails.

getRole

public Role getRole(java.lang.String name)
             throws ManagementException
Get a Role WITHOUT checking the view access.

Parameters:
name - The name of the Role.
Returns:
Null or the role with the given name.
Throws:
ManagementException - Thrown while trying to find the role or while instantiating a new object.

getRootRole

public Role getRootRole()
                 throws ManagementException
Get the root role for current application. The root role's name is "allroles".

Returns:
the root role instance.
Throws:
ManagementException - if the operation fails.

removeRole

public void removeRole(Role role)
                throws ManagementException
Remove the role.

Parameters:
role - the role to be removed.
Throws:
ManagementException - if the operation fails.

getRolesWithDeniedRole

public java.util.List getRolesWithDeniedRole()
                                      throws ManagementException
Get all roles which have excluded roles against them.

Returns:
the list of roles found.
Throws:
ManagementException - if the operation fails.


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.