|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.massimo.tools.scriptrunner.AbstractTask
com.massimo.tools.scriptrunner.control.AbstractCompoundTask
public abstract class AbstractCompoundTask
An AbstractCompoundTask will run multiple component Tasks.
Field Summary |
---|
Fields inherited from class com.massimo.tools.scriptrunner.AbstractTask |
---|
definition, name, parent, properties, type |
Fields inherited from interface com.massimo.tools.scriptrunner.Task |
---|
DATA_ERROR, ERROR, FINISHED, INTERRUPTED, PROMPT, RUNNING, START, SUCCESS |
Constructor Summary | |
---|---|
AbstractCompoundTask(Task parent,
String type,
Element definition,
Map<String,String> parentProperties)
|
Method Summary | |
---|---|
protected void |
addChild(Task child)
Any sub-class should call this as soon as it creates a child. |
protected int |
doProcess(ExecutionContext context)
Implementing classes only need to do their own work and log progress when appropriate. |
protected int |
doValidate(ValidationContext context)
Check whether this task should be able to run. |
protected Iterator<Task> |
getChildren()
Provides access to the list of child to sub-classes |
void |
interrupt()
Tells the Task to stop processing. |
protected abstract int |
processCompound(ExecutionContext context,
Elements tasks)
Process any and all child tasks. |
Methods inherited from class com.massimo.tools.scriptrunner.AbstractTask |
---|
getBooleanProperty, getCurrentWorkingDirectory, getDefinition, getIntProperty, getLogger, getName, getParent, getProperties, getStartProcessingRow, getText, getType, isIgnoreableError, isIgnoreableError, isInterrupted, isLogProgress, postProcess, preProcess, process, resultCodeToString, substituteParameters, toString, validate, validateConnections, validateParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractCompoundTask(Task parent, String type, Element definition, Map<String,String> parentProperties)
parent
- A parent Task, or null for the root Task.type
- The type of task, e.g. SQL, Print, Serialdefinition
- Task to execute, including new connection properties.parentProperties
- Method Detail |
---|
protected void addChild(Task child)
child
- A Task to add to the list of childrenprotected int doProcess(ExecutionContext context) throws Exception
doProcess
in class AbstractTask
Exception
AbstractTask.process(ExecutionContext)
protected int doValidate(ValidationContext context) throws Exception
doValidate
in class AbstractTask
Exception
protected Iterator<Task> getChildren()
public void interrupt()
interrupt
in interface Task
interrupt
in class AbstractTask
protected abstract int processCompound(ExecutionContext context, Elements tasks) throws Exception
context
- tasks
- A list of Task definition Elements
Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |