|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.chaosserver.bilbo.task.BaseTask | +--net.chaosserver.bilbo.task.RecursiveTask
Task that will recursively execute against a directory.
The concrete tasks will have methods to deal with only a single directory and this task will traverse the tree executing the subtask against it. The task will fully execute against a directory before moving on to the sub-directories.
Field Summary |
Fields inherited from class net.chaosserver.bilbo.task.BaseTask |
settings |
Constructor Summary | |
RecursiveTask()
|
Method Summary | |
protected abstract void |
execute(File currentDirectory)
Executes this task against the given directory |
protected abstract void |
executeRecursive(File currentDirectory)
Executes this task against the given directory and recursive against all subdirectories. |
void |
executeSpecific()
Executes this task against the rootDirectory provided in the settings object. |
protected boolean |
isRootDirectory(File directory)
Checks if the given directory is the root directory of the task. |
Methods inherited from class net.chaosserver.bilbo.task.BaseTask |
execute, getHelpResource, getSettings, parseTaskArguments, printHelp, setSettings |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RecursiveTask()
Method Detail |
public void executeSpecific() throws TaskException
This task will at least be executed against the rootDirectory in the settings object. If the recursive flag is on, then it will also be executed against each subdirectory.
executeSpecific
in class BaseTask
TaskException
- if something goes wrongprotected boolean isRootDirectory(File directory)
directory
- check if this is the root
protected abstract void executeRecursive(File currentDirectory) throws TaskException
currentDirectory
- the directory to execute the task against
TaskException
- is something goes wrongprotected abstract void execute(File currentDirectory) throws TaskException
currentDirectory
- the directory to execute the task against
TaskException
- is something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |