com.sap.portal.pcm.admin

Interface IPermission


public interface IPermission

The interface that provides information about the permissions of a portal object.

The permissions may be proprietary to the object type. The object is expected to respond to the portal's permissions (as defined below).


Field Summary
static String PCM_ADMIN_FULL_CONTROL
          A constant that represents a permission to read, change and delete the object's properties.
static String PCM_ADMIN_OWNER
          A constant that represents an owner permission.
static String PCM_ADMIN_READ
          A constant that represents a permission to read the object's properties.
static String PCM_ADMIN_READ_WRITE
          A constant that represents a permission to read and change the object's properties.
static String PCM_ADMIN_WRITE
          A constant that represents a permission to change the object's properties.
static String PCM_END_USER
          A constant that represents the permission for an end user to navigate to this portal object.
 
Method Summary
 PermissionDescriptor getAllowedPermissions(Object principal, Locale locale)
          Gets an object that represents the allowed permissions of the specified principal for the specified locale.
 String[] getAllPermissions()
          Lists all possible permissions for this object.
 String getPermissionTitle(String permission, Locale locale)
          Gets the permission title for the specified locale.
 boolean isAllowed(Object principal, String permission)
          Indicates whether the given principal has the specified permission.
 

Field Detail

PCM_ADMIN_READ

static final String PCM_ADMIN_READ
A constant that represents a permission to read the object's properties.

See Also:
Constant Field Values

PCM_ADMIN_WRITE

static final String PCM_ADMIN_WRITE
A constant that represents a permission to change the object's properties.

See Also:
Constant Field Values

PCM_ADMIN_READ_WRITE

static final String PCM_ADMIN_READ_WRITE
A constant that represents a permission to read and change the object's properties.

See Also:
Constant Field Values

PCM_ADMIN_FULL_CONTROL

static final String PCM_ADMIN_FULL_CONTROL
A constant that represents a permission to read, change and delete the object's properties.

See Also:
Constant Field Values

PCM_ADMIN_OWNER

static final String PCM_ADMIN_OWNER
A constant that represents an owner permission. The owner of the object has full control permission and the ability to define other owners to this object.

See Also:
Constant Field Values

PCM_END_USER

static final String PCM_END_USER
A constant that represents the permission for an end user to navigate to this portal object.

See Also:
Constant Field Values
Method Detail

isAllowed

boolean isAllowed(Object principal,
                  String permission)
Indicates whether the given principal has the specified permission.

Parameters:
principal - a user, role or a group (when using UME, provide IPrincipal)
permission - a string representation of the permission
Returns:
true if the user has the specified permission

getAllPermissions

String[] getAllPermissions()
Lists all possible permissions for this object.

Returns:
an array of string representations of the possible permissions for this object

getPermissionTitle

String getPermissionTitle(String permission,
                          Locale locale)
                          throws UnsupportedOperationException
Gets the permission title for the specified locale.

Parameters:
permission - a string representation of the permission
locale - the preferred locale
Returns:
the permission title for the specified locale
Throws:
UnsupportedOperationException - if the permission is not assigned to the object, or if this object does not support a permission title

getAllowedPermissions

PermissionDescriptor getAllowedPermissions(Object principal,
                                           Locale locale)
Gets an object that represents the allowed permissions of the specified principal for the specified locale.

Parameters:
locale - the preferred locale
principal - a user, role or a group (when using UME, provide IPrincipal)
Returns:
an interface that holds the allowed permissions and a description
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcm/admin/public/api api EP-PIN
[sap.com] EP-RUNTIME [sap.com] tc/ep/semantics/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2015 SAP AG Complete Copyright Notice