IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.automaton
Class DSEGuardCondition

java.lang.Object
  extended by com.ibm.btt.automaton.DSEGuardCondition
All Implemented Interfaces:
GuardCondition, java.io.Externalizable, java.io.Serializable

public abstract class DSEGuardCondition
extends java.lang.Object
implements GuardCondition, Externalizable

Default implementation of a GuardCondition

Additional description

See Also:
Serialized Form

Field Summary
static java.lang.String ABORT_PROCESS
           
static java.lang.String CHANGE_STATE
           
protected  boolean conditionResult
           
protected  Context context
           
static java.lang.String CONTINUE
           
static java.lang.String EXECUTE_ACTION_AND_CHANGESTATE
           
protected  java.lang.String id
           
protected  java.lang.String newStateNameOnFalse
           
protected  java.lang.String newStateNameOnTrue
           
static java.lang.String ON_FALSE
           
static java.lang.String ON_TRUE
           
protected  int onFalse
           
protected  int onTrue
           
 Hashtable parms
           
static java.lang.String SKIP_ACTION
           
static java.lang.String SKIP_ALL_ACTIONS
           
static java.lang.String SKIP_CONDITIONS
           
protected  BTTProcessorEventObject sourceEvent
           
 
Constructor Summary
DSEGuardCondition()
          Creates an instance of type DSEGuardCondition.
 
Method Summary
abstract  boolean evaluate()
          Abstract method to be implemented by implementations of the DSEGuardCondition object.
 Externalizer externalizer()
          This method gets the externalizer instance used to build.
 boolean getConditionResult()
          Returns a boolean indicating if the result of the condition is true or false
 Context getContext()
          Returns the value of the context property.
 java.lang.String getName()
          Returns the value of the id property.
 java.lang.String getNewStateName()
          Returns the value of the NewStateName property.
 int getOnFalse()
          Returns the value of the onFalse property.
 int getOnTrue()
          Returns the value of the onTrue property.
 BTTProcessorEventObject getSourceEvent()
          Returns the value of the sourceEvent property.
 java.lang.Object initializeFrom(Tag aTag)
          Method to initialize the guard condition from a Tag, reads in the flow modifiers specified in the external files for onTrue and onFalse, and sets the appropriate fields.
 void readExternal()
          This method will find the tag that corresponds to the name of THIS entity.
 void readExternal(java.io.ObjectInput in)
          Invokes the object creation from an ObjectInput.
 void removeExternal()
          Removes the Externalizer.
 void setConditionResult(boolean result)
          Sets a boolean indicating if the result of the condition is true or false
 void setContext(Context aContext)
          Sets the Context for the guardCondition using the parameter (the Action's context).
 void setName(java.lang.String aName)
          Sets the value of the id property.
 void setNewStateName(java.lang.String aName)
          Sets the value of the NewStateName property.
 void setOnFalse(int newOnFalse)
          Sets the value of the onFalse property.
 void setOnTrue(int newOnTrue)
          Sets the value of the onTrue property.
 void setSourceEvent(BTTProcessorEventObject newSourceEvent)
          Sets the value of the sourceEvent property.
 java.lang.String toString()
          Returns a String representing the guardcondition.
 Vector toStrings()
          Returns a Vector with the String representation of the object.
 Vector toTags()
          Returns a Vector with the object represented as a Tag.
 void writeExternal()
          Writes this instance (converted into tags) to a file.
 void writeExternal(java.io.ObjectOutput out)
          Provides concrete serialization handling for DSEGuardCondition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceEvent

protected BTTProcessorEventObject sourceEvent

id

protected java.lang.String id

newStateNameOnTrue

protected java.lang.String newStateNameOnTrue

newStateNameOnFalse

protected java.lang.String newStateNameOnFalse

context

protected Context context

onTrue

protected int onTrue

onFalse

protected int onFalse

conditionResult

protected boolean conditionResult

parms

public Hashtable parms

ON_TRUE

public static final java.lang.String ON_TRUE
See Also:
Constant Field Values

ON_FALSE

public static final java.lang.String ON_FALSE
See Also:
Constant Field Values

CONTINUE

public static final java.lang.String CONTINUE
See Also:
Constant Field Values

SKIP_CONDITIONS

public static final java.lang.String SKIP_CONDITIONS
See Also:
Constant Field Values

SKIP_ACTION

public static final java.lang.String SKIP_ACTION
See Also:
Constant Field Values

SKIP_ALL_ACTIONS

public static final java.lang.String SKIP_ALL_ACTIONS
See Also:
Constant Field Values

ABORT_PROCESS

public static final java.lang.String ABORT_PROCESS
See Also:
Constant Field Values

CHANGE_STATE

public static final java.lang.String CHANGE_STATE
See Also:
Constant Field Values

EXECUTE_ACTION_AND_CHANGESTATE

public static final java.lang.String EXECUTE_ACTION_AND_CHANGESTATE
See Also:
Constant Field Values
Constructor Detail

DSEGuardCondition

public DSEGuardCondition()
Creates an instance of type DSEGuardCondition.

Method Detail

evaluate

public abstract boolean evaluate()
Abstract method to be implemented by implementations of the DSEGuardCondition object. Method evaluates if the GuardCondition has been met (i.e. business logic).

Specified by:
evaluate in interface GuardCondition
Returns:
boolean

externalizer

public Externalizer externalizer()
                          throws java.io.IOException
This method gets the externalizer instance used to build. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Externalizer
Throws:
java.lang.IOException
java.io.IOException

getConditionResult

public boolean getConditionResult()
Returns a boolean indicating if the result of the condition is true or false

Specified by:
getConditionResult in interface GuardCondition

getContext

public Context getContext()
Returns the value of the context property. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Context

getName

public java.lang.String getName()
Returns the value of the id property.

Returns:
java.lang.String

getNewStateName

public java.lang.String getNewStateName()
Returns the value of the NewStateName property.

Specified by:
getNewStateName in interface GuardCondition
Returns:
java.lang.String

getOnFalse

public int getOnFalse()
Returns the value of the onFalse property.

Specified by:
getOnFalse in interface GuardCondition
Returns:
int

getOnTrue

public int getOnTrue()
Returns the value of the onTrue property.

Specified by:
getOnTrue in interface GuardCondition
Returns:
int

getSourceEvent

public BTTProcessorEventObject getSourceEvent()
Returns the value of the sourceEvent property.

Specified by:
getSourceEvent in interface GuardCondition
Returns:
com.ibm.btt.base.BTTProcessorEventObject

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Method to initialize the guard condition from a Tag, reads in the flow modifiers specified in the external files for onTrue and onFalse, and sets the appropriate fields. This method is an Externalizable interface method.

Parameters:
aTag - com.ibm.btt.base.Tag Contains the name and attributes of the object to be created.
Returns:
Object - An instance of DSEGuardCondition.
Throws:
java.io.IOException - The object can not be created.
DSEException

readExternal

public void readExternal()
                  throws java.io.IOException
This method will find the tag that corresponds to the name of THIS entity. Then it will initialize THIS entity with the contents of the tag

Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - java.io.ObjectInput
Throws:
java.io.IOException
java.lang.ClassNotFoundException

removeExternal

public void removeExternal()
                    throws java.io.IOException
Removes the Externalizer. This method is an Externalizable interface method.

Throws:
java.lang.IOException
java.io.IOException

setConditionResult

public void setConditionResult(boolean result)
Sets a boolean indicating if the result of the condition is true or false

Specified by:
setConditionResult in interface GuardCondition

setContext

public void setContext(Context aContext)
Sets the Context for the guardCondition using the parameter (the Action's context).

Specified by:
setContext in interface GuardCondition
Parameters:
aContext - com.ibm.btt.base.Context

setName

public void setName(java.lang.String aName)
Sets the value of the id property.

Parameters:
aName - java.lang.String

setNewStateName

public void setNewStateName(java.lang.String aName)
Sets the value of the NewStateName property.

Specified by:
setNewStateName in interface GuardCondition
Parameters:
aName - java.lang.String

setOnFalse

public void setOnFalse(int newOnFalse)
Sets the value of the onFalse property.

Specified by:
setOnFalse in interface GuardCondition
Parameters:
newOnFalse - int

setOnTrue

public void setOnTrue(int newOnTrue)
Sets the value of the onTrue property.

Specified by:
setOnTrue in interface GuardCondition
Parameters:
newOnTrue - int

setSourceEvent

public void setSourceEvent(BTTProcessorEventObject newSourceEvent)
Sets the value of the sourceEvent property.

Specified by:
setSourceEvent in interface GuardCondition
Parameters:
newSourceEvent - com.ibm.btt.base.DSEEventObject

toString

public java.lang.String toString()
Returns a String representing the guardcondition.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String.

toStrings

public Vector toStrings()
Returns a Vector with the String representation of the object. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Vector

toTags

public Vector toTags()
              throws java.io.IOException
Returns a Vector with the object represented as a Tag. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Vector
Throws:
java.io.IOException

writeExternal

public void writeExternal()
                   throws java.io.IOException
Writes this instance (converted into tags) to a file. This method is an Externalizable interface method.

Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Provides concrete serialization handling for DSEGuardCondition.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - java.io.ObjectOutput
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009