com.sapportals.wcm.repository.service.statemanagement

Interface IStep

All Known Subinterfaces:
IStepExt

public interface IStep

The IStep represents a step in the approval workflow. The workflow can consist of several steps, and each step can have several approvers. It is used in the user interface to define and display the workflow for a resource.

See Also:
IStepList

Method Summary
 void addApprover(IApprover impApprover)
          Adds one approver to the step.
 boolean appendApproverStringToStep(String impApproverString)
          Adds one approver to the step by using a string from the list which is returned by getApproverStringsOfStep() The list which is returned by getApproverStringsOfStep() contains strings, each of which represents a single approver entry assigned to the step.
 boolean containsApprover(com.sapportals.portal.security.usermanagement.IUser impUser)
          Deprecated. As of NetWeaver 7.1, replaced by containsApprover(com.sap.security.api.IUser)
 boolean containsApprover(com.sap.security.api.IUser impUser)
          Checks whether a IUser is contained in the approver list of the step.
 List deleteSelectedApprovers()
          Removes the selected approvers.
 List getApproverOfStep()
          Returns a list of approvers for one step.
 List getApproverStringsOfStep()
          Returns a list of strings representing the approvers of the step.
 String getDisplayName()
          Returns a description of the Step .
 boolean isEmpty()
          Checks whether approvers are assigned to the step.
 boolean isSelected()
          Checks whether the step has been selected.
 void setDisplayName(String impName)
          Sets a description for the Step .
 void setSelected(boolean impSelected)
          Sets the selected flag.
 

Method Detail

addApprover

void addApprover(IApprover impApprover)
Adds one approver to the step. The impApprover is added to the current step. Duplicate entries are prevented, which means that the approver is only added, if there is no other IApprover that equals the imApprover already assigend to the step.

Parameters:
impApprover - the approver to be added to the list

isSelected

boolean isSelected()
Checks whether the step has been selected. A step can be selected in the use interface.

Returns:
true if step is selected

isEmpty

boolean isEmpty()
Checks whether approvers are assigned to the step. A step is only meaningful if approvers are assigned to it. As a temporary measure, a step can be saved without any approvers being assigned, but it has to be removed from the workflow before the workflow can be used. This method is used to check if the step has to be removed from a IStepList before the steplist can be used.

Returns:
true if no approvers are assigned to the step

setSelected

void setSelected(boolean impSelected)
Sets the selected flag. A step can be selected in the user interface.

Parameters:
impSelected - Boolean flag to select or deselect the step

getDisplayName

String getDisplayName()
Returns a description of the Step . A step can have a meaningful name to be displayed in the user interface.

Returns:
the name of the step to use in the UI

setDisplayName

void setDisplayName(String impName)
Sets a description for the Step . A step can have a meaningful name to be displayed in the user interface.

Parameters:
impName - display name of the step

getApproverOfStep

List getApproverOfStep()
Returns a list of approvers for one step. A step can have a list of approvers assigned to it. The List returned contains only IApprover objects.

Returns:
list with IApprover objects
See Also:
IApprover

getApproverStringsOfStep

List getApproverStringsOfStep()
Returns a list of strings representing the approvers of the step. This method is used to serialize the current status of the IStep into a list of string values. The IStep can be deserialized using the appendApproverStringToStep for each element contained in the List returned by this method.

Returns:
a list of IApprovers
See Also:
IApprover

appendApproverStringToStep

boolean appendApproverStringToStep(String impApproverString)
                                   throws com.sapportals.wcm.WcmException
Adds one approver to the step by using a string from the list which is returned by getApproverStringsOfStep() The list which is returned by getApproverStringsOfStep() contains strings, each of which represents a single approver entry assigned to the step. The name of the step is also encoded in each string. This method checks if the name of the step in the string matches the name of the current step, and returns false if it does not match.

Parameters:
impApproverString - string for a single approver within the step
Returns:
true if append was successful, false, if approver does not belong to the current step
Throws:
com.sapportals.wcm.WcmException - exception raised in failure situation

deleteSelectedApprovers

List deleteSelectedApprovers()
Removes the selected approvers. Each approver assigned to the step can be selected in the step. This method is used by the UI to remove the selected approvers from the step. A list with all IApprovers that are removed is returned.

Returns:
list of all deleted IApprovers
Throws:
- WcmException

containsApprover

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

Checks whether a IUser is contained in the approver list of the step. An approver can be a single user, or a group or role. This method checks all approvers assigned to this step. If the approver is a group or role, the method checks if the user is contained in this group or role.

Parameters:
impUser - user that is checked
Returns:
true if the user is contained in the step
See Also:
IApprover

containsApprover

boolean containsApprover(com.sap.security.api.IUser impUser)
Checks whether a IUser is contained in the approver list of the step. An approver can be a single user, or a group or role. This method checks all approvers assigned to this step. If the approver is a group or role, the method checks if the user is contained in this group or role.

Parameters:
impUser - user that is checked
Returns:
true if the user is contained in the step
Since:
NetWeaver 7.1
See Also:
IApprover
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice