ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.conversation.base
Class BasicCpStateTransition

java.lang.Object
  |
  +--com.ibm.conversation.base.BasicCpStateTransition
All Implemented Interfaces:
CpStateTransition

public class BasicCpStateTransition
extends java.lang.Object
implements CpStateTransition

The BasicCpStateTransition class is a straightforward, vanilla-Java implementation of the CpStateTransition interface.


Fields inherited from interface com.ibm.conversation.CpStateTransition
CHILD_RETURN, NO_TYPE, SEND_MESSAGE, TIMEOUT, TYPE_STRINGS
 
Constructor Summary
BasicCpStateTransition(int newType)
          Constructs an BasicCpStateTransition object with the given transition type.
 
Method Summary
 java.lang.String getChildReturn()
          Returns the child-return code.
 MessageDescription getMessageDescription()
          Returns the MessageDescription for the message associated with this transition.
 java.lang.String getName()
          Returns the transition's name.
 java.lang.String getSenderRole()
          Returns the role that is the message sender.
 java.lang.String getSourceName()
          Returns the name of the transition's source state.
 java.lang.String getTargetName()
          Returns the name of the transition's target (or destination) state.
 int getType()
          Return the transition's type.
 int getTypeFromString(java.lang.String str)
          Returns the transition type matching the given string.
 java.lang.String getTypeString()
          Returns a string corresponding to the transition's type.
 boolean setChildReturn(java.lang.String newReturn)
          Sets the child-return code.
 boolean setMessageDescription(MessageDescription newDesc)
          Sets the MessageDescription for the message associated with this transition.
 void setName(java.lang.String newId)
          Sets the transition's name.
 boolean setSenderRole(java.lang.String newRole)
          Sets the role that sends the message.
 void setSourceName(java.lang.String newName)
          Sets the name of the transition's source state.
 void setTargetName(java.lang.String newName)
          Sets the name of the transition's target state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCpStateTransition

public BasicCpStateTransition(int newType)
Constructs an BasicCpStateTransition object with the given transition type.

See CpStateTransition for the list of allowed types.

Parameters:
newType - The transition type.
Method Detail

getType

public int getType()
Description copied from interface: CpStateTransition
Return the transition's type.

Specified by:
getType in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The transition's type. The value will be one of: {NO_TYPE, SEND_MESSAGE, CHILD_RETURN, TIMEOUT}.

getTypeString

public java.lang.String getTypeString()
Description copied from interface: CpStateTransition
Returns a string corresponding to the transition's type.

Specified by:
getTypeString in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The string giving the transition's type.

getTypeFromString

public int getTypeFromString(java.lang.String str)
Description copied from interface: CpStateTransition
Returns the transition type matching the given string.

Does not change this transition's type. (This method would be static, if static methods were allowed for interfaces.)

Specified by:
getTypeFromString in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
str - The string for the transition type.
Returns:
The transition type correponding to the given string. If no match was found, returns NO_TYPE.

getName

public java.lang.String getName()
Description copied from interface: CpStateTransition
Returns the transition's name.

Specified by:
getName in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The transition's name.

setName

public void setName(java.lang.String newId)
Description copied from interface: CpStateTransition
Sets the transition's name.

Specified by:
setName in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
newName - The new name.

getSourceName

public java.lang.String getSourceName()
Description copied from interface: CpStateTransition
Returns the name of the transition's source state.

Specified by:
getSourceName in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The name of the transition's source state, or null if there isn't one.

setSourceName

public void setSourceName(java.lang.String newName)
Description copied from interface: CpStateTransition
Sets the name of the transition's source state.

This does not modify the source state itself, only the name stored in this transition. Therefore it should be used only in conjunction with calls to the CpState API to remove this transition from the old source state and add it to the new source state

Specified by:
setSourceName in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
newName - The new source state name.

getTargetName

public java.lang.String getTargetName()
Description copied from interface: CpStateTransition
Returns the name of the transition's target (or destination) state.

Specified by:
getTargetName in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The name of the transition's target state, or null if there isn't one.

setTargetName

public void setTargetName(java.lang.String newName)
Description copied from interface: CpStateTransition
Sets the name of the transition's target state.

This does not modify the target state itself, only the name stored in this transition. Therefore it should be used only in conjunction with calls to the CpState API to remove this transition from the old target state and add it to the new target state.

Specified by:
setTargetName in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
newName - The new target state name.

getMessageDescription

public MessageDescription getMessageDescription()
Description copied from interface: CpStateTransition
Returns the MessageDescription for the message associated with this transition.

This is meaningful only for send-message transitions.

Specified by:
getMessageDescription in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The MessageDescription for this transitions's message, or null if there isn't one.

setMessageDescription

public boolean setMessageDescription(MessageDescription newDesc)
Description copied from interface: CpStateTransition
Sets the MessageDescription for the message associated with this transition.

This is meaningful only for send-message transitions.

Specified by:
setMessageDescription in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
desc - The MessageDescription for this transitions's message.
Returns:
true if this transition is a send-message transition, false if not.

getSenderRole

public java.lang.String getSenderRole()
Description copied from interface: CpStateTransition
Returns the role that is the message sender.

This is meaningful only for send-message transitions.

Specified by:
getSenderRole in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The role that sends the message, or null if undefined.

setSenderRole

public boolean setSenderRole(java.lang.String newRole)
Description copied from interface: CpStateTransition
Sets the role that sends the message.

This is meaningful only for send-message transitions.

Specified by:
setSenderRole in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
newRole - the role that sends the mesage.
Returns:
true if this transition is a send-message transition, false if not.

getChildReturn

public java.lang.String getChildReturn()
Description copied from interface: CpStateTransition
Returns the child-return code.

This is meaningful only for child-return transitions.

Specified by:
getChildReturn in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Returns:
The child-return code, or null if undefined.

setChildReturn

public boolean setChildReturn(java.lang.String newReturn)
Description copied from interface: CpStateTransition
Sets the child-return code.

This is meaningful only for child-return transitions.

Specified by:
setChildReturn in interface CpStateTransition
Following copied from interface: com.ibm.conversation.CpStateTransition
Parameters:
newReturn - The new child-return code.
Returns:
true if this transition is a child-return transition, false if not.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003