org.objectweb.jonas_lib.deployment.work
Class DeployerLog

java.lang.Object
  extended byorg.objectweb.jonas_lib.deployment.work.DeployerLog

public class DeployerLog
extends java.lang.Object

Class which permits to store or load the association between the name of an package and the timestamped work copy associated.

Author:
Florent Benoit, Ludovic Bert

Constructor Summary
DeployerLog(java.io.File logFile)
          Constructor for the deployerLog.
 
Method Summary
 java.util.Vector addEntry(java.io.File original, java.io.File copy)
          Add the entry and return the new entries
 java.util.Vector getEntries()
          Return the entries of the file.
protected static org.objectweb.util.monolog.api.Logger getLogger()
           
 java.util.Vector removeEntry(LogEntry entry)
          Remove the given entry and return the entries of the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeployerLog

public DeployerLog(java.io.File logFile)
            throws DeployerLogException
Constructor for the deployerLog.

Parameters:
logFile - the file which is used for read/write entries
Throws:
DeployerLogException - if the loadentries failed.
Method Detail

getLogger

protected static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
the logger

getEntries

public java.util.Vector getEntries()
Return the entries of the file.

Returns:
a vector of LogEntry item.

removeEntry

public java.util.Vector removeEntry(LogEntry entry)
                             throws DeployerLogException
Remove the given entry and return the entries of the file.

Parameters:
entry - the LogEntry which must be remove.
Returns:
the new vector of LogEntry item.
Throws:
DeployerLogException - if the remove can't be done

addEntry

public java.util.Vector addEntry(java.io.File original,
                                 java.io.File copy)
                          throws DeployerLogException
Add the entry and return the new entries

Parameters:
original - the name of the file
copy - the copy of the file
Returns:
the new vector of LogEntry item.
Throws:
DeployerLogException - if the add can't be done