base.jdbs
Class Repository

java.lang.Object
  extended by java.util.Observable
      extended by base.jdbs.Repository
All Implemented Interfaces:
IXMLSaveable

public class Repository
extends java.util.Observable
implements IXMLSaveable


Constructor Summary
Repository(org.w3c.dom.Document document)
          This is the xml repository constructor.
Repository(java.io.File location, long declaredAvailableSpace)
          This is the default constructor.
 
Method Summary
protected  java.lang.String createArtifactKey(BackupDescriptor backupDescriptor)
           
 BackupDescriptor[] getBackupDescriptor()
           
 BackupDescriptor getBackupDescriptorByGuId(java.lang.String guId)
          This method retrieves a specified BackupDescriptor from a specified guId.
 long getDeclaredAvailableSpace()
           
 java.io.File getLocation()
           
 void indexRepository()
          This method creates an index of backups building it from this repository's location.
 void removeBackupDescriptor(BackupDescriptor backupDescriptor)
           
 void setDeclaredAvailableSpace(long declaredAvailableSpace)
           
 void setLocation(java.io.File location)
           
 org.w3c.dom.Node toXml(org.w3c.dom.Document document)
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repository

public Repository(java.io.File location,
                  long declaredAvailableSpace)
This is the default constructor.

Parameters:
location - The location on filesytem associated to the JDBS local repository.
declaredAvailableSpace - The declared repository's available space.

Repository

public Repository(org.w3c.dom.Document document)
This is the xml repository constructor.

Parameters:
document - The document where the repository data has been stored.
Method Detail

indexRepository

public void indexRepository()
This method creates an index of backups building it from this repository's location.


createArtifactKey

protected java.lang.String createArtifactKey(BackupDescriptor backupDescriptor)

getDeclaredAvailableSpace

public long getDeclaredAvailableSpace()
Returns:
Returns the declaredAvailableSpace.

getBackupDescriptor

public BackupDescriptor[] getBackupDescriptor()
Returns:
Returns the indexed backup descriptors..

getLocation

public java.io.File getLocation()
Returns:
Returns the location.

toXml

public org.w3c.dom.Node toXml(org.w3c.dom.Document document)
Specified by:
toXml in interface IXMLSaveable

setDeclaredAvailableSpace

public void setDeclaredAvailableSpace(long declaredAvailableSpace)
Parameters:
declaredAvailableSpace - The declaredAvailableSpace to set.

setLocation

public void setLocation(java.io.File location)
Parameters:
location - The location to set.

removeBackupDescriptor

public void removeBackupDescriptor(BackupDescriptor backupDescriptor)

getBackupDescriptorByGuId

public BackupDescriptor getBackupDescriptorByGuId(java.lang.String guId)
This method retrieves a specified BackupDescriptor from a specified guId.

Parameters:
guId - The guId of the BackupDescriptor to retrieve.
Returns:
The BackupDescriptor whose global unique identifier is guId, null if there isn't a BackupDescriptor that matched the specified guId.


Copyright © 2006 SF.net. All Rights Reserved.