|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An IResourceAclManager administers and persists Access Control Lists (ACL)
- IResourceAclManagers are used by IAclSecurityManagers
- IResourceAclManagers use IAclManagers (one to one)
- IResourceAclManagers operate on IResources
- IAclManagers operate on arbitrary objects which are identified by an unique
ID
- IResourceAclManagers pass the RID of the IResources as object ID to the
IAclManagers
- IResourceAclManagers pass the logged in user (from the
resource context) as the 'caller' to IAclManagers
- IResourceAclManagers use
the wrappers IResourceAcl (for IAcl), IResourceAclEntry (for IAclEntry) in
order to hide the calls of the IAclManager (so that nobody can pass a fake
'caller')
Abbreviations
ACL: Access Control List
ACE: Access Control List Entry
Copyright (c) SAP AG 2001-2004
| Method Summary | |
boolean |
addSupportedPermission(IObjectType objectType,
IAclPermission permission)
assign a permission to an object type |
boolean[] |
areAclsUpToDate(IResourceAcl[] acls)
check whether the ACLs are up to date (compared to the database) |
boolean |
areNegativeAclEntriesSupported()
check whether negative ACEs are supported |
boolean |
assignForeignAcl(IResourceAcl foreignAcl,
IResource resource)
assign an ACL from a foreign IResourceAclManager to a local resource - foreign ACEs which hold permissions that are not supported by the local IResourceAclManager are ignored - locally inherited ACEs are added - the owners are maintained - if the resource inherits an ACL the user must be an owner - fails, if the resource already has an ACL assigned |
IResourceAcl |
createAcl(IResource resource)
create a new ACL for a resource - initial owner is the user in the resource context - inherited ACEs are added - if the resource inherits an ACL the user must be an owner - fails, if the resource already has an ACL assigned |
IResourceAclEntry |
createAclEntry(com.sapportals.portal.security.usermanagement.IUMPrincipal principal,
boolean negative,
IAclPermission permission,
int sortIndex)
create a new ACE for an ACL to grant or deny a permission to a principal |
IAclPermission |
createPermission(java.lang.String name)
create a new permission (the permission can not be used until it is assigned to an object type by calling the addSupportedPermission() method) |
IResourceAcl |
getAcl(IResource resource)
get the ACL of a specific resource |
long |
getDBVersion()
Returns a value representing the state (timestamp or modifycounter) of all persisted acl entries. |
IResourceAcl |
getInheritedAcl(IResource resource)
get the ACL that a resource inherits by its ancestors |
IObjectType |
getObjectType(IResource resource)
get the object type of a resource |
IAclPermission |
getPermission(java.lang.String name)
get the IAclPermission object of the (supported) permission with a given name |
IObjectTypeList |
getSupportedObjectTypes()
get a list of object types which are supported by the IResourceAclManager for resources |
IAclPermissionList |
getSupportedPermissions(IResource resource)
get a list of permissions which are supported by the IResourceAclManager for a specific resource |
boolean |
isPermissionUsedInAcl(IAclPermission permission)
check whether a permission is used in an ACL |
boolean |
isReadOnly()
check whether the IResourceAclManager is read only (no creation or modification of ACLs is allowed) |
IResourceList |
propagateAcl_Remove(IResource resource)
remove the ACLs of the descendants of the resource |
boolean |
removeAcl(IResource resource)
remove the ACL of a specific resource |
boolean |
removeAcl(IResourceAcl acl)
remove an ACL |
boolean |
removePermission(IAclPermission permission)
remove a permission - a permission can only be removed if it is not predefined and not used in an ACL |
boolean |
removeSupportedPermission(IObjectType objectType,
IAclPermission permission)
remove the assignment of a permission to an object type - a supported permission can only be removed if it is not predefined and not used in an ACL |
| Method Detail |
public IResourceAclEntry createAclEntry(com.sapportals.portal.security.usermanagement.IUMPrincipal principal,
boolean negative,
IAclPermission permission,
int sortIndex)
throws AclPersistenceException,
java.lang.UnsupportedOperationException,
InvalidClassException
principal - the principalnegative - true if the entry denies a permission, false if it grants
(denials are currently unsupported)permission - the permissionsortIndex - the position of the ACE in an ACL (important only with
denials)AclPersistenceException - a problem with the storage where the
ACLs are persisted occurredInvalidClassException - the permission was created by a foreign
IResourceAclManagerjava.lang.UnsupportedOperationException - negative ACEs are currently not
supported (request support by using the
areNegativeAclEntriesSupported() method)public boolean areNegativeAclEntriesSupported()
public IResourceAcl createAcl(IResource resource)
throws AclPersistenceException,
NotAuthorizedException,
AclExistsException,
ResourceException
resource - the resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredNotAuthorizedException - the user in the resource context is not
an owner of an inherited ACLAclExistsException - an ACL already exists for the resourceResourceException - the resource URI could not be determined
public boolean assignForeignAcl(IResourceAcl foreignAcl,
IResource resource)
throws AclPersistenceException,
NotAuthorizedException,
AclExistsException,
ResourceException
foreignAcl - the foreign ACLresource - the local resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredNotAuthorizedException - the user in the resource context is not
an owner of an inherited ACLAclExistsException - an ACL already exists for the resourceResourceException - the resource URI could not be determined
public IResourceAcl getAcl(IResource resource)
throws AclPersistenceException,
ResourceException
resource - the resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredResourceException - the resource URI could not be determined
public IResourceAcl getInheritedAcl(IResource resource)
throws AclPersistenceException,
ResourceException
resource - the resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredResourceException - the resource URI could not be determined
public boolean removeAcl(IResource resource)
throws AclPersistenceException,
NotAuthorizedException,
ResourceException,
ResourceException
resource - the resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredNotAuthorizedException - the user in the resource context is not
an owner of the ACLResourceException - the resource URI could not be determined
public boolean removeAcl(IResourceAcl acl)
throws AclPersistenceException,
NotAuthorizedException,
InvalidClassException,
ResourceException
acl - the ACLAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredNotAuthorizedException - the caller is not an owner of the access
control listInvalidClassException - the acl was created by a foreign resource
acl managerResourceException - Exception raised in failure situation
public IObjectTypeList getSupportedObjectTypes()
throws AclPersistenceException
AclPersistenceException - a problem with the storage where the
ACLs are persisted occurred
public IObjectType getObjectType(IResource resource)
throws AclPersistenceException,
ResourceException
resource - the resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredResourceException - the resource URI could not be determined
public IAclPermissionList getSupportedPermissions(IResource resource)
throws AclPersistenceException,
ResourceException
resource - the resourceAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredResourceException - the resource URI could not be determined
public IAclPermission getPermission(java.lang.String name)
throws AclPersistenceException
name - the name of the permissionAclPersistenceException - a problem with the storage where the
ACLs are persisted occurred
public boolean addSupportedPermission(IObjectType objectType,
IAclPermission permission)
throws AclPersistenceException,
PredefinedPermissionException
objectType - the object typepermission - the permissionAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredPredefinedPermissionException - the permission is predefined and
thus not allowed to be changed
public boolean removeSupportedPermission(IObjectType objectType,
IAclPermission permission)
throws AclPersistenceException,
PredefinedPermissionException,
PermissionUsedException
objectType - the object typepermission - the permissionAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredPredefinedPermissionException - the permission is predefined and
thus not allowed to be changedPermissionUsedException - Exception raised in failure situation
public IAclPermission createPermission(java.lang.String name)
throws AclPersistenceException,
PermissionExistsException
name - the permission nameAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredPermissionExistsException - a permission with that name exists
already
public boolean removePermission(IAclPermission permission)
throws AclPersistenceException,
PredefinedPermissionException,
PermissionUsedException
permission - the permissionAclPersistenceException - a problem with the storage where the
ACLs are persisted occurredPredefinedPermissionException - the permission is predefined and
thus not allowed to be changedPermissionUsedException - the permission is used in some acl and
thus not allowed to be changed
public boolean isPermissionUsedInAcl(IAclPermission permission)
throws AclPersistenceException
permission - the permissionAclPersistenceException - a problem with the storage where the
ACLs are persisted occurred
public boolean isReadOnly()
throws AclPersistenceException
AclPersistenceException - a problem with the storage where the
ACLs are persisted occurred
public boolean[] areAclsUpToDate(IResourceAcl[] acls)
throws AclPersistenceException
acls - the ACLs to checkAclPersistenceException - Exception raised in failure situation
public IResourceList propagateAcl_Remove(IResource resource)
throws AclPersistenceException,
ResourceException,
NoAclException,
InvalidClassException,
NotAuthorizedException
AclPersistenceException - Exception raised in failure situationResourceException - Exception raised in failure situationNoAclException - Exception raised in failure situationInvalidClassException - Exception raised in failure situationNotAuthorizedException - Exception raised in failure situationpublic long getDBVersion()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||