SAP NetWeaver '04

com.sapportals.wcm.repository.service.statemanagement
Interface IApproverPrincipal

[contained in: com.sap.km.cm.repository.service.base.par - km.shared.repository.service.statemanagement_api.jar]
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)
          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(java.lang.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.
 java.lang.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.
 java.lang.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()
          Gets the IUMPrincipal from the user management The IUMPrincipal which represents the approver is returned.
 int getType()
          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.
 

Method Detail

getType

public int getType()
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

public java.lang.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

public java.lang.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

public com.sapportals.portal.security.usermanagement.IUMPrincipal getPrincipal()
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.

containsUser

public boolean containsUser(com.sapportals.portal.security.usermanagement.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

containsUser

public boolean containsUser(java.lang.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

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.