Skip navigation links

Oracle Fusion Middleware User and Role Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14658-01


oracle.security.idm
Interface RoleManager


public interface RoleManager

This interface represents a role manager that manages execution of various operations, involving roles, in the identity repository.

Since:
10.1.3

Method Summary
 Role createRole(java.lang.String name)
          Create role in the application scope
 Role createRole(java.lang.String name, int scope)
          Create role within specified scope
 void dropRole(Role role)
           
 void dropRole(RoleProfile role)
          Drop the role from the identity repository.
 SearchResponse getGrantedRoles(java.security.Principal principal, boolean direct)
          Get all the roles granted to this principal.
 SearchResponse getManagedRoles(java.security.Principal principal, boolean direct)
          Get all the roles managed by this principal.
 SearchResponse getOwnedRoles(java.security.Principal principal, boolean direct)
          Get all the roles owned by this principal.
 void grantRole(Role parent, java.security.Principal principal)
          Grant the specified role to the principal
 boolean isCreateRoleSupported()
           
 boolean isDropRoleSupported()
           
 boolean isGranted(Role parent, java.security.Principal principal)
          Determines whether specified role has been granted to this principal.
 boolean isManagedBy(Role parent, java.security.Principal principal)
          Determines whether specified role is managed by this principal.
 boolean isModifyRoleSupported()
           
 boolean isOwnedBy(Role parent, java.security.Principal principal)
          Determines whether specified role is owned by this principal.
 void revokeRole(Role parent, java.security.Principal principal)
          Revoke the specified role from the principal

 

Method Detail

isDropRoleSupported

boolean isDropRoleSupported()

isCreateRoleSupported

boolean isCreateRoleSupported()

isModifyRoleSupported

boolean isModifyRoleSupported()

createRole

Role createRole(java.lang.String name,
                int scope)
                throws IMException
Create role within specified scope
Returns:
Role instance representing the newly created role.
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support role creation.
ObjectExistsException - Thrown if the role already exists
NoPermissionException - Thrown if the caller doesn't have permission to create a role.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

createRole

Role createRole(java.lang.String name)
                throws IMException
Create role in the application scope
Returns:
Role instance representing the newly created role.
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support role creation.
ObjectExistsException - Thrown if the role already exists
NoPermissionException - Thrown if the caller doesn't have permission to create a role.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

dropRole

void dropRole(RoleProfile role)
              throws IMException
Drop the role from the identity repository.
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support role drop.
ObjectNotFoundException - Thrown if the role does not exist.
NoPermissionException - Thrown if the caller doesn't have permission to drop a role.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

dropRole

void dropRole(Role role)
              throws IMException
Throws:
IMException

grantRole

void grantRole(Role parent,
               java.security.Principal principal)
               throws IMException
Grant the specified role to the principal
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support role grant.
NoPermissionException - Thrown if the caller doesn't have permission to grant a role.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

revokeRole

void revokeRole(Role parent,
                java.security.Principal principal)
                throws IMException
Revoke the specified role from the principal
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support role revoke.
NoPermissionException - Thrown if the caller doesn't have permission to revoke a role.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getGrantedRoles

SearchResponse getGrantedRoles(java.security.Principal principal,
                               boolean direct)
                               throws IMException
Get all the roles granted to this principal.
Parameters:
principal - prinicipal whose granted roles need to be fetched.
direct - If true all the roles granted directly to this principal will be returned. If false both the direct and the indirect roles granted to this principal will be returned.
Returns:
SearchResponse instance containing the roles granted.
Throws:
ObjectNotFoundException - Thrown if the search doesn't return any results.
NoPermissionException - Thrown if the caller doesn't have permission to execute this operation.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getOwnedRoles

SearchResponse getOwnedRoles(java.security.Principal principal,
                             boolean direct)
                             throws IMException
Get all the roles owned by this principal.
Parameters:
principal - prinicipal whose owned roles need to be fetched.
direct - If true all the roles owned directly by this principal will be returned. If false both the direct and the indirect roles owned by this principal will be returned.
Returns:
SearchResponse instance containing the roles owned.
Throws:
ObjectNotFoundException - Thrown if the search doesn't return any results.
NoPermissionException - Thrown if the caller doesn't have permission to execute this operation.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getManagedRoles

SearchResponse getManagedRoles(java.security.Principal principal,
                               boolean direct)
                               throws IMException
Get all the roles managed by this principal.
Parameters:
principal - prinicipal whose managed roles need to be fetched.
direct - If true all the roles managed directly by this principal will be returned. If false both the direct and the indirect roles managed by this principal will be returned.
Returns:
SearchResponse instance containing the roles managed.
Throws:
ObjectNotFoundException - Thrown if the search doesn't return any results.
NoPermissionException - Thrown if the caller doesn't have permission to execute this operation.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

isGranted

boolean isGranted(Role parent,
                  java.security.Principal principal)
                  throws IMException
Determines whether specified role has been granted to this principal.
Returns:
true if specified role is granted to principal else false.
Throws:
NoPermissionException - Thrown if the caller doesn't have permission to execute this operation.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

isManagedBy

boolean isManagedBy(Role parent,
                    java.security.Principal principal)
                    throws IMException
Determines whether specified role is managed by this principal.
Returns:
true if specified role is managed by principal else false.
Throws:
NoPermissionException - Thrown if the caller doesn't have permission to execute this operation.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

isOwnedBy

boolean isOwnedBy(Role parent,
                  java.security.Principal principal)
                  throws IMException
Determines whether specified role is owned by this principal.
Returns:
true if specified role is owned by principal else false.
Throws:
NoPermissionException - Thrown if the caller doesn't have permission to execute this operation.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

Skip navigation links

Oracle Fusion Middleware User and Role Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14658-01


Copyright © 2005, 2009, Oracle. All rights reserved.