Class AbstractMorpheusBackupTypeProvider

java.lang.Object
com.morpheusdata.core.backup.AbstractMorpheusBackupTypeProvider
All Implemented Interfaces:
BackupTypeProvider, PluginProvider

public abstract class AbstractMorpheusBackupTypeProvider extends Object implements BackupTypeProvider
  • Constructor Details

    • AbstractMorpheusBackupTypeProvider

      public AbstractMorpheusBackupTypeProvider(Plugin plugin, MorpheusContext context)
  • Method Details

    • getMorpheus

      public MorpheusContext getMorpheus()
      Description copied from interface: PluginProvider
      Returns the Morpheus Context for interacting with data stored in the Main Morpheus Application
      Specified by:
      getMorpheus in interface PluginProvider
      Returns:
      an implementation of the MorpheusContext for running Future based rxJava queries
    • getPlugin

      public Plugin getPlugin()
      Description copied from interface: PluginProvider
      Returns the instance of the Plugin class that this provider is loaded from
      Specified by:
      getPlugin in interface PluginProvider
      Returns:
      Plugin class contains references to other providers
    • configureBackup

      public ServiceResponse configureBackup(Backup backup, Map config, Map opts)
      Description copied from interface: BackupTypeProvider
      Add additional configurations to a backup. Morpheus will handle all basic configuration details, this is a convenient way to add additional configuration details specific to this backup provider.
      Specified by:
      configureBackup in interface BackupTypeProvider
      Parameters:
      backup - the current backup the configurations are applied to.
      config - the configuration supplied by external inputs.
      opts - optional parameters used for configuration.
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed configuration and will halt the backup creation process.
    • validateBackup

      public ServiceResponse validateBackup(Backup backup, Map config, Map opts)
      Description copied from interface: BackupTypeProvider
      Validate the configuration of the backup. Morpheus will validate the backup based on the supplied option type configurations such as required fields. Use this to either override the validation results supplied by the default validation or to create additional validations beyond the capabilities of option type validation.
      Specified by:
      validateBackup in interface BackupTypeProvider
      Parameters:
      backup - the backup to validate
      config - the original configuration supplied by external inputs.
      opts - optional parameters used for
      Returns:
      a ServiceResponse object. The errors field of the ServiceResponse is used to send validation results back to the interface in the format of errors['fieldName'] = 'validation message' . The msg property can be used to send generic validation text that is not related to a specific field on the model. A ServiceResponse with any items in the errors list or a success value of 'false' will halt the backup creation process.
    • createBackup

      public ServiceResponse createBackup(Backup backup, Map opts)
      Description copied from interface: BackupTypeProvider
      Create the backup resources on the external provider system.
      Specified by:
      createBackup in interface BackupTypeProvider
      Parameters:
      backup - the fully configured and validated backup
      opts - additional options used during backup creation
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the creation on the external system failed and will halt any further backup creation processes in morpheus.
    • deleteBackup

      public ServiceResponse deleteBackup(Backup backup, Map opts)
      Description copied from interface: BackupTypeProvider
      Delete the backup resources on the external provider system.
      Specified by:
      deleteBackup in interface BackupTypeProvider
      Parameters:
      backup - the backup details
      opts - additional options used during the backup deletion process
      Returns:
      a ServiceResponse indicating the results of the deletion on the external provider system. A ServiceResponse object with a success value of 'false' will halt the deletion process and the local refernce will be retained.
    • cancelBackup

      public ServiceResponse cancelBackup(BackupResult backupResult, Map opts)
      Description copied from interface: BackupTypeProvider
      Cancel the backup execution process without waiting for a result.
      Specified by:
      cancelBackup in interface BackupTypeProvider
      Parameters:
      backupResult - the details associated with the results of the backup execution.
      opts - additional options.
      Returns:
      a ServiceResponse indicating the success or failure of the backup execution cancellation.
    • extractBackup

      public ServiceResponse extractBackup(BackupResult backupResult, Map opts)
      Description copied from interface: BackupTypeProvider
      Extract the results of a backup. This is generally used for packaging up a full backup for the purposes of a download or full archive of the backup.
      Specified by:
      extractBackup in interface BackupTypeProvider
      Parameters:
      backupResult - the details associated with the results of the backup execution.
      opts - additional options.
      Returns:
      a ServiceResponse indicating the success or failure of the backup extraction.