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
-
Method Summary
Modifier and TypeMethodDescriptionbuild the data catalogue from the last item in the current database.boolean
doAction
(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.void
setSourceLocation
(FileLocation fileLocation) As with the getter, this may be ignored by many modules which will perfectly well know their source locationvoid
updateActedItem
(BackupAction action, StreamItem streamItem) Methods inherited from class backupmanager.stream.FileBackupStream
backupComplete, getAllFiles, getAllSourceItems, getAvailableSpace, getBackupSettings, getDialogPanel, getMinBackupDelay, setBackupSettings
Methods inherited from class backupmanager.stream.BackupStream
addAction, getActions, getName, getSettingsReference, getSettingsVersion, getUnitName, getUnitType, removeAction, restoreSettings, runBackup
-
Constructor Details
-
DatabaseBackupStream
-
-
Method Details
-
getToDoList
Description copied from class:BackupStream
Get a list of items that this action needs to work on. this may be a subset of sourceItems- Overrides:
getToDoList
in classFileBackupStream
- Returns:
-
doAction
public boolean doAction(BackupManager backupManager, BackupAction action, StreamItem streamItem) throws BackupException Description copied from class:BackupStream
Carry out some action or other on the stream item.- Overrides:
doAction
in classBackupStream
- Parameters:
action
- Backup action to perform- Returns:
- true if successful, otherwise false
- Throws:
BackupException
-
getAvailableActions
- Overrides:
getAvailableActions
in classFileBackupStream
-
catalogData
Description copied from class:BackupStream
build 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:
catalogData
in classFileBackupStream
- Returns:
-
updateActedItem
- Overrides:
updateActedItem
in classFileBackupStream
-
getSourceLocation
Description copied from class:FileBackupStream
Source 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:
getSourceLocation
in classFileBackupStream
- Returns:
- the source location.
-
setSourceLocation
Description copied from class:FileBackupStream
As with the getter, this may be ignored by many modules which will perfectly well know their source location- Specified by:
setSourceLocation
in classFileBackupStream
-