Package org.kingdoms.managers.backup
Class KingdomsBackup
java.lang.Object
org.kingdoms.managers.backup.BackupManager
org.kingdoms.managers.backup.KingdomsBackup
-
Nested Class Summary
Nested classes/interfaces inherited from class org.kingdoms.managers.backup.BackupManager
BackupManager.DirVisitState -
Field Summary
Fields inherited from class org.kingdoms.managers.backup.BackupManager
backups, DATE_PATTERN, toBackup, useMultiBackups -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToZip()Can be either aPathorInputStreamvoidbooleanisBlacklistedDirectory(Path file) isWhitelistedDirectory(@NonNull Path file) When taking a backup from the files in the directory, only the contents inside these
directories will be checked and passed toBackupManager.isWhitelistedFile(Path)booleanisWhitelistedFile(@NonNull Path file) When taking a backup from the files in the directory, only these files are accepted.voidThe default method to take a clean backup.Methods inherited from class org.kingdoms.managers.backup.BackupManager
deleteOldBackups, getDate, getMultiZipName, getZip, getZipPath, hasBackupToday, shouldBeDeleted, unzipFiles, zipFiles
-
Constructor Details
-
KingdomsBackup
-
-
Method Details
-
autoBackup
public void autoBackup() -
takeBackup
public void takeBackup()Description copied from class:BackupManagerThe default method to take a clean backup. You can override for a custom handler.- Overrides:
takeBackupin classBackupManager
-
isWhitelistedDirectory
Description copied from class:BackupManagerWhen taking a backup from the files in the directory, only the contents inside these
directories will be checked and passed toBackupManager.isWhitelistedFile(Path)- Specified by:
isWhitelistedDirectoryin classBackupManager- Parameters:
file- the directory that we're about to enter.
-
isBlacklistedDirectory
- Specified by:
isBlacklistedDirectoryin classBackupManager
-
isWhitelistedFile
Description copied from class:BackupManagerWhen taking a backup from the files in the directory, only these files are accepted.- Specified by:
isWhitelistedFilein classBackupManager- Parameters:
file- the file that we're about to backup.- Returns:
- true if the specified path should be accepted.
-
addToZip
Description copied from class:BackupManagerCan be either aPathorInputStream- Specified by:
addToZipin classBackupManager- Returns:
-