org.ow2.jonas.ejb.internal
Class JarCleanTask

java.lang.Object
  extended by org.ow2.jonas.lib.work.AbsCleanTask
      extended by org.ow2.jonas.ejb.internal.JarCleanTask

public class JarCleanTask
extends org.ow2.jonas.lib.work.AbsCleanTask

JOnAS Jar unused copy clean task class. This class provides a way for removing copies wich are unconsistent for jar files.

Author:
Florent BENOIT, Benoit PELLETIER

Constructor Summary
JarCleanTask(org.ow2.jonas.lib.work.DeployerLog jarDeployerLog, org.ow2.jonas.ejb.EJBService ejb)
          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

JarCleanTask

public JarCleanTask(org.ow2.jonas.lib.work.DeployerLog jarDeployerLog,
                    org.ow2.jonas.ejb.EJBService ejb)
Default constructor : Construct a new cleaner.

Parameters:
jarDeployerLog - 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.