org.springframework.rules.closure.support
Class AbstractElementGeneratorWorkflow
java.lang.Object
org.springframework.rules.closure.support.AbstractElementGenerator
org.springframework.rules.closure.support.AbstractElementGeneratorWorkflow
- All Implemented Interfaces:
- ClosureTemplate, ElementGenerator
- Direct Known Subclasses:
- IteratorTemplate
public abstract class AbstractElementGeneratorWorkflow
- extends AbstractElementGenerator
Convenient class to implement workflow.
- Author:
- Keith Donald
Method Summary |
protected void |
doCleanup()
Clean up after workflow. |
protected void |
doSetup()
Setup the workflow. |
protected abstract Object |
doWork()
|
protected abstract boolean |
hasMoreWork()
|
protected boolean |
processing()
|
void |
run(Closure templateCallback)
Execute the template with the specific closure callback for the insertion
of custom processing code. |
Methods inherited from class org.springframework.rules.closure.support.AbstractElementGenerator |
allTrue, anyTrue, findAll, findFirst, findFirst, getWrappedTemplate, isFinished, isRunning, isStopped, reset, runUntil, setCompleted, setRunning, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractElementGeneratorWorkflow
protected AbstractElementGeneratorWorkflow()
- See Also:
AbstractElementGenerator.AbstractElementGenerator()
AbstractElementGeneratorWorkflow
protected AbstractElementGeneratorWorkflow(boolean runOnce)
- See Also:
AbstractElementGenerator.AbstractElementGenerator(boolean)
run
public final void run(Closure templateCallback)
- Execute the template with the specific closure callback for the insertion
of custom processing code.
Defines the workflow sequence.
- Specified by:
run
in interface ClosureTemplate
- Specified by:
run
in class AbstractElementGenerator
- Parameters:
templateCallback
- The procedure callback.
doSetup
protected void doSetup()
- Setup the workflow.
processing
protected boolean processing()
- Returns:
true
if ElementGenerator is still processing.
hasMoreWork
protected abstract boolean hasMoreWork()
- Returns:
true
if more work has to be done.
doWork
protected abstract Object doWork()
- Returns:
- the object to process (with the given closure).
doCleanup
protected void doCleanup()
- Clean up after workflow.
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.