Package backupmanager.action
Class DeleteFile
java.lang.Object
backupmanager.action.BackupAction
backupmanager.action.DeleteFile
- All Implemented Interfaces:
BackupFunction
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
doAction
(BackupManager backupManager, BackupStream backupStream, StreamItem streamItem) Perform a backup action.getDialogPanel
(Window owner) Get a dialog panel for this action to incorporate into a larger dialog.getName()
Get settings associated with this action.boolean
flag to say whether or not to run this action if any previous action threw an error.boolean
setSettings
(ActionSettings settings) Set settings.Methods inherited from class backupmanager.action.BackupAction
getActionMaker, getBackupFilter, getBackupStream, getSpace, setBackupFilter, showDialog
-
Constructor Details
-
DeleteFile
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceBackupFunction
- Specified by:
getName
in classBackupAction
- Returns:
- a name for the action, to display in dialogs
-
doAction
public boolean doAction(BackupManager backupManager, BackupStream backupStream, StreamItem streamItem) throws BackupException Description copied from class:BackupAction
Perform a backup action. Return false or throw an exception if the action fails.- Specified by:
doAction
in classBackupAction
- Returns:
- Throws:
BackupException
-
getDialogPanel
Description copied from class:BackupAction
Get a dialog panel for this action to incorporate into a larger dialog.- Specified by:
getDialogPanel
in interfaceBackupFunction
- Specified by:
getDialogPanel
in classBackupAction
- Parameters:
owner
- owner should be the dialog, not the main PAMGuard frame- Returns:
- dialog panel (assuming most actions have one - can return null).
-
getSettings
Description copied from class:BackupAction
Get settings associated with this action.
All actions must return settings even if they have nothing in them, since the settings are needed to recreate the action based on it's class name.- Specified by:
getSettings
in classBackupAction
- Returns:
- action settings
-
setSettings
Description copied from class:BackupAction
Set settings. Will return false if they were the wrong type for this action - though that should not be possible.- Specified by:
setSettings
in classBackupAction
- Returns:
- true if settings are OK.
-
runIfPreviousActionError
public boolean runIfPreviousActionError()Description copied from class:BackupAction
flag to say whether or not to run this action if any previous action threw an error. Actions such as a file copy would probably want to run anyway, since may be copying to different disks and if one is full, you'd want to copy to the other. But if you'd failed to copy a file to a backup drive, you probably wouldn't want to delete it!- Specified by:
runIfPreviousActionError
in classBackupAction
- Returns:
- true if it's OK to run this action when a previous action failed.
-