biz.hammurapi.web.interaction
Class InteractionInstance.StepInstance

java.lang.Object
  extended bybiz.hammurapi.sql.DatabaseObject
      extended bybiz.hammurapi.web.interaction.sql.InteractionStepInstanceImpl
          extended bybiz.hammurapi.web.interaction.InteractionInstance.StepInstance
All Implemented Interfaces:
biz.hammurapi.util.Attributable, java.lang.Cloneable, biz.hammurapi.sql.columns.ColumnChangeListener, java.lang.Comparable, biz.hammurapi.config.Context, biz.hammurapi.config.ContextConfigurable, biz.hammurapi.config.DomConfigurable, biz.hammurapi.xml.dom.DomSerializable, biz.hammurapi.sql.IDatabaseObject, biz.hammurapi.web.interaction.sql.InteractionStepInstance, biz.hammurapi.util.Observable, java.io.Serializable, biz.hammurapi.util.Versioned, biz.hammurapi.util.Visitable
Enclosing class:
InteractionInstance

public class InteractionInstance.StepInstance
extends biz.hammurapi.web.interaction.sql.InteractionStepInstanceImpl
implements biz.hammurapi.util.Visitable, java.lang.Comparable

Step instance

Author:
Pavel Vlasov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class biz.hammurapi.web.interaction.sql.InteractionStepInstanceImpl
ActivatorId, FinishTime, Id, Inputs, OwnerId, PropertySet, SeqId, StartTime, Status, StepId, UserId
 
Fields inherited from class biz.hammurapi.sql.DatabaseObject
columns, objectVersion, originalVersion
 
Constructor Summary
InteractionInstance.StepInstance(boolean force)
           
InteractionInstance.StepInstance(java.sql.ResultSet rs)
           
 
Method Summary
 boolean accept(biz.hammurapi.util.Visitor visitor)
           
 DynaBind action(java.util.Map context)
          Executes action code.
 int compareTo(java.lang.Object arg)
           
 InteractionFactory.InteractionDefinition.StepDefinition getDefinition()
           
 java.util.Collection getInputTransitions()
           
 java.util.Collection getOutputTransitions()
           
 InteractionInstance getOwner()
           
 InteractionInstance.StepInstance getPredecessor(java.lang.String name)
          Traverses predecessors and returns the first found with given definition name.
 java.util.Collection getPredecessors()
           
 PropertySet getProperties()
          Creates property set or retrieves it from the database.
 java.lang.Object getProperty(java.lang.String name)
          Convenience method to retrieve interaction instance properties.
 java.lang.Object getProperty(java.lang.String name, boolean cascade)
          Convenience method to retrieve interaction instance properties.
 InteractionInstance.TransitionInstance getSingleInputTransition()
           
 java.util.Collection getSuccessors()
           
 void rewind()
          Rewinds this step instance and its successors.
 void toDom(org.w3c.dom.Element holder)
           
 void update()
          Updates step information in the database
 
Methods inherited from class biz.hammurapi.web.interaction.sql.InteractionStepInstanceImpl
clone, getActivatorId, getFinishTime, getId, getInputs, getOwnerId, getPropertySet, getSeqId, getStartTime, getStatus, getStepId, getUserId, project, project, setActivatorId, setFinishTime, setId, setInputs, setOwnerId, setPropertySet, setSeqId, setStartTime, setStatus, setStepId, setUserId
 
Methods inherited from class biz.hammurapi.sql.DatabaseObject
addColumn, addObserver, addRelationship, clear, configure, configure, copy, delete, equals, fromDom, fromDom, get, getAttribute, getColumn, getColumnAttribute, getObjectVersion, getRelationship, getSqlType, hashCode, insert, isDeleted, isModified, loadRelationships, onChange, removeAttribute, removeColumnAttribute, removeObserver, setAttribute, setColumnAttribute, setOriginal, toDom, toString, update
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InteractionInstance.StepInstance

public InteractionInstance.StepInstance(boolean force)

InteractionInstance.StepInstance

public InteractionInstance.StepInstance(java.sql.ResultSet rs)
                                 throws java.sql.SQLException
Method Detail

getDefinition

public InteractionFactory.InteractionDefinition.StepDefinition getDefinition()
                                                                      throws java.sql.SQLException
Throws:
java.sql.SQLException

rewind

public void rewind()
            throws java.sql.SQLException
Rewinds this step instance and its successors. All successive steps change status to "rewound".

Throws:
java.sql.SQLException

getInputTransitions

public java.util.Collection getInputTransitions()
Returns:
Collection of input transition instances.

getSingleInputTransition

public InteractionInstance.TransitionInstance getSingleInputTransition()
Returns:
TransactionInstance if this step has single input, null otherwise.

getOutputTransitions

public java.util.Collection getOutputTransitions()
Returns:
Collection of output transition instances

getPredecessors

public java.util.Collection getPredecessors()
Returns:
Step instances which transitioned to this step.

getPredecessor

public InteractionInstance.StepInstance getPredecessor(java.lang.String name)
                                                throws java.sql.SQLException
Traverses predecessors and returns the first found with given definition name.

Parameters:
name -
Returns:
Throws:
java.sql.SQLException

getSuccessors

public java.util.Collection getSuccessors()
Returns:
Step instances which step transitions to.

action

public DynaBind action(java.util.Map context)
                throws HammurapiWebException
Executes action code.

Parameters:
context - evaluation context.
Returns:
If 'false' then interaction instance does not get created.
Throws:
HammurapiWebException

getProperties

public PropertySet getProperties()
                          throws java.sql.SQLException
Creates property set or retrieves it from the database.

Throws:
java.sql.SQLException

getProperty

public java.lang.Object getProperty(java.lang.String name)
Convenience method to retrieve interaction instance properties.

Parameters:
name -
Returns:
Throws:
java.sql.SQLException

getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    boolean cascade)
Convenience method to retrieve interaction instance properties.

Parameters:
name -
cascade - - If true then this method cascades to
Returns:
Throws:
java.sql.SQLException

toDom

public void toDom(org.w3c.dom.Element holder)
Specified by:
toDom in interface biz.hammurapi.xml.dom.DomSerializable

update

public void update()
            throws java.sql.SQLException
Updates step information in the database

Throws:
java.sql.SQLException

accept

public boolean accept(biz.hammurapi.util.Visitor visitor)
Specified by:
accept in interface biz.hammurapi.util.Visitable

compareTo

public int compareTo(java.lang.Object arg)
Specified by:
compareTo in interface java.lang.Comparable

getOwner

public InteractionInstance getOwner()
Returns:
Owner interaction instance


Copyright © 2006 Hammurapi Group. All Rights Reserved.