Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.ac
Interface RoleData
- All Known Subinterfaces:
- RoleDataController
public interface RoleDataThe RoleData interface provides read access to the role data of a single resource. This includes the roles and role types that are either externalized or currently in use (have at least one principal mapped), and principals that are directly or indirectly mapped to these roles.
Note: For performance reasons, any requests of the form " is Principal X allowed to perform Y on resource Z?" should be be made using AccessControlRuntimeModel or AccessControlGlobalRuntimeModel instead of asking for explicit role assignments using this interface.
- Since:
- 6.1.0.3
Method Summary java.util.Set<Principal> getMappedPrincipals(RoleType roleType)
Return the (potentially empty) read-only set of all principals that have a direct role assignment (non-inherited) for the given RoleType.Role getRole(RoleType type)
Return the Role object associated with the given RoleType or null if there is no such role.java.util.Set<RoleAssignment> getRoleAssignments(Principal principal)
Return the (potentially empty) read-only set of all role assignments for the given principal, including assignments on parent resources and enclosing groupsjava.util.Set<Role> getRoles()
Return the (potentially empty) read-only set of all roles that are externalized or currently in use, i.e.java.util.SortedSet<RoleType> getRoleTypes()
Return a (potentially empty) read-only SortedSet containing the RoleTypes of those roles that are externalized or currently in use for the resource.
Method Detail getRole
Role getRole(RoleType type)
- Returns the Role object associated with the given RoleType or null if there is no such role.
- Parameters:
- type - - the RoleType
- Returns:
- Role object associated with the given RoleType
getRoleTypes
java.util.SortedSet<RoleType> getRoleTypes()
- Returns a (potentially empty) read-only SortedSet containing the RoleTypes of those roles that are externalized or currently in use for the resource. Note: To retrieve all applicable role types for the resource, use AccessControlEnvironment.getApplicableRoleTypes(Identifiable) .
- Returns:
- Read-only Set containing the RoleTypes for the resource, never null
getRoles
java.util.Set<Role> getRoles()
- Returns the (potentially empty) read-only set of all roles that are externalized or currently in use, i.e. all roles that have a direct (non-inherited) role assignment on this resource.
- Returns:
- the set of all roles that are currently in use for this resource, never null
getMappedPrincipals
java.util.Set<Principal> getMappedPrincipals(RoleType roleType)
- Returns the (potentially empty) read-only set of all principals that have a direct role assignment (non-inherited) for the given RoleType.
- Parameters:
- roleType - the RoleType whose mapped principals are to be returned
- Returns:
- the set of principals that are directly mapped to the given RoleType on this resource, never null
getRoleAssignments
java.util.Set<RoleAssignment> getRoleAssignments(Principal principal) throws AccessControlException
- Returns the (potentially empty) read-only set of all role assignments for the given principal, including assignments on parent resources and enclosing groups
- Parameters:
- principal - the principal whose role assignments are to be retrieved.
- Returns:
- the set of role assignments for the given principal, never null
- Throws:
- AccessControlException - will be thrown if any access control related error occurs
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD