org.bitrepository.audittrails.preserver
Class AuditPacker

java.lang.Object
  extended by org.bitrepository.audittrails.preserver.AuditPacker

public class AuditPacker
extends Object

Performs the extraction and packaging of audit trails for preservation for a specific collection. Only packs the audit trails with a larger sequence number than the reached sequence number for the given contributor.


Constructor Summary
AuditPacker(AuditTrailStore store, AuditTrailPreservation settings, String collectionId)
          Constructor.
 
Method Summary
 File createNewPackage()
          Creates a new package with all the newest audit trails from all contributors, e.g.
 Map<String,Long> getSequenceNumbersReached()
          Makes a copy of the map, which is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditPacker

public AuditPacker(AuditTrailStore store,
                   AuditTrailPreservation settings,
                   String collectionId)
Constructor.

Parameters:
store - The audit trail store
Method Detail

getSequenceNumbersReached

public Map<String,Long> getSequenceNumbersReached()
Makes a copy of the map, which is returned.

Returns:
A mapping between the contributor ids and their preservation sequence numbers.

createNewPackage

public File createNewPackage()
Creates a new package with all the newest audit trails from all contributors, e.g. all the audit trails with a larger sequence number than the reached. Cleans up the temporary container afterwards.

Returns:
A compressed file with all the audit trails.


Copyright © 2010-2013 The State and University Library, The Royal Library and The State Archives, Denmark. All Rights Reserved.