org.objectweb.jonas_lib.deployment.work
Class WarCleanTask

java.lang.Object
  extended byorg.objectweb.jonas_lib.deployment.work.AbsCleanTask
      extended byorg.objectweb.jonas_lib.deployment.work.WarCleanTask

public class WarCleanTask
extends AbsCleanTask

JOnAS War unused copy clean task class. This class provides a way for removing copies which are inconsistent for war files.

Author:
Florent BENOIT, Benoit PELLETIER

Constructor Summary
WarCleanTask(DeployerLog warDeployerLog)
          Default constructor : Construct a new cleaner.
 
Method Summary
protected  java.util.Vector getLogEntries()
          Gets the log entries
protected  boolean isDeployLogEntry(LogEntry logEntry)
          Check if the package pointed by the log entry is currently deploy
protected  boolean isValidLogEntry(LogEntry logEntry)
          Return true if the work copy exists and is up to date
protected  boolean removeLogEntry(LogEntry logEntry)
          Remove the work copy specified in the log entry and the log entry
 
Methods inherited from class org.objectweb.jonas_lib.deployment.work.AbsCleanTask
execute, getLogger, removeRecursiveDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarCleanTask

public WarCleanTask(DeployerLog warDeployerLog)
Default constructor : Construct a new cleaner.

Parameters:
warDeployerLog - the deployer logger
Method Detail

isValidLogEntry

protected boolean isValidLogEntry(LogEntry logEntry)
                           throws CleanerException
Return true if the work copy exists and is up to date

Specified by:
isValidLogEntry in class AbsCleanTask
Parameters:
logEntry - entry in a deploy log
Returns:
true if the work copy exists and is up to date
Throws:
CleanerException - if it fails

removeLogEntry

protected boolean removeLogEntry(LogEntry logEntry)
                          throws CleanerException
Remove the work copy specified in the log entry and the log entry

Specified by:
removeLogEntry in class AbsCleanTask
Parameters:
logEntry - entry in a deploy log
Returns:
true if the log entry has been removed successfully
Throws:
CleanerException - if it fails

getLogEntries

protected java.util.Vector getLogEntries()
Gets the log entries

Specified by:
getLogEntries in class AbsCleanTask
Returns:
the log entries

isDeployLogEntry

protected boolean isDeployLogEntry(LogEntry logEntry)
                            throws CleanerException
Check if the package pointed by the log entry is currently deploy

Specified by:
isDeployLogEntry in class AbsCleanTask
Parameters:
logEntry - entry in a deploy log
Returns:
true if the package pointed by the log entry is currently deployed
Throws:
CleanerException - if it fails