SAP NetWeaver '04

com.sapportals.wcm.repository.security
Interface IResourceAcl

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
All Known Subinterfaces:
IResourceAclRaw

public interface IResourceAcl

An IResourceAcl is a wrapper for an IAcl which uses an URI as object ID for the IAcl and the user in resource context as 'callers' in the IAcl methods - IResourceAcls are assigned to resources - IResourceAcls hold IResourceAclEntries Abbreviations ACL Access Control List ACE Access Control List Entry


Method Summary
 boolean addEntry(IResourceAclEntry aclEntry)
          add an ACE to the ACL
 boolean addOwner(com.sapportals.wcm.repository.security.IUMPrincipal owner)
          add a new owner to the ACL (only owners are allowed to change the ACL)
 boolean checkPermission(com.sapportals.wcm.repository.security.IUMPrincipal principal, IAclPermission permission)
          check whether the ACL grants a specific permission to a user
 IResourceAclEntryList getEntries()
          get a list of the ACEs of the ACL
 IResourceAclEntryList getEntries(com.sapportals.wcm.repository.security.IUMPrincipal principal)
          get a list of the ACEs of the ACL concerning a specific principal
 com.sapportals.wcm.repository.security.IUMPrincipal getLockingUser()
          get the user which locked the ACL
 IUMPrincipalList getOwners()
          get a list of the owners of the ACL
 IResource getResource()
          get the resource the ACL is assigned to
 boolean isAuthorized(com.sapportals.wcm.repository.security.IUMPrincipal principal)
          check whether a principal is authorized to change the ACL
 boolean isLocked()
          check whether the ACL is locked
 boolean isOwner(com.sapportals.wcm.repository.security.IUMPrincipal principal)
          check whether a principal is an owner of the ACL
 boolean isReadOnly()
          check whether the ACL is read only
 boolean isUpToDate()
          check whether the ACL is up to date (check change level of persisted ACL) (used to invalidate ACL caches)
 boolean lock()
          lock the ACL (the lock is cooperative and affects only the result of subsequent calls to lock() or isLocked())
 boolean removeEntry(IResourceAclEntry aclEntry)
          remove an ACE from the ACL
 boolean removeOwner(com.sapportals.wcm.repository.security.IUMPrincipal owner)
          remove an owner from the ACL (only owners are allowed to change the ACL)
 void unlock()
          unlock the ACL
 

Method Detail

addOwner

public boolean addOwner(com.sapportals.wcm.repository.security.IUMPrincipal owner)
                 throws AclPersistenceException,
                        NotAuthorizedException,
                        ResourceException
add a new owner to the ACL (only owners are allowed to change the ACL)
Parameters:
owner - the new owner
Returns:
true iff the owner was added successfully
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
NotAuthorizedException - the user in the resource context is not an owner of the ACL (only owners are allowed to change the owner list)
ResourceException - Exception raised in failure situation

removeOwner

public boolean removeOwner(com.sapportals.wcm.repository.security.IUMPrincipal owner)
                    throws AclPersistenceException,
                           NotAuthorizedException,
                           LastOwnerException,
                           ResourceException
remove an owner from the ACL (only owners are allowed to change the ACL)
Parameters:
owner - the owner to be removed
Returns:
true iff the owner was removed successfully
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
NotAuthorizedException - the user in the resource context is not an owner of the ACL (only owners are allowed to change the owner list)
LastOwnerException - attempt to remove the last owner (which is forbidden)
ResourceException - Exception raised in failure situation

isOwner

public boolean isOwner(com.sapportals.wcm.repository.security.IUMPrincipal principal)
                throws AclPersistenceException
check whether a principal is an owner of the ACL
Parameters:
principal - the principal
Returns:
true iff the principal is an owner of the ACL
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

isAuthorized

public boolean isAuthorized(com.sapportals.wcm.repository.security.IUMPrincipal principal)
                     throws AclPersistenceException
check whether a principal is authorized to change the ACL
Parameters:
principal - the principal
Returns:
true iff the principal is an owner of the ACL or a member of an owner of the ACL
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

getOwners

public IUMPrincipalList getOwners()
                           throws AclPersistenceException
get a list of the owners of the ACL
Returns:
a list of the owners of the ACL
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

addEntry

public boolean addEntry(IResourceAclEntry aclEntry)
                 throws AclPersistenceException,
                        InvalidClassException,
                        NotAuthorizedException,
                        AlreadyAssignedToAclException,
                        PermissionNotSupportedException,
                        ResourceException
add an ACE to the ACL
Parameters:
aclEntry - the ACE
Returns:
true iff the ACE was added successfully
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
InvalidClassException - the ACE was created by a foreign IResourceAclManager
NotAuthorizedException - the user in the resource context is not an owner of the ACL
AlreadyAssignedToAclException - the ACE is already assigned to another ACL
PermissionNotSupportedException - the permission of the ACE is not supported for the object type of the ACL's resource
ResourceException - Exception raised in failure situation

removeEntry

public boolean removeEntry(IResourceAclEntry aclEntry)
                    throws AclPersistenceException,
                           InvalidClassException,
                           NotAuthorizedException,
                           ResourceException
remove an ACE from the ACL
Parameters:
aclEntry - the ACE
Returns:
true iff the ACE was removed successfully
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
InvalidClassException - the ACE was created by a foreign IResourceAclManager
NotAuthorizedException - the user in the resource context is not an owner of the ACL
ResourceException - Exception raised in failure situation

getEntries

public IResourceAclEntryList getEntries()
                                 throws AclPersistenceException
get a list of the ACEs of the ACL
Returns:
a list of the ACEs of the ACL
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

getEntries

public IResourceAclEntryList getEntries(com.sapportals.wcm.repository.security.IUMPrincipal principal)
                                 throws AclPersistenceException
get a list of the ACEs of the ACL concerning a specific principal
Parameters:
principal - the principal
Returns:
a list of the ACEs
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

checkPermission

public boolean checkPermission(com.sapportals.wcm.repository.security.IUMPrincipal principal,
                               IAclPermission permission)
                        throws AclPersistenceException
check whether the ACL grants a specific permission to a user
Parameters:
permission - the permission
principal - TBD: Description of the incoming method parameter
Returns:
true iff the permission is granted
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

isReadOnly

public boolean isReadOnly()
                   throws AclPersistenceException
check whether the ACL is read only
Returns:
true iff the ACL is read only
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

getResource

public IResource getResource()
                      throws AclPersistenceException
get the resource the ACL is assigned to
Returns:
the resource
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

lock

public boolean lock()
             throws AclPersistenceException,
                    NotAuthorizedException
lock the ACL (the lock is cooperative and affects only the result of subsequent calls to lock() or isLocked())
Returns:
true iff the ACL was locked successfully
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
NotAuthorizedException - the user in the resource context is not an owner of the ACL

isLocked

public boolean isLocked()
                 throws AclPersistenceException
check whether the ACL is locked
Returns:
true iff the ACL is locked
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

getLockingUser

public com.sapportals.wcm.repository.security.IUMPrincipal getLockingUser()
                                                                   throws AclPersistenceException
get the user which locked the ACL
Returns:
the user which locked the ACL or null in case the ACL is not locked
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred

unlock

public void unlock()
            throws AclPersistenceException,
                   NotAuthorizedException
unlock the ACL
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
NotAuthorizedException - the user in the resource context is not the user which locked the ACL

isUpToDate

public boolean isUpToDate()
                   throws AclPersistenceException
check whether the ACL is up to date (check change level of persisted ACL) (used to invalidate ACL caches)
Returns:
true iff the persisted ACL has the same change level
Throws:
AclPersistenceException - Exception raised in failure situation

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.