Class BackupAction

java.lang.Object
backupmanager.action.BackupAction
All Implemented Interfaces:
BackupFunction
Direct Known Subclasses:
CopyFile, DeleteFile

public abstract class BackupAction extends Object implements BackupFunction
  • Constructor Details Link icon

  • Method Details Link icon

    • doAction Link icon

      public abstract boolean doAction(BackupManager backupManager, BackupStream backupStream, StreamItem streamItem) throws BackupException
      Perform a backup action. Return false or throw an exception if the action fails.
      Parameters:
      backupManager -
      streamItem -
      streamInformation -
      Returns:
      Throws:
      BackupException
    • getSettings Link icon

      public abstract ActionSettings getSettings()
      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.
      Returns:
      action settings
    • setSettings Link icon

      public abstract boolean setSettings(ActionSettings settings)
      Set settings. Will return false if they were the wrong type for this action - though that should not be possible.
      Parameters:
      settings -
      Returns:
      true if settings are OK.
    • showDialog Link icon

      public boolean showDialog(Window owner)
      Returns:
      a dialog panel for controlling any of the settings.
    • runIfPreviousActionError Link icon

      public abstract boolean runIfPreviousActionError()
      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!
      Returns:
      true if it's OK to run this action when a previous action failed.
    • getDialogPanel Link icon

      public abstract PamDialogPanel getDialogPanel(Window owner)
      Get a dialog panel for this action to incorporate into a larger dialog.
      Specified by:
      getDialogPanel in interface BackupFunction
      Parameters:
      owner -
      Returns:
      dialog panel (assuming most actions have one - can return null).
    • getName Link icon

      public abstract String getName()
      Specified by:
      getName in interface BackupFunction
      Returns:
      a name for the action, to display in dialogs
    • getBackupStream Link icon

      public BackupStream getBackupStream()
      Returns:
      the backupStream
    • getActionMaker Link icon

      public ActionMaker getActionMaker()
      Returns:
      the actionMaker
    • getBackupFilter Link icon

      public BackupFilter getBackupFilter()
    • setBackupFilter Link icon

      public void setBackupFilter(BackupFilter backupFilter)
    • getSpace Link icon

      public String getSpace()