com.massimo.tools.scriptrunner.work
Class PrintTask
java.lang.Object
com.massimo.tools.scriptrunner.AbstractTask
com.massimo.tools.scriptrunner.work.PrintTask
- All Implemented Interfaces:
- Task
public class PrintTask
- extends AbstractTask
Print to stdout, with parameter substitution
Methods inherited from class com.massimo.tools.scriptrunner.AbstractTask |
getBooleanProperty, getCurrentWorkingDirectory, getDefinition, getIntProperty, getName, getParent, getProperties, getStartProcessingRow, getText, getType, interrupt, isIgnoreableError, isIgnoreableError, isInterrupted, isLogProgress, postProcess, preProcess, process, resultCodeToString, substituteParameters, toString, validate, validateConnections, validateParameters |
PrintTask
public PrintTask(Task parent,
String type,
Element definition,
Map<String,String> connectionProperties)
- Parameters:
parent
- type
- definition
- connectionProperties
-
doProcess
protected int doProcess(ExecutionContext context)
- Implementing classes only need to do their own work and log progress when appropriate.
Substitute any parameters into the text of the task element and print to stdout.
- Specified by:
doProcess
in class AbstractTask
- Returns:
- O for success. Anything else is a failure.
- See Also:
AbstractTask.process(ExecutionContext)
doValidate
protected int doValidate(ValidationContext context)
- Check whether this task should be able to run.
Implementations should check for the prescence of files, attributes,...
The Task body cannot be empty.
- Specified by:
doValidate
in class AbstractTask
- Returns:
- O for success. Anything else is a failure.
getLogger
protected org.apache.log4j.Logger getLogger()
-
- Specified by:
getLogger
in class AbstractTask
- Returns:
- Class logger