org.opencms.db.oracle
Class CmsBackupDriver

java.lang.Object
  extended byorg.opencms.db.generic.CmsBackupDriver
      extended byorg.opencms.db.oracle.CmsBackupDriver
All Implemented Interfaces:
I_CmsBackupDriver, I_CmsDriver
Direct Known Subclasses:
CmsBackupDriver

public class CmsBackupDriver
extends CmsBackupDriver

Oracle implementation of the backup driver methods.

Since:
6.0.0
Version:
$Revision: 1.56 $
Author:
Thomas Weckert, Michael Emmerich, Carsten Weinholz

Field Summary
 
Fields inherited from class org.opencms.db.generic.CmsBackupDriver
m_driverManager, m_sqlManager
 
Fields inherited from interface org.opencms.db.I_CmsBackupDriver
DRIVER_TYPE_ID
 
Constructor Summary
CmsBackupDriver()
           
 
Method Summary
 void deleteBackups(CmsDbContext dbc, java.util.List existingBackups, int maxVersions)
          Deletes backup versions of a resource.
 CmsSqlManager initSqlManager(java.lang.String classname)
          Initializes the SQL manager for this driver.
protected  void internalWriteBackupFileContent(CmsDbContext dbc, CmsUUID backupId, CmsResource resource, int tagId, int versionId)
          Internal method to write the backup content.
 java.util.List readBackupProjects(CmsDbContext dbc)
          Returns all projects from the history.
 
Methods inherited from class org.opencms.db.generic.CmsBackupDriver
createBackupPropertyDefinition, createBackupResource, deleteBackup, deleteBackupPropertyDefinition, destroy, finalize, getSqlManager, init, internalCountProperties, readBackupFile, readBackupFileHeaders, readBackupFileHeaders, readBackupMaxVersion, readBackupProject, readBackupProjectResources, readBackupProjectTag, readBackupProperties, readBackupPropertyDefinition, readMaxTagId, readNextBackupTagId, writeBackupProject, writeBackupProperties, writeBackupResource
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opencms.db.I_CmsDriver
toString
 

Constructor Detail

CmsBackupDriver

public CmsBackupDriver()
Method Detail

deleteBackups

public void deleteBackups(CmsDbContext dbc,
                          java.util.List existingBackups,
                          int maxVersions)
                   throws CmsDataAccessException
Description copied from interface: I_CmsBackupDriver
Deletes backup versions of a resource.

Deletes the m-n oldest backup versions, if m is the number of backup versions, and n the number of max. allowed backup versions.

Specified by:
deleteBackups in interface I_CmsBackupDriver
Overrides:
deleteBackups in class CmsBackupDriver
Throws:
CmsDataAccessException
See Also:
I_CmsBackupDriver.deleteBackups(org.opencms.db.CmsDbContext, java.util.List, int)

initSqlManager

public CmsSqlManager initSqlManager(java.lang.String classname)
Description copied from interface: I_CmsBackupDriver
Initializes the SQL manager for this driver.

Specified by:
initSqlManager in interface I_CmsBackupDriver
Overrides:
initSqlManager in class CmsBackupDriver
See Also:
I_CmsBackupDriver.initSqlManager(String)

readBackupProjects

public java.util.List readBackupProjects(CmsDbContext dbc)
                                  throws CmsDataAccessException
Description copied from interface: I_CmsBackupDriver
Returns all projects from the history.

Specified by:
readBackupProjects in interface I_CmsBackupDriver
Overrides:
readBackupProjects in class CmsBackupDriver
Throws:
CmsDataAccessException
See Also:
I_CmsBackupDriver.readBackupProjects(org.opencms.db.CmsDbContext)

internalWriteBackupFileContent

protected void internalWriteBackupFileContent(CmsDbContext dbc,
                                              CmsUUID backupId,
                                              CmsResource resource,
                                              int tagId,
                                              int versionId)
                                       throws CmsDataAccessException
Description copied from class: CmsBackupDriver
Internal method to write the backup content.

Overrides:
internalWriteBackupFileContent in class CmsBackupDriver
Parameters:
dbc - the current database context
backupId - the backup id
resource - the resource to backup
tagId - the tag revision
versionId - the version revision
Throws:
CmsDataAccessException - if something goes wrong
See Also:
CmsBackupDriver.internalWriteBackupFileContent(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID, org.opencms.file.CmsResource, int, int)