org.ikasan.framework.flow
Class FlowElementImpl

java.lang.Object
  extended by org.ikasan.framework.flow.FlowElementImpl
All Implemented Interfaces:
FlowElement

public class FlowElementImpl
extends Object
implements FlowElement

Simple implementation of FlowElement

Author:
Ikasan Development Team

Field Summary
 
Fields inherited from interface org.ikasan.framework.flow.FlowElement
DEFAULT_TRANSITION_NAME
 
Constructor Summary
FlowElementImpl(String componentName, FlowComponent flowComponent)
          Overloaded constructor for a FlowElement with no downstream
FlowElementImpl(String componentName, FlowComponent flowComponent, FlowElement defaultTransition)
          Overloaded constructor for when there is at most one subsequent FlowElement
FlowElementImpl(String componentName, FlowComponent flowComponent, Map<String,FlowElement> transitions)
          Constructor for when there are more than one subsequent FlowElements
 
Method Summary
 String getComponentName()
          Accessor for the componentName.
 String getDescription()
          Returns a human readable description of this FlowElement
 FlowComponent getFlowComponent()
          Accessor for the wrapped FlowComponent
 FlowElement getTransition(String transitionName)
          Retrieves the subsequent FlowElement (if any) representing the next node in the flow
 Map<String,FlowElement> getTransitions()
          Retrieves a Map of all this FlowElement's transitions
 void setDescription(String description)
          Setter for description
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowElementImpl

public FlowElementImpl(String componentName,
                       FlowComponent flowComponent,
                       Map<String,FlowElement> transitions)
Constructor for when there are more than one subsequent FlowElements

Parameters:
componentName - The name of the component
flowComponent - The FlowComponent
transitions - A map of transitions

FlowElementImpl

public FlowElementImpl(String componentName,
                       FlowComponent flowComponent,
                       FlowElement defaultTransition)
Overloaded constructor for when there is at most one subsequent FlowElement

Parameters:
componentName - The name of the component
flowComponent - The FlowComponent
defaultTransition - The default transition

FlowElementImpl

public FlowElementImpl(String componentName,
                       FlowComponent flowComponent)
Overloaded constructor for a FlowElement with no downstream

Parameters:
componentName - The name of the component
flowComponent - The FlowComponent
Method Detail

getFlowComponent

public FlowComponent getFlowComponent()
Description copied from interface: FlowElement
Accessor for the wrapped FlowComponent

Specified by:
getFlowComponent in interface FlowElement
Returns:
FlowComponent

getComponentName

public String getComponentName()
Description copied from interface: FlowElement
Accessor for the componentName. This is the unique identifier for a FlowElement

Specified by:
getComponentName in interface FlowElement
Returns:
componentName

getTransition

public FlowElement getTransition(String transitionName)
Description copied from interface: FlowElement
Retrieves the subsequent FlowElement (if any) representing the next node in the flow

Specified by:
getTransition in interface FlowElement
Parameters:
transitionName - - this value should be a member of the set of possible results returnable from the wrapped flowComponent
Returns:
FlowElement representing the next node in the flow

getDescription

public String getDescription()
Description copied from interface: FlowElement
Returns a human readable description of this FlowElement

Specified by:
getDescription in interface FlowElement
Returns:
String description

setDescription

public void setDescription(String description)
Setter for description

Parameters:
description -

toString

public String toString()
Overrides:
toString in class Object

getTransitions

public Map<String,FlowElement> getTransitions()
Description copied from interface: FlowElement
Retrieves a Map of all this FlowElement's transitions

Specified by:
getTransitions in interface FlowElement
Returns:
a Map of all this FlowElement's transitions


Copyright © 2007-2012 Ikasan. All Rights Reserved.