org.smartcomps.twister.engine.priv.core.definition.impl
Class SwitchImpl

java.lang.Object
  |
  +--org.smartcomps.twister.engine.priv.core.definition.impl.ActivityImpl
        |
        +--org.smartcomps.twister.engine.priv.core.definition.impl.StructuredActivityImpl
              |
              +--org.smartcomps.twister.engine.priv.core.definition.impl.SwitchImpl
All Implemented Interfaces:
Activity, java.lang.Comparable, StructuredActivity, Switch

public class SwitchImpl
extends StructuredActivityImpl
implements Switch

Persistent implementation of the Switch interface.

See Also:
Switch

Constructor Summary
SwitchImpl()
           
 
Method Summary
 void addCondition(java.lang.String condition, org.smartcomps.twister.engine.priv.core.definition.Activity activity)
          Adds conditions to this Switch with their activities.
 java.util.SortedMap getActivityConditions()
          Returns a SortedMap containing the activities as keys ordered as they have been inserted in this container and their conditions as values.
 java.lang.String getCondition(int index)
          Returns the condition at index.
 java.util.List getConditions()
           
 void setConditions(java.util.List conditions)
           
 void setOtherwise(org.smartcomps.twister.engine.priv.core.definition.Activity activity)
          Sets an Activity as the otherwise for this Switch.
 
Methods inherited from class org.smartcomps.twister.engine.priv.core.definition.impl.StructuredActivityImpl
addActivity, addExecutionContext, getActivities, getActivitySet, getExecutionContexts, setActivities, setActivitySet, setExecutionContexts
 
Methods inherited from class org.smartcomps.twister.engine.priv.core.definition.impl.ActivityImpl
compareTo, createContextTree, fetchProcess, getActivityContainer, getContainer, getId, getIndex, getJoinCondition, getName, getProcess, getProcessSet, getSourceLinks, getTargetLinks, setActivityContainer, setContainer, setId, setIndex, setJoinCondition, setName, setProcess, setProcessSet, setSourceLinks, setTargetLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.smartcomps.twister.engine.priv.core.definition.StructuredActivity
addActivity, addExecutionContext, getActivities, getExecutionContexts
 
Methods inherited from interface org.smartcomps.twister.engine.priv.core.definition.Activity
fetchProcess, getContainer, getJoinCondition, getName, getProcess, getSourceLinks, getTargetLinks, setJoinCondition, setName, setSourceLinks, setTargetLinks
 

Constructor Detail

SwitchImpl

public SwitchImpl()
Method Detail

addCondition

public void addCondition(java.lang.String condition,
                         org.smartcomps.twister.engine.priv.core.definition.Activity activity)
Description copied from interface: Switch
Adds conditions to this Switch with their activities. Conditions must be added in the same order as their activities have been created and assigned to this container.

Specified by:
addCondition in interface Switch
Parameters:
condition -
activity -

getConditions

public java.util.List getConditions()
Specified by:
getConditions in interface Switch

getActivityConditions

public java.util.SortedMap getActivityConditions()
Description copied from interface: Switch
Returns a SortedMap containing the activities as keys ordered as they have been inserted in this container and their conditions as values.

Specified by:
getActivityConditions in interface Switch
Returns:
SortedMap ordered map of Activity/Condition pairs.

setConditions

public void setConditions(java.util.List conditions)

getCondition

public java.lang.String getCondition(int index)
Description copied from interface: Switch
Returns the condition at index.

Specified by:
getCondition in interface Switch
Parameters:
index -
Returns:
int

setOtherwise

public void setOtherwise(org.smartcomps.twister.engine.priv.core.definition.Activity activity)
Description copied from interface: Switch
Sets an Activity as the otherwise for this Switch. The otherwise activity must have been added last in this container (when created).

Specified by:
setOtherwise in interface Switch
Parameters:
activity -


Copyright © 2003 SmartComps. All Rights Reserved.