org.zeroexchange.flow
Class AbstractFlow<D>

java.lang.Object
  extended by org.zeroexchange.flow.AbstractFlow<D>
All Implemented Interfaces:
Flow<D>

public abstract class AbstractFlow<D>
extends Object
implements Flow<D>

Author:
black

Field Summary
 
Fields inherited from interface org.zeroexchange.flow.Flow
FLOWNAME_DEFAULT
 
Constructor Summary
AbstractFlow()
           
 
Method Summary
protected  Step<D> getCurrentStep()
          Returns the current step.
protected abstract  Step<D> getFirstStep()
          Returns the first step
protected abstract  Step<D> getStep(String nextStepDiscriminator)
          Returns the step by id
protected abstract  boolean isNextStepAllowed(String nextStepDiscriminator)
          Returns true if the next step is allowed.
 void jumpBack(String stepDiscriminator)
          Jumps to the one of previous steps.
 void next()
          Moves to the default next step.
 void next(String nextStepDiscriminator)
          Moves to the next step.
 void next(String nextStepDiscriminator, Map<String,Object> actionData)
          Moves to the next step.
 Object prev()
          Moves to the previous step from the stack.
 void start(Map<String,?> actionData)
          Moves to first step.
protected  void startNextStep(Step<D> step, D flowData, Map<String,?> actionData)
          Starts the step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zeroexchange.flow.Flow
getStepManager
 

Constructor Detail

AbstractFlow

public AbstractFlow()
Method Detail

start

public void start(Map<String,?> actionData)
Moves to first step.

Specified by:
start in interface Flow<D>

next

public void next()
Moves to the default next step.

Specified by:
next in interface Flow<D>

next

public void next(String nextStepDiscriminator)
Moves to the next step.

Specified by:
next in interface Flow<D>

next

public void next(String nextStepDiscriminator,
                 Map<String,Object> actionData)
Moves to the next step.

Specified by:
next in interface Flow<D>

prev

public Object prev()
Moves to the previous step from the stack.

Specified by:
prev in interface Flow<D>

startNextStep

protected void startNextStep(Step<D> step,
                             D flowData,
                             Map<String,?> actionData)
Starts the step.


getCurrentStep

protected Step<D> getCurrentStep()
Returns the current step.


jumpBack

public void jumpBack(String stepDiscriminator)
Description copied from interface: Flow
Jumps to the one of previous steps.

Specified by:
jumpBack in interface Flow<D>

isNextStepAllowed

protected abstract boolean isNextStepAllowed(String nextStepDiscriminator)
Returns true if the next step is allowed.


getStep

protected abstract Step<D> getStep(String nextStepDiscriminator)
Returns the step by id


getFirstStep

protected abstract Step<D> getFirstStep()
Returns the first step



Copyright © 2013. All Rights Reserved.