com.sapportals.wcm.repository.service.statemanagement

Interface IResourceTransition


public interface IResourceTransition

A IResourceTransition handles everything needed for a document to go from one state to another. It defines the state that is reached from another specific state and it defines whether the transition is allowed. One instance of an IResourceTransition handles one transition per resource.


Method Summary
 boolean execute()
          Changes the state of the current resource to the target state of the transition.
 String getDescription()
          Gets a meaningful lable for the presentation of the transition in the UI.
 String getExecMessage()
          Gets a message after method execute() has been called.
 String getID()
          Gets the ID of the transition.
 boolean isAllowed()
          Checks whether the transition is allowed for the current resource.
 

Method Detail

isAllowed

boolean isAllowed()
                  throws com.sapportals.wcm.WcmException
Checks whether the transition is allowed for the current resource. A transition is only allowed if the source state of the transition is the same as the current state of the resource. In addition, other conditions may forbid a transition. This method is used by the statemanagement in the user interface to provide the user with permitted transitions only.

Returns:
true, if the transition can be performed
Throws:
com.sapportals.wcm.WcmException - exception raised in failure situation

execute

boolean execute()
                throws com.sapportals.wcm.WcmException
Changes the state of the current resource to the target state of the transition. If the transition is allowed, it is executed now. This means that the state of the current resource changes to the target state specified in this transition. A transition can also perform certain other actions associated with this transition, such as sending a mail or an event.

Returns:
true, if the transition was executed successfully
Throws:
com.sapportals.wcm.WcmException - exception raised in failure situation

getExecMessage

String getExecMessage()
                      throws com.sapportals.wcm.WcmException
Gets a message after method execute() has been called. This method is used by the UI to provide a message for the user after a transition has been executed. Returns null if execute() has not yet been called.

Returns:
the ExecMessage value
Throws:
com.sapportals.wcm.WcmException

getID

String getID()
Gets the ID of the transition. The ID is a unique identifier for a transition.

Returns:
the ID value

getDescription

String getDescription()
Gets a meaningful lable for the presentation of the transition in the UI. The description is a verb or a phrase that describes the action to be performed by the user to execute this transition.

Returns:
a label to be used in the user interface
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