Class DefaultBackupFileStore
java.lang.Object
com.atlassian.crowd.manager.backup.DefaultBackupFileStore
- All Implemented Interfaces:
BackupFileStore
Default implementation of
BackupFileStore
.- Since:
- v2.7
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
If there are more than the maximum number of automated backup files, delete the oldest onesprotected void
deleteFile
(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:BackupFileStore
If there are more than the maximum number of automated backup files, delete the oldest ones- Specified by:
cleanUpAutomatedBackupFiles
in interfaceBackupFileStore
-
getBackupDirectory
Description copied from interface:BackupFileStore
Returns the directory where backup files are stored- Specified by:
getBackupDirectory
in interfaceBackupFileStore
- Returns:
- the directory where backup files are stored
-
getBackupFiles
Description copied from interface:BackupFileStore
Return 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:
getBackupFiles
in interfaceBackupFileStore
- Returns:
- a list of
File
-
extractTimestamp
Description copied from interface:BackupFileStore
Extract the timestamp from the name of the given backup file.- Specified by:
extractTimestamp
in interfaceBackupFileStore
- Parameters:
file
- an automated backup file- Returns:
- a
Date
, ornull
if the file is not a valid backup file
-
toTimeStamp
-
isAutomatedBackup
-
deleteFile
-
filesInBackupDirectory
-