Class DefaultBackupManager
java.lang.Object
com.atlassian.crowd.manager.backup.DefaultBackupManager
- All Implemented Interfaces:
BackupManager
Default implementation of
BackupManager- Since:
- v2.7
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBackupManager(XmlMigrationManager xmlMigrationManager, BackupFileStore backupFileStore, PropertyManager propertyManager) -
Method Summary
Modifier and TypeMethodDescriptionlongPerform an XML export of crowd, as well as of the directory configuration.longPerform an XML export of crowd, as well as of the directory configuration.Generate a filename for an automated backup, that can then be used withBackupManager.backup(String, boolean).Return a summary of how many automated backups are present, and how old are the oldest and most recent backups.getBackupFileFullPath(String fileName) Generate the full path of the given backup filename.
-
Constructor Details
-
DefaultBackupManager
public DefaultBackupManager(XmlMigrationManager xmlMigrationManager, BackupFileStore backupFileStore, PropertyManager propertyManager)
-
-
Method Details
-
generateAutomatedBackupFileName
Description copied from interface:BackupManagerGenerate a filename for an automated backup, that can then be used withBackupManager.backup(String, boolean).- Specified by:
generateAutomatedBackupFileNamein interfaceBackupManager- Returns:
- a filename
-
getBackupFileFullPath
Description copied from interface:BackupManagerGenerate the full path of the given backup filename.- Specified by:
getBackupFileFullPathin interfaceBackupManager- Parameters:
fileName- a filename- Returns:
- a full path
-
backup
public long backup(String exportFileName) throws ExportException, BackupOrRestoreAlreadyInProgressException Description copied from interface:BackupManagerPerform an XML export of crowd, as well as of the directory configuration.- Specified by:
backupin interfaceBackupManager- Parameters:
exportFileName- the name of the file to export to (not the full path)- Returns:
- the time it took to execute the export, in milliseconds
- Throws:
ExportException- in case an error happens while exporting the dataBackupOrRestoreAlreadyInProgressException- in case a backup or a restore is already in progress
-
backup
@Transactional public long backup(String exportFileName, boolean resetDomain) throws ExportException, BackupOrRestoreAlreadyInProgressException Description copied from interface:BackupManagerPerform an XML export of crowd, as well as of the directory configuration.- Specified by:
backupin interfaceBackupManager- Parameters:
exportFileName- the name of the file to export to (not the full path)resetDomain- whether to activate the RESET_DOMAIN option or not- Returns:
- the time it took to execute the export, in milliseconds
- Throws:
ExportException- in case an error happens while exporting the dataBackupOrRestoreAlreadyInProgressException- in case a backup or a restore is already in progress
-
getAutomatedBackupSummary
Description copied from interface:BackupManagerReturn a summary of how many automated backups are present, and how old are the oldest and most recent backups.- Specified by:
getAutomatedBackupSummaryin interfaceBackupManager- Returns:
- a
BackupSummary
-