Class DefaultBackupFileStore
java.lang.Object
com.atlassian.crowd.manager.backup.DefaultBackupFileStore
- All Implemented Interfaces:
BackupFileStore
Default implementation of
BackupFileStore.- Since:
- v2.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIf there are more than the maximum number of automated backup files, delete the oldest onesprotected voiddeleteFile(File file) extractTimestamp(File file) Extract the timestamp from the name of the given backup file.Returns the directory where backup files are storedReturn a list of automated backup files, sorted by ascending date.protected com.google.common.base.Predicate<File>
-
Constructor Details
-
DefaultBackupFileStore
-
-
Method Details
-
cleanUpAutomatedBackupFiles
public void cleanUpAutomatedBackupFiles()Description copied from interface:BackupFileStoreIf there are more than the maximum number of automated backup files, delete the oldest ones- Specified by:
cleanUpAutomatedBackupFilesin interfaceBackupFileStore
-
getBackupDirectory
Description copied from interface:BackupFileStoreReturns the directory where backup files are stored- Specified by:
getBackupDirectoryin interfaceBackupFileStore- Returns:
- the directory where backup files are stored
-
getBackupFiles
Description copied from interface:BackupFileStoreReturn a list of automated backup files, sorted by ascending date. Note: the date is taken from the filename, not from the file itself.- Specified by:
getBackupFilesin interfaceBackupFileStore- Returns:
- a list of
File
-
extractTimestamp
Description copied from interface:BackupFileStoreExtract the timestamp from the name of the given backup file.- Specified by:
extractTimestampin interfaceBackupFileStore- Parameters:
file- an automated backup file- Returns:
- a
Date, ornullif the file is not a valid backup file
-
toTimeStamp
-
isAutomatedBackup
-
deleteFile
-
filesInBackupDirectory
-