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

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.PickImpl
All Implemented Interfaces:
Activity, java.lang.Comparable, Pick, StructuredActivity

public class PickImpl
extends StructuredActivityImpl
implements Pick

Persistent implementation of the Pick interface.

See Also:
Pick

Constructor Summary
PickImpl()
           
 
Method Summary
 void addAlarmEvent(org.smartcomps.twister.engine.priv.core.definition.AlarmEvent event, org.smartcomps.twister.engine.priv.core.definition.Activity activity)
          Adds an alarm event to this Pick activity that triggers the provided activity when fired.
 void addMessageEvent(org.smartcomps.twister.engine.priv.core.definition.MessageEvent event, org.smartcomps.twister.engine.priv.core.definition.Activity activity)
          Adds a message event to this Pick activity that triggers the provided activity when fired.
 org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext execute(java.lang.String correlationSetName, java.util.Map correlation)
          Pick is one of the rare structured activity that can be directly executed.
 java.util.Map getActivityAlarmEvents()
          Builds a Map containing activities as keys and corresponding alarm events as values.
 java.util.Map getActivityMessageEvents()
          Builds a Map containing activities as keys and corresponding message events as values.
 org.smartcomps.twister.engine.priv.core.definition.AlarmEvent getAlarmEvent(org.smartcomps.twister.engine.priv.core.definition.Activity activity)
          Returns the alarm event associated with the provided activity.
 java.util.List getAlarmEvents()
           
 org.smartcomps.twister.engine.priv.core.definition.MessageEvent getMessageEvent(org.smartcomps.twister.engine.priv.core.definition.Activity activity)
          Returns the message event associated with the provided activity.
 java.util.List getMessageEvents()
          Returns the list of MessageEvent in the Pick structured activity.
 boolean isCreateInstance()
           
 void setAlarmEvents(java.util.List alarmEvents)
           
 void setCreateInstance(boolean createInstance)
           
 void setMessageEvents(java.util.List messageEvents)
           
 
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

PickImpl

public PickImpl()
Method Detail

isCreateInstance

public boolean isCreateInstance()
Specified by:
isCreateInstance in interface Pick

setCreateInstance

public void setCreateInstance(boolean createInstance)
Specified by:
setCreateInstance in interface Pick

getMessageEvents

public java.util.List getMessageEvents()
Description copied from interface: Pick
Returns the list of MessageEvent in the Pick structured activity. The MessageEvent objects in this list have the same positions as their corresponding activity in the Pick container.

Specified by:
getMessageEvents in interface Pick
Returns:

setMessageEvents

public void setMessageEvents(java.util.List messageEvents)

addMessageEvent

public void addMessageEvent(org.smartcomps.twister.engine.priv.core.definition.MessageEvent event,
                            org.smartcomps.twister.engine.priv.core.definition.Activity activity)
Description copied from interface: Pick
Adds a message event to this Pick activity that triggers the provided activity when fired. Message events must be added in the same order as activities have been created and registered in this container and before any alarm event.

Specified by:
addMessageEvent in interface Pick
Parameters:
event - the message event to wait for to fire the activity
activity - to start when the message event occurs

getActivityMessageEvents

public java.util.Map getActivityMessageEvents()
Description copied from interface: Pick
Builds a Map containing activities as keys and corresponding message events as values.

Specified by:
getActivityMessageEvents in interface Pick
Returns:
Map of activity / message event pairs

getMessageEvent

public org.smartcomps.twister.engine.priv.core.definition.MessageEvent getMessageEvent(org.smartcomps.twister.engine.priv.core.definition.Activity activity)
Description copied from interface: Pick
Returns the message event associated with the provided activity.

Specified by:
getMessageEvent in interface Pick
Parameters:
activity - associated with the wanted message event
Returns:
MessageEvent

getAlarmEvents

public java.util.List getAlarmEvents()

setAlarmEvents

public void setAlarmEvents(java.util.List alarmEvents)

addAlarmEvent

public void addAlarmEvent(org.smartcomps.twister.engine.priv.core.definition.AlarmEvent event,
                          org.smartcomps.twister.engine.priv.core.definition.Activity activity)
Description copied from interface: Pick
Adds an alarm event to this Pick activity that triggers the provided activity when fired. Alarm events must be added in the same order as activities have been created and registered in this container and after any message event.

Specified by:
addAlarmEvent in interface Pick
Parameters:
event - the alarm event to wait for to fire the activity
activity - to start when the message event occurs

getActivityAlarmEvents

public java.util.Map getActivityAlarmEvents()
Description copied from interface: Pick
Builds a Map containing activities as keys and corresponding alarm events as values.

Specified by:
getActivityAlarmEvents in interface Pick
Returns:
Map of activity / alarm event pairs

getAlarmEvent

public org.smartcomps.twister.engine.priv.core.definition.AlarmEvent getAlarmEvent(org.smartcomps.twister.engine.priv.core.definition.Activity activity)
Description copied from interface: Pick
Returns the alarm event associated with the provided activity.

Specified by:
getAlarmEvent in interface Pick
Parameters:
activity - associated with the wanted alarm event
Returns:
AlarmEvent

execute

public org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext execute(java.lang.String correlationSetName,
                                                                                java.util.Map correlation)
                                                                         throws EngineException
Description copied from interface: Pick
Pick is one of the rare structured activity that can be directly executed. Actually it's only one of its activity that will be executed but this execution is done in the scope of the Pick.

Specified by:
execute in interface Pick
Parameters:
correlationSetName -
correlation -
Returns:
Throws:
EngineException


Copyright © 2003 SmartComps. All Rights Reserved.