|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--com.ls.util.taskrun.TaskRunner
This class executes scripts which are defined as xml documents.
| Constructor Summary | |
TaskRunner()
|
|
| Method Summary | |
void |
execute()
Executes the task batch according to the task definitions. |
Map |
getEnvironment()
Returns the environment used for execution the task batch. |
ILogger |
getLogger()
Returns the logger instance to which this class and all associated task objects will report information to. |
void |
setLogger(ILogger logger)
Sets the logger instance that will handle log requests from this class and all associated tasks. |
void |
setScript(String fileName)
Initializes this task runner with tasks defined in the xml file denoted by the given argument. |
void |
setScript(XMLFragment script)
Initializes this task runner with tasks defined in the given xml structure. |
void |
setTaskBatch(XMLFragment taskBatch)
Initializes this task runner with the task batch contained in the given xml structure. |
void |
setTaskDef(XMLFragment taskDef)
Initializes this task runner with task definitions contained in the given xml structure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TaskRunner()
| Method Detail |
public ILogger getLogger()
public void setLogger(ILogger logger)
logger - The logger instance.
public void setScript(String fileName)
throws FileNotFoundException,
XMLException
fileName - The xml file which contains all necessary parts of a script file, the script-, taskdef-
and taskbatch-elements.FileNotFoundException - If the given file does not exist.XMLException - If the xml file could not be parsed. It might be invalid formatted.
public void setScript(XMLFragment script)
throws XMLException
script - The xml structure containing the required parts of a script, the script-, taskdef- and
taskbatch-elements.XMLException - If the xml structure is not of the expected format.
public void setTaskDef(XMLFragment taskDef)
throws XMLException
taskDef - The xml structure containing task definitions. This means, that its root element is the
taskdef-element.XMLException - If the xml structure is not of the expected format.
public void setTaskBatch(XMLFragment taskBatch)
throws XMLException
taskBatch - The xml structure containing task batch. This means, that its root element is the
taskbatch-element.XMLException - If the xml structure is not of the expected format.public Map getEnvironment()
public void execute()
IllegalStateException.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||