net.chaosserver.bilbo.task.manage
Class AggregateTask

java.lang.Object
  |
  +--net.chaosserver.bilbo.task.BaseTask
        |
        +--net.chaosserver.bilbo.task.RecursiveTask
              |
              +--net.chaosserver.bilbo.task.LeafFirstRecursiveTask
                    |
                    +--net.chaosserver.bilbo.task.manage.AggregateTask
All Implemented Interfaces:
Task

public class AggregateTask
extends LeafFirstRecursiveTask

Task used to aggregate mapping files.

This will take the mapping file in the current direcotory (assuming it is not the root) and place it into the mapping file in the directory one level up.

Since:
Bilbo 2.1

Field Summary
 
Fields inherited from class net.chaosserver.bilbo.task.BaseTask
settings
 
Constructor Summary
AggregateTask()
           
 
Method Summary
protected  void aggregateMapping(File currentDirectoryFile)
          Main functionality.
 void execute(File currentDirectory)
          If this is not the root directory, executes the task agaisnt the directory.
protected  void removeParentMapping(Directory currentDirectory, Directory parentDirectory)
          Removes the mapping from parent directory.
 
Methods inherited from class net.chaosserver.bilbo.task.LeafFirstRecursiveTask
executeRecursive
 
Methods inherited from class net.chaosserver.bilbo.task.RecursiveTask
executeSpecific, isRootDirectory
 
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

AggregateTask

public AggregateTask()
Method Detail

execute

public void execute(File currentDirectory)
             throws AggregateException
If this is not the root directory, executes the task agaisnt the directory.

Specified by:
execute in class RecursiveTask
Parameters:
currentDirectory - directory to execute task against
Throws:
AggregateException - indicates a system error

aggregateMapping

protected void aggregateMapping(File currentDirectoryFile)
                         throws AggregateException
Main functionality. Takes the current directory and places the mapping into the parent directories mapping.

Parameters:
currentDirectoryFile - the current directory
Throws:
AggregateException - indicates a system error

removeParentMapping

protected void removeParentMapping(Directory currentDirectory,
                                   Directory parentDirectory)
Removes the mapping from parent directory.

Parameters:
currentDirectory - the directory to remove from the parent's mapping
parentDirectory - the directory to remove the child mapping from


Copyright © 20030415