blackboard.platform.security
Interface Entitlements

All Superinterfaces:
java.lang.Iterable<Entitlement>

public interface Entitlements
extends java.lang.Iterable<Entitlement>

Interface that specifies the underlying comparison logic for entitlements. It specifies "test" logic (has any, has all, has) and a way to iterate over the contents. Roles used for access control exposed their entitlements via the Entitled interface. Likewise, Context extends Entitled in order to aggregate all entitlements that might be conferred by a user's system role or role in the course currently in context.


Method Summary
 boolean has(Entitlement entitlement)
          Interface method to determine whether a given entitlements object contains a single entitlement.
 boolean hasAll(Entitlements otherEntitlements)
          Interface method to determine whether a given entitlements object contains all of the entitlements specified in another entitlements object.
 boolean hasAny(Entitlements otherEntitlements)
          Interface method to determine whether a given entitlements object has any of the entitlements specified in another entitlements object.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

hasAny

boolean hasAny(Entitlements otherEntitlements)
Interface method to determine whether a given entitlements object has any of the entitlements specified in another entitlements object. If any of the entitlements overlap, the test succeeds. Thus care should be taken in creating compound entitlements to insure that a compound entitlement does not grant more access than is necessary. A compound entitlement may be created on the fly to determine a course-grained access control check. For example, in order to determine whether a user has access to the system administration panel, a compound entitlement can be created that combines the entitlements for all operations on that screen. If any entitlements match the entitlements masks associated with that user's role, access to the screen may be granted, although each individual operation may require a fine- grained check.

Parameters:
otherEntitlements - Entitlements object representing a set of entitlements
Returns:
true if this contains any of the entitlements found in otherEntitlements

hasAll

boolean hasAll(Entitlements otherEntitlements)
Interface method to determine whether a given entitlements object contains all of the entitlements specified in another entitlements object. If all of the entitlements overlap, the test succeeds.

Parameters:
otherEntitlements - Entitlements object representing a set of entitlements
Returns:
true if this contains all of the entitlements found in otherEntitlements

has

boolean has(Entitlement entitlement)
Interface method to determine whether a given entitlements object contains a single entitlement.

Parameters:
entitlement - Entitlement object representing a single ("atomic") entitlement
Returns:
true if the current Entitlements object contains the given Entitlement.


Copyright © 2003 Blackboard, Inc. All Rights Reserved.