com.sapportals.wcm.repository.security

Interface IResourceAcl

All Known Subinterfaces:
IResourceAcl4Tx, IResourceAclRaw, IResourceAclVersioned

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.sap.security.api.IPrincipal owner)
          add a new owner to the ACL (only owners are allowed to change the ACL)
 boolean addOwner(com.sapportals.portal.security.usermanagement.IUMPrincipal owner)
          Deprecated. As of NetWeaver 7.1, replaced by addOwner(com.sap.security.api.IPrincipal)
 boolean checkPermission(com.sap.security.api.IPrincipal principal, IAclPermission permission)
          check whether the ACL grants a specific permission to a user
 boolean checkPermission(com.sapportals.portal.security.usermanagement.IUMPrincipal principal, IAclPermission permission)
          Deprecated. As of NetWeaver 7.1, replaced by checkPermission(com.sap.security.api.IPrincipal,IAclPermission)
 IResourceAclEntryList getEntries()
          get a list of the ACEs of the ACL
 IResourceAclEntryList getEntries(com.sap.security.api.IPrincipal principal)
          get a list of the ACEs of the ACL concerning a specific principal
 IResourceAclEntryList getEntries(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Deprecated. As of NetWeaver 7.1, replaced by getEntries(com.sap.security.api.IPrincipal)
 com.sapportals.portal.security.usermanagement.IUMPrincipal getLockingUser()
          Deprecated. As of NetWeaver 7.1, replaced by getLockingUserUME()
 com.sap.security.api.IPrincipal getLockingUserUME()
          get the user which locked the ACL
 IUMPrincipalList getOwners()
          Deprecated. As of NetWeaver 7.1, replaced by getOwnersUME()
 List getOwnersUME()
          get a list of the owners of the ACL
 IResource getResource()
          get the resource the ACL is assigned to
 boolean isAuthorized(com.sap.security.api.IPrincipal principal)
          check whether a principal is authorized to change the ACL
 boolean isAuthorized(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Deprecated. As of NetWeaver 7.1, replaced by isAuthorized(com.sap.security.api.IPrincipal)
 boolean isLocked()
          check whether the ACL is locked
 boolean isOwner(com.sap.security.api.IPrincipal principal)
          check whether a principal is an owner of the ACL
 boolean isOwner(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Deprecated. As of NetWeaver 7.1, replaced by isOwner(com.sap.security.api.IPrincipal)
 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.sap.security.api.IPrincipal owner)
          remove an owner from the ACL (only owners are allowed to change the ACL)
 boolean removeOwner(com.sapportals.portal.security.usermanagement.IUMPrincipal owner)
          Deprecated. As of NetWeaver 7.1, replaced by removeOwner(com.sap.security.api.IPrincipal)
 void unlock()
          unlock the ACL
 

Method Detail

addOwner

boolean addOwner(com.sapportals.portal.security.usermanagement.IUMPrincipal owner)
                 throws AclPersistenceException,
                        NotAuthorizedException,
                        ResourceException
Deprecated. As of NetWeaver 7.1, replaced by addOwner(com.sap.security.api.IPrincipal)

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

addOwner

boolean addOwner(com.sap.security.api.IPrincipal 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
Since:
NetWeaver 7.1

removeOwner

boolean removeOwner(com.sapportals.portal.security.usermanagement.IUMPrincipal owner)
                    throws AclPersistenceException,
                           NotAuthorizedException,
                           LastOwnerException,
                           ResourceException
Deprecated. As of NetWeaver 7.1, replaced by removeOwner(com.sap.security.api.IPrincipal)

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

removeOwner

boolean removeOwner(com.sap.security.api.IPrincipal 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
Since:
NetWeaver 7.1

isOwner

boolean isOwner(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
                throws AclPersistenceException
Deprecated. As of NetWeaver 7.1, replaced by isOwner(com.sap.security.api.IPrincipal)

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

isOwner

boolean isOwner(com.sap.security.api.IPrincipal 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
Since:
NetWeaver 7.1

isAuthorized

boolean isAuthorized(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
                     throws AclPersistenceException
Deprecated. As of NetWeaver 7.1, replaced by isAuthorized(com.sap.security.api.IPrincipal)

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

isAuthorized

boolean isAuthorized(com.sap.security.api.IPrincipal 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
Since:
NetWeaver 7.1

getOwners

IUMPrincipalList getOwners()
                           throws AclPersistenceException
Deprecated. As of NetWeaver 7.1, replaced by getOwnersUME()

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

getOwnersUME

List getOwnersUME()
                  throws AclPersistenceException
get a list of the owners of the ACL

Returns:
a java.util.List containing objects of type com.sap.security.api.IPrincipal representing the owners of the ACL
Throws:
AclPersistenceException - a problem with the storage where the ACLs are persisted occurred
Since:
NetWeaver 7.1

addEntry

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

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

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

IResourceAclEntryList getEntries(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
                                 throws AclPersistenceException
Deprecated. As of NetWeaver 7.1, replaced by getEntries(com.sap.security.api.IPrincipal)

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

getEntries

IResourceAclEntryList getEntries(com.sap.security.api.IPrincipal 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
Since:
NetWeaver 7.1

checkPermission

boolean checkPermission(com.sapportals.portal.security.usermanagement.IUMPrincipal principal,
                        IAclPermission permission)
                        throws AclPersistenceException
Deprecated. As of NetWeaver 7.1, replaced by checkPermission(com.sap.security.api.IPrincipal,IAclPermission)

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

checkPermission

boolean checkPermission(com.sap.security.api.IPrincipal 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
Since:
NetWeaver 7.1

isReadOnly

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

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

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

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

com.sapportals.portal.security.usermanagement.IUMPrincipal getLockingUser()
                                                                          throws AclPersistenceException
Deprecated. As of NetWeaver 7.1, replaced by getLockingUserUME()

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

getLockingUserUME

com.sap.security.api.IPrincipal getLockingUserUME()
                                                  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
Since:
NetWeaver 7.1

unlock

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

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
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2012 SAP AG Complete Copyright Notice