|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RoleData
The 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.
Method Summary | |
---|---|
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. |
Role |
getRole(RoleType type)
Returns the Role object associated with the given
RoleType or null if there is no such role. |
java.util.Set<RoleAssignment> |
getRoleAssignments(Principal principal)
Returns the (potentially empty) read-only set of all role assignments for the given principal, including assignments on parent resources and enclosing groups |
java.util.Set<Role> |
getRoles()
Returns the (potentially empty) read-only set of all roles that are externalized or currently in use, i.e. |
java.util.SortedSet<RoleType> |
getRoleTypes()
Returns a (potentially empty) read-only SortedSet containing the
RoleType s of those roles that are externalized or currently in
use for the resource. |
Method Detail |
---|
Role getRole(RoleType type)
Role
object associated with the given
RoleType
or null if there is no such role.
type
- - the RoleType
RoleType
java.util.SortedSet<RoleType> getRoleTypes()
SortedSet
containing the
RoleType
s 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)
.
Set
containing the RoleType
s for the
resource, never nulljava.util.Set<Role> getRoles()
java.util.Set<Principal> getMappedPrincipals(RoleType roleType)
roleType
- the RoleType whose mapped principals are to be returned
java.util.Set<RoleAssignment> getRoleAssignments(Principal principal) throws AccessControlException
principal
- the principal whose role assignments are to be
retrieved.
AccessControlException
- will be thrown if any access control
related error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |