org.objectweb.jonas_lib.deployment.work
Class EarCleanTask

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

public class EarCleanTask
extends AbsCleanTask

JOnAS Ear unused directory clean task class. This class provides a way for removing directories wich are unconsistent directories for ear files.

Author:
Florent BENOIT, Benoit PELLETIER

Constructor Summary
EarCleanTask(java.net.URL earApps, DeployerLog earDeployerLog)
          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  void 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

EarCleanTask

public EarCleanTask(java.net.URL earApps,
                    DeployerLog earDeployerLog)
Default constructor : Construct a new cleaner.

Parameters:
earApps - the jonasroot apps directory
earDeployerLog - 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 void 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
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