com.sap.netweaver.bc.rf.mi.security

Interface ISecurityManager

All Known Subinterfaces:
IAclSecurityManager, IMutableSecurityManager

public interface ISecurityManager

Read-Only interface describing a repository sub manager for security. This interface allows for security checks on resources based on generic permissions and UME principals. The predefined set of permissions can be extened by the implementation.


Method Summary
 List getSupportedPermissions(IResourceHandle resourceHandle)
          Get list of permissions which are supported by the security manager for the given resource handle, e.g. outcome depends on whether the resource is a collection or not.
 boolean isAllowed(IResourceHandle resourceHandle, com.sap.security.api.IPrincipal principal, IPermission permission)
          Checks whether the given principal has the given permission on the given resource handle.
 boolean isAllowed(IResourceHandle resourceHandle, com.sap.security.api.IPrincipal principal, List permissions)
          Checks whether the given principal has all of the given permissions on the given resource handle.
 Set isAllowed(List ridList, com.sap.security.api.IPrincipal principal, IPermission permission)
          Checks whether the given principal has the given permission on the given resource identifiers.
 Set isAllowed(List ridList, com.sap.security.api.IPrincipal principal, List permissions)
          Checks whether the given principal has all of the given permissions on the given resource identifiers.
 

Method Detail

getSupportedPermissions

List getSupportedPermissions(IResourceHandle resourceHandle)
                             throws ResourceException
Get list of permissions which are supported by the security manager for the given resource handle, e.g. outcome depends on whether the resource is a collection or not. If no handle is given the manager must return a list of all supported permissions.

Parameters:
resourceHandle - resource handle. May be null - all supported permissions are returned in this case.
Returns:
list of supported permissions of type IPermission - can be empty but not null.
Throws:
ResourceException - when the resource handle is invalid

isAllowed

boolean isAllowed(IResourceHandle resourceHandle,
                  com.sap.security.api.IPrincipal principal,
                  IPermission permission)
                  throws ResourceException
Checks whether the given principal has the given permission on the given resource handle.

Parameters:
resourceHandle - resource handle
principal - principal for whom the permissions are checked
permission - single permission to check
Returns:
true when the given principal has the given permission on the given resource handle
Throws:
ResourceException - when wrong parameterized

isAllowed

boolean isAllowed(IResourceHandle resourceHandle,
                  com.sap.security.api.IPrincipal principal,
                  List permissions)
                  throws ResourceException
Checks whether the given principal has all of the given permissions on the given resource handle.

Parameters:
resourceHandle - resource handle
principal - principal for whom the permissions are checked
permissions - list of permissions to check
Returns:
true when the given principal has all of the given permissions on the given resource handle
Throws:
ResourceException - when wrong parameterized

isAllowed

Set isAllowed(List ridList,
              com.sap.security.api.IPrincipal principal,
              IPermission permission)
              throws ResourceException,
                     OperationNotCompletedException
Checks whether the given principal has the given permission on the given resource identifiers.

Note: This method needs not to be handled atomically! Although this operation may fail in parts, the operation on one of the many operands provided through the parameter list is always expected to be atomic!

Parameters:
ridList - list of resource identifiers
principal - principal for whom the permissions are checked
permission - single permission to check
Returns:
list of resource identifiers the given principal has the given permission for
Throws:
ResourceException - when wrong parameterized
OperationNotCompletedException - when the operation failed in parts

isAllowed

Set isAllowed(List ridList,
              com.sap.security.api.IPrincipal principal,
              List permissions)
              throws ResourceException,
                     OperationNotCompletedException
Checks whether the given principal has all of the given permissions on the given resource identifiers.

Note: This method needs not to be handled atomically! Although this operation may fail in parts, the operation on one of the many operands provided through the parameter list is always expected to be atomic!

Parameters:
ridList - list of resource identifiers
principal - principal for whom the permissions are checked
permissions - list of permissions to check
Returns:
set of resource identifiers the given principal has all of the given permissions for
Throws:
ResourceException - when wrong parameterized
OperationNotCompletedException - when the operation failed in parts
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] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2011 SAP AG Complete Copyright Notice