com.sapportals.wcm.repository.service.statemanagement

Interface IApproverPrincipal


public interface IApproverPrincipal

This interface is a wrapper for IUMPrincipal . It provides all the methods required for the IUMPrincipal used in the IApprover implementation. The IApproverPrincipal is also responsible for buffering the situation if the user who was assigned as the approver is no longer found in the user management. All methods have to return a meaningful value in this situation.


Method Summary
 boolean containsUser(com.sapportals.portal.security.usermanagement.IUser impUser)
          Deprecated. As of NetWeaver 7.1, replaced by containsUser(com.sap.security.api.IUser)
 boolean containsUser(com.sap.security.api.IUser impUser)
          Checks whether the impUser is contained in the IApproverPrincipal If the current principal represents a single user, checks if it is the user.
 boolean containsUser(String impID, int impType)
          Checks whether a principal is contained in the IApproverPrincipal If the current principal represents a single user, checks if it is the user.
 String getDisplayName()
          Gets the name of the approver for the user interface Normally a full name should be returned as maintained in the user management.
 String getId()
          Gets the ID of the approver as used in user management The ID of an approver is taken from the user management.
 com.sapportals.portal.security.usermanagement.IUMPrincipal getPrincipal()
          Deprecated. As of NetWeaver 7.1, replaced by getPrincipalUME()
 com.sap.security.api.IPrincipal getPrincipalUME()
          Gets the IUMPrincipal from the user management The IUMPrincipal which represents the approver is returned.
 int getType()
          Deprecated. As of NetWeaver 7.1, no Type needed any more for UMEPrincipal, use instanceof instead}
 

Method Detail

getType

int getType()
Deprecated. As of NetWeaver 7.1, no Type needed any more for UMEPrincipal, use instanceof instead}

Gets the type of approver as defined in IUMPrincipal The user management deals with principals, which may be of the type user, group or role. The tpyes are defined as integer values with the the IUMPrincipal and are also used here.

Returns:
integer with approver type

getId

String getId()
Gets the ID of the approver as used in user management The ID of an approver is taken from the user management. Together with the type, it is unique, so an approver can be identified by the tuple of ID and type.

Returns:
String with the ID

getDisplayName

String getDisplayName()
Gets the name of the approver for the user interface Normally a full name should be returned as maintained in the user management. This method also implements a backup mechanism which returns a name meaningful for human users for the approver even if no display name is returned by the user management.

Returns:
string with approver display name

getPrincipal

com.sapportals.portal.security.usermanagement.IUMPrincipal getPrincipal()
Deprecated. As of NetWeaver 7.1, replaced by getPrincipalUME()

Gets the IUMPrincipal from the user management The IUMPrincipal which represents the approver is returned. In some cases this method may return null, for example, when the user who was assigned as an approver is no longer found in the user management. The IApproverPrincipal is used as wapper, to deal with this situation and to return usable values in all other methods.

Returns:
IUMPrincipal from user management. May be null.

getPrincipalUME

com.sap.security.api.IPrincipal getPrincipalUME()
Gets the IUMPrincipal from the user management The IUMPrincipal which represents the approver is returned. In some cases this method may return null, for example, when the user who was assigned as an approver is no longer found in the user management. The IApproverPrincipal is used as wapper, to deal with this situation and to return usable values in all other methods.

Returns:
IUMPrincipal from user management. May be null.
Since:
NetWeaver 7.1

containsUser

boolean containsUser(com.sapportals.portal.security.usermanagement.IUser impUser)
Deprecated. As of NetWeaver 7.1, replaced by containsUser(com.sap.security.api.IUser)

Checks whether the impUser is contained in the IApproverPrincipal If the current principal represents a single user, checks if it is the user. Otherwise, if the current principal represents a group or a role, it checks whether the impUser is contained in the group or role.

Parameters:
impUser - user to check
Returns:
true if user is contained or if user is current approver

containsUser

boolean containsUser(com.sap.security.api.IUser impUser)
Checks whether the impUser is contained in the IApproverPrincipal If the current principal represents a single user, checks if it is the user. Otherwise, if the current principal represents a group or a role, it checks whether the impUser is contained in the group or role.

Parameters:
impUser - user to check
Returns:
true if user is contained or if user is current approver
Since:
NetWeaver 7.1

containsUser

boolean containsUser(String impID,
                     int impType)
Checks whether a principal is contained in the IApproverPrincipal If the current principal represents a single user, checks if it is the user. Otherwise, if the current principal represents a group or a role, it checks whether the user is contained in the group or role. In contrast to containsUser(IUser impUser) , the user is identified by ID and type.

Parameters:
impID - ID of the principal
impType - type of the principal
Returns:
true if user is contained or if user is current approver
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 2012 SAP AG Complete Copyright Notice