com.sapportals.portal.pcd.gl

Interface IAcl

All Superinterfaces:
IPermissionCheckAcl

public interface IAcl
extends IPermissionCheckAcl

Access control lists are used to model permissions in the Pcd GL.

An ACL has an owner, and zero or more ACL Entries (IAclEntry). Each entry contains a permission and the principal for whom the permission is granted.

This interface is not intended to be implemented by clients.


Method Summary
 boolean addOwner(Object caller, Object principal)
          Adds a new ACL owner to current ACL.
 void commit()
          Deprecated. do not use this method. Changes do not need to be commited.
 IAclEntry createAclEntry(Object caller, Object principal, String permission)
          Creates a new ACE and appends it to the ACL.
 List getOwners()
          Returns a list of ACL owners.
 boolean isOwner(Object principal)
          Checks if a user (principal) is an ACL owner.
 IAcl prepare()
          Deprecated. not needed.
 boolean removeAclEntry(Object caller, IAclEntry aclEntry)
          Removes an existing ACE object from current ACL object.
 boolean removeOwner(Object caller, Object principal)
          Removes an ACL owner from current ACL.
 void resetAcl(Object caller)
          Removes all existing ACE objects from the current ACL object, but does not delete the ACL Owner (com.sap.security.api.IPrincipal).
 
Methods inherited from interface com.sapportals.portal.pcd.gl.IPermissionCheckAcl
getAclEntries, getAclEntries, getObjectId, isAllowed
 

Method Detail

addOwner

boolean addOwner(Object caller,
                 Object principal)
                 throws PermissionControlException
Adds a new ACL owner to current ACL.

Parameters:
caller - current ACL owner (com.sap.security.api.IPrincipal).
principal - new ACL owner (principal, for example user) (com.sap.security.api.IPrincipal).
Returns:
true when the new ACL owner was set successfully, otherwise false.
Throws:
PermissionControlException

removeOwner

boolean removeOwner(Object caller,
                    Object principal)
                    throws PermissionControlException
Removes an ACL owner from current ACL.

Parameters:
caller - a current ACL owner (com.sap.security.api.IPrincipal).
principal - new ACL owner (principal, for example user) (com.sap.security.api.IPrincipal)
Returns:
true when the ACL owner was removed successfully, otherwise false.
Throws:
PermissionControlException

isOwner

boolean isOwner(Object principal)
Checks if a user (principal) is an ACL owner.

Parameters:
principal - the checked user (principal) (com.sap.security.api.IPrincipal).
Returns:
true when the user is an ACL owner, otherwise false.

getOwners

List getOwners()
Returns a list of ACL owners.

Specified by:
getOwners in interface IPermissionCheckAcl
Returns:
List list of owners (com.sap.security.api.IPrincipal)

createAclEntry

IAclEntry createAclEntry(Object caller,
                         Object principal,
                         String permission)
                         throws PermissionControlException
Creates a new ACE and appends it to the ACL.

Parameters:
caller - a current ACL owner ( com.sap.security.api.IPrincipal).
principal - principal for ACE ( com.sap.security.api.IPrincipal)
permission - permission for the ACE
Returns:
The ACE (IAclEntry) or null if it is not possible to create an ACE
Throws:
PermissionControlException

removeAclEntry

boolean removeAclEntry(Object caller,
                       IAclEntry aclEntry)
                       throws PermissionControlException
Removes an existing ACE object from current ACL object.

Parameters:
caller - an ACL owner (com.sap.security.api.IPrincipal)
aclEntry - An ACE
Returns:
true if the new ACE object was removed successfully, otherwise false
Throws:
PermissionControlException

resetAcl

void resetAcl(Object caller)
              throws PermissionControlException
Removes all existing ACE objects from the current ACL object, but does not delete the ACL Owner (com.sap.security.api.IPrincipal).

Parameters:
caller - an ACL owner
Throws:
PermissionControlException

prepare

IAcl prepare()
Deprecated. not needed.

Prepares this ACL for update.

Returns:
IAcl

commit

void commit()
            throws Exception
Deprecated. do not use this method. Changes do not need to be commited.

Commits any changes made to this ACL (i.e. add/remove AclEntry/Owner).

Throws:
Exception - if the data can't be commited to the storage
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api - EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api api EP-PIN
[sap.com] EP-BASIS [sap.com] tc/epbc/pcd/pars/srvgldeprecated api BC-PIN-PCD


Copyright 2011 SAP AG Complete Copyright Notice