org.ow2.jonas.ear.internal
Class EarCleanTask

java.lang.Object
  extended by org.ow2.jonas.lib.work.AbsCleanTask
      extended by org.ow2.jonas.ear.internal.EarCleanTask

public class EarCleanTask
extends org.ow2.jonas.lib.work.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(org.ow2.jonas.ear.EarService earService, URL earApps, org.ow2.jonas.lib.work.DeployerLog earDeployerLog)
          Default constructor : Construct a new cleaner.
 
Method Summary
protected  Vector getLogEntries()
          Gets the log entries.
protected  boolean isDeployLogEntry(org.ow2.jonas.lib.work.LogEntry logEntry)
          Check if the package pointed by the log entry is currently deploy.
protected  boolean isValidLogEntry(org.ow2.jonas.lib.work.LogEntry logEntry)
          Return true if the work copy exists and is up to date.
protected  void removeLogEntry(org.ow2.jonas.lib.work.LogEntry logEntry)
          Remove the work copy specified in the log entry and the log entry.
 
Methods inherited from class org.ow2.jonas.lib.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(org.ow2.jonas.ear.EarService earService,
                    URL earApps,
                    org.ow2.jonas.lib.work.DeployerLog earDeployerLog)
Default constructor : Construct a new cleaner.

Parameters:
earService - EarService instance
earApps - the jonasroot apps directory
earDeployerLog - the deployer logger
Method Detail

isValidLogEntry

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

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

removeLogEntry

protected void removeLogEntry(org.ow2.jonas.lib.work.LogEntry logEntry)
                       throws org.ow2.jonas.lib.work.CleanerException
Remove the work copy specified in the log entry and the log entry.

Specified by:
removeLogEntry in class org.ow2.jonas.lib.work.AbsCleanTask
Parameters:
logEntry - entry in a deploy log
Throws:
org.ow2.jonas.lib.work.CleanerException - if it fails

getLogEntries

protected Vector getLogEntries()
Gets the log entries.

Specified by:
getLogEntries in class org.ow2.jonas.lib.work.AbsCleanTask
Returns:
the log entries

isDeployLogEntry

protected boolean isDeployLogEntry(org.ow2.jonas.lib.work.LogEntry logEntry)
                            throws org.ow2.jonas.lib.work.CleanerException
Check if the package pointed by the log entry is currently deploy.

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


Copyright © 2008 OW2 Consortium. All Rights Reserved.