|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The PermissionCollection interface represents a homogeneous
collection of non-overlapping Permission instances. (Grouping by
Permission type enables more efficient management and access control
checking).
"Overlapping" Permissions may not be added to a PermissionCollection. Given two Permission instances: A and B, they are considered to overlap if their fully-qualfied ResourcePatterns are identical and they have at least one action in common or neither has any actions. Permissions are NOT "overlapping" if their ResourcePatterns are not identical.
| Method Summary | |
void |
addPermission(Permission permission)
Add a Permission. |
boolean |
containsOverlapping(Permission permission)
Check for an overlapping Permission. |
Permission |
getOverlapping(Permission permission)
Get an overlapping Permission. |
Permission |
getPermission(ResourceRequest resourceReq)
Get the Permission best matching a
ResourceRequest. |
PermissionIterator |
getPermissions()
Get all Permissions. |
void |
initialize(Config config)
Initialize the AccessControlRule. |
void |
removePermission(Permission permission)
Remove a Permission. |
| Methods inherited from interface com.cafesoft.core.util.Debuggable |
setDebug |
| Method Detail |
public void initialize(Config config)
throws ConfigException
config - a Config object that provides access to configuration
parameters and a runtime Context.
ConfigException
public void addPermission(Permission permission)
throws OverlappingPermissionsException
Permission.
permission - the Permission to be added.
OverlappingPermissionsExceptionpublic void removePermission(Permission permission)
Permission.
permission - the Permission to be removed.public PermissionIterator getPermissions()
public Permission getPermission(ResourceRequest resourceReq)
Permission best matching a
ResourceRequest.
resourceReq - the ResourceRequest
Permission best matching the
ResourceRequest or null if no match.public boolean containsOverlapping(Permission permission)
Two Permission instances: A and B are considered to overlap if:
permission - the Permission to be checked for an overlap.
getOverlapping(com.cafesoft.cams.access.Permission)public Permission getOverlapping(Permission permission)
permission - the Permission that overlaps the one to be retrieved.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||