SAP NetWeaver '04

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

[contained in: com.sap.km.cm.repository.service.base.par - km.shared.repository.service.statemanagement_api.jar]
public interface IApprover

This interface represents an approver. The approver has an ID which comes from user management. The approver can be a user, a group, or a role. The approver is identified by an ID and an assigned step. An approver must be unique within the approver list for a ressource.


Method Summary
 com.sapportals.portal.security.usermanagement.IUser getActApprover()
          Gets the user who has approved or rejected a resource If a group or a role is used as an approver, only one actual user can approve or reject a resource.
 IApproverPrincipal getActApproverPrincipal()
          Gets the user who has approved or rejected a resource If a group or a role is used as an approver, only one actual user can approve or reject a resource.
 java.lang.String getApproverString()
          Returns the attributes of the IApprover object as a string to enable persistent storage This method can be used to serialize the approver object.
 java.lang.String getDisplayName()
          Gets the name of the approver for the user interface Returns a display name for this approver to be used in the user interface.
 java.lang.String getIcon()
          Gets the icon of the approver for the user interface The different types of principals (user, group, and role) are represented by different icons.
 java.lang.String getKey()
          Gets the unique key of the user in the approver list It should be possible to instantiate an approver with this key.
 IApproverPrincipal getPrincipal()
          Gets a wrapper class for the principal as used in user management In the approval workflow, a wrapper class for the user management's principal is used to provide an abstraction from the usermanagement and to handle null users.
 java.lang.Boolean hasApproved()
          Checks whether the approver has approved the current resource.
 boolean isSelected()
          Checks whether the approver is selected in the approver list.
 void setApproved(java.lang.Boolean impApproved, java.lang.String impUserId)
          Indicates whether the user has approved or rejected the current resource
 void setApproverString(java.lang.String impApproverString)
          Restores the IApprover object from a string as returned by getApproverString().
 void setSelected(boolean impSelected)
          Selects the approver in the approver list This method is used to mark an approver as selected.
 

Method Detail

getKey

public java.lang.String getKey()
Gets the unique key of the user in the approver list It should be possible to instantiate an approver with this key. Two approvers are considered to be the same if their key are the same.
Returns:
the unique key of the user

getPrincipal

public IApproverPrincipal getPrincipal()
Gets a wrapper class for the principal as used in user management In the approval workflow, a wrapper class for the user management's principal is used to provide an abstraction from the usermanagement and to handle null users.
Returns:
the principal

getActApprover

public com.sapportals.portal.security.usermanagement.IUser getActApprover()
Gets the user who has approved or rejected a resource If a group or a role is used as an approver, only one actual user can approve or reject a resource. This user is returned via this method. Null is returned if the approval has not yet taken place.
Returns:
the actApprover value

getActApproverPrincipal

public IApproverPrincipal getActApproverPrincipal()
Gets the user who has approved or rejected a resource If a group or a role is used as an approver, only one actual user can approve or reject a resource. This user is returned via this method. Null is returned if the approval has not yet taken place. In contrast to getActApprover() the user is returned as IApproverPrincipal , which is a wrapper around the IUser . This wrapper provides, for example, a backup for the getDisplayName() method.
Returns:
the actApprover value

getDisplayName

public java.lang.String getDisplayName()
Gets the name of the approver for the user interface Returns a display name for this approver to be used in the user interface.
Returns:
the displayName value

getIcon

public java.lang.String getIcon()
Gets the icon of the approver for the user interface The different types of principals (user, group, and role) are represented by different icons. The correct icon for the type of approver is returned via this method and can be used in the user interface.
Returns:
the icon value

isSelected

public boolean isSelected()
Checks whether the approver is selected in the approver list. The approver is normally used in the approver list in the user interface. The approver can be selected here and actions carried out on it.
Returns:
true if approver is selected.

setSelected

public void setSelected(boolean impSelected)
Selects the approver in the approver list This method is used to mark an approver as selected.
Parameters:
impSelected - true to select the approver

hasApproved

public java.lang.Boolean hasApproved()
Checks whether the approver has approved the current resource.
Returns:
null if the approver has not responded, true if the approver has approved the resource, false if the approver has rejected the resource

setApproved

public void setApproved(java.lang.Boolean impApproved,
                        java.lang.String impUserId)
Indicates whether the user has approved or rejected the current resource
Parameters:
impApproved - true if approver has approved the resource, false if approver has rejected the resource
impUserId - user who has approved or rejected the resource

getApproverString

public java.lang.String getApproverString()
Returns the attributes of the IApprover object as a string to enable persistent storage This method can be used to serialize the approver object. The returned string can be used to restore the current state of the approver object with the method setApproverString() . This method can be used to persist the current approver object in an html page.
Returns:
The approverString value

setApproverString

public void setApproverString(java.lang.String impApproverString)
                       throws WcmException
Restores the IApprover object from a string as returned by getApproverString(). With this method the complete state of the object can be restored. Passing null as impApproverString causes an exception.
Parameters:
impApproverString - the approverString value
Throws:
WcmException - if the object can not be instantiated

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.