Package generalDatabase.backup
Class DatabaseBackupStream
java.lang.Object
backupmanager.stream.BackupStream
backupmanager.stream.FileBackupStream
generalDatabase.backup.DatabaseBackupStream
- All Implemented Interfaces:
BackupFunction,PamSettings,SettingsNameProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild the data catalogue from the last item in the current database.booleandoAction(BackupManager backupManager, BackupAction action, StreamItem streamItem) Carry out some action or other on the stream item.Source location - For most things, like the sound recorder or binary files this will have to be taken from the other settings.getToDoList(List<StreamItem> streamItems, BackupAction action) Get a list of items that this action needs to work on.voidsetSourceLocation(FileLocation fileLocation) As with the getter, this may be ignored by many modules which will perfectly well know their source locationvoidupdateActedItem(BackupAction action, StreamItem streamItem) Methods inherited from class backupmanager.stream.FileBackupStream
backupComplete, getAllFiles, getAllSourceItems, getAvailableSpace, getBackupSettings, getDialogPanel, getMinBackupDelay, setBackupSettingsMethods inherited from class backupmanager.stream.BackupStream
addAction, createActions, findActionMaker, getActions, getName, getSettingsReference, getSettingsVersion, getUnitName, getUnitType, removeAction, restoreSettings, runBackup
-
Constructor Details
-
DatabaseBackupStream
-
-
Method Details
-
getToDoList
Description copied from class:BackupStreamGet a list of items that this action needs to work on. this may be a subset of sourceItems- Overrides:
getToDoListin classFileBackupStream- Parameters:
streamItems-action-- Returns:
-
doAction
public boolean doAction(BackupManager backupManager, BackupAction action, StreamItem streamItem) throws BackupException Description copied from class:BackupStreamCarry out some action or other on the stream item.- Overrides:
doActionin classBackupStream- Parameters:
backupManager-action- Backup action to perform- Returns:
- true if successful, otherwise false
- Throws:
BackupException
-
getAvailableActions
- Overrides:
getAvailableActionsin classFileBackupStream
-
catalogData
Description copied from class:BackupStreambuild the data catalogue from the last item in the current database.
Individual actions may want to look in the database to see if they have themselves acted on the data, so will run their own query.Note that catalogData and getToDoList are separate functions, the idea being that catalog data will be listing all files in the source folder (or ones not already listed in the database table) whereas getToDoList can provide a set of files that are associated with a particular action, which may be a subset of files found in catalogData or may ignore catalogData in it's entirity.
- Overrides:
catalogDatain classFileBackupStream- Returns:
-
updateActedItem
- Overrides:
updateActedItemin classFileBackupStream
-
getSourceLocation
Description copied from class:FileBackupStreamSource location - For most things, like the sound recorder or binary files this will have to be taken from the other settings. For some modules like the gemini, which are recording elsewhere, it can be anything.- Specified by:
getSourceLocationin classFileBackupStream- Returns:
- the source location.
-
setSourceLocation
Description copied from class:FileBackupStreamAs with the getter, this may be ignored by many modules which will perfectly well know their source location- Specified by:
setSourceLocationin classFileBackupStream- Parameters:
fileLocation-
-