org.ow2.jonas.lib.work
Class DeployerLog

java.lang.Object
  extended by org.ow2.jonas.lib.work.AbsDeployerLog<LogEntry>
      extended by org.ow2.jonas.lib.work.DeployerLog
All Implemented Interfaces:
IDeployerLog<LogEntry>

public class DeployerLog
extends AbsDeployerLog<LogEntry>

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

Author:
Florent Benoit, Ludovic Bert

Field Summary
 
Fields inherited from class org.ow2.jonas.lib.work.AbsDeployerLog
logEntries, logFile, logger, SEPARATOR_ENTRY
 
Constructor Summary
DeployerLog(File logFile)
          Constructor for the deployerLog.
 
Method Summary
 Vector<LogEntry> addEntry(File original, File copy)
          Add the entry and return the new entries.
 Vector<LogEntry> addEntry(LogEntry logEntry)
          Add the entry and return the new entries.
 LogEntry getEntry(File original)
           
protected  void loadEntries()
          load the entries of the log file.
protected  void saveEntries()
          Dump(save) the entries to the log file.
 
Methods inherited from class org.ow2.jonas.lib.work.AbsDeployerLog
getEntries, getLogger, removeEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeployerLog

public DeployerLog(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

loadEntries

protected void loadEntries()
                    throws DeployerLogException
load the entries of the log file.

Specified by:
loadEntries in class AbsDeployerLog<LogEntry>
Throws:
DeployerLogException - if the load failed.

saveEntries

protected void saveEntries()
                    throws DeployerLogException
Dump(save) the entries to the log file.

Specified by:
saveEntries in class AbsDeployerLog<LogEntry>
Throws:
DeployerLogException - if the save failed.

addEntry

public Vector<LogEntry> addEntry(LogEntry logEntry)
                          throws DeployerLogException
Description copied from class: AbsDeployerLog
Add the entry and return the new entries.

Specified by:
addEntry in interface IDeployerLog<LogEntry>
Specified by:
addEntry in class AbsDeployerLog<LogEntry>
Parameters:
logEntry - the entry to add
Throws:
DeployerLogException - if the add can't be done

addEntry

public Vector<LogEntry> addEntry(File original,
                                 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

getEntry

public LogEntry getEntry(File original)
Specified by:
getEntry in interface IDeployerLog<LogEntry>
Specified by:
getEntry in class AbsDeployerLog<LogEntry>
Parameters:
original - Original File
Returns:
the entry which match with the orginal file


Copyright © 2012 OW2 Consortium. All Rights Reserved.