Package com.morpheusdata.core.backup
Class AbstractMorpheusBackupTypeProvider
java.lang.Object
com.morpheusdata.core.backup.AbstractMorpheusBackupTypeProvider
- All Implemented Interfaces:
BackupTypeProvider,PluginProvider
public abstract class AbstractMorpheusBackupTypeProvider
extends Object
implements BackupTypeProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.EventSubscriberFacet<E extends Event> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelBackup(BackupResult backupResult, Map opts) Cancel the backup execution process without waiting for a result.configureBackup(Backup backup, Map config, Map opts) Add additional configurations to a backup.createBackup(Backup backup, Map opts) Create the backup resources on the external provider system.deleteBackup(Backup backup, Map opts) Delete the backup resources on the external provider system.extractBackup(BackupResult backupResult, Map opts) Extract the results of a backup.Returns the Morpheus Context for interacting with data stored in the Main Morpheus ApplicationReturns the instance of the Plugin class that this provider is loaded fromvalidateBackup(Backup backup, Map config, Map opts) Validate the configuration of the backup.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.morpheusdata.core.backup.BackupTypeProvider
clean, configureRestoreBackup, deleteBackupResult, executeBackup, getBackupRestoreInstanceConfig, getContainerType, getCopyToStore, getDownloadEnabled, getHasCopyToStore, getOptionTypes, getRestoreExistingEnabled, getRestoreExistingOptionTypes, getRestoreNewEnabled, getRestoreNewMode, getRestoreNewOptionTypes, getRestoreOptions, getRestoreType, isSnapshot, prepareBackupResult, prepareExecuteBackup, refresh, refreshBackupRestoreResult, refreshBackupResult, restoreBackup, validateRestoreBackupMethods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getName, isPlugin
-
Constructor Details
-
AbstractMorpheusBackupTypeProvider
-
-
Method Details
-
getMorpheus
Description copied from interface:PluginProviderReturns the Morpheus Context for interacting with data stored in the Main Morpheus Application- Specified by:
getMorpheusin interfacePluginProvider- Returns:
- an implementation of the MorpheusContext for running Future based rxJava queries
-
getPlugin
Description copied from interface:PluginProviderReturns the instance of the Plugin class that this provider is loaded from- Specified by:
getPluginin interfacePluginProvider- Returns:
- Plugin class contains references to other providers
-
configureBackup
Description copied from interface:BackupTypeProviderAdd 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:
configureBackupin interfaceBackupTypeProvider- 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
ServiceResponseobject. A ServiceResponse with a false success will indicate a failed configuration and will halt the backup creation process.
-
validateBackup
Description copied from interface:BackupTypeProviderValidate 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:
validateBackupin interfaceBackupTypeProvider- Parameters:
backup- the backup to validateconfig- the original configuration supplied by external inputs.opts- optional parameters used for- Returns:
- a
ServiceResponseobject. The errors field of the ServiceResponse is used to send validation results back to the interface in the format oferrors['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
Description copied from interface:BackupTypeProviderCreate the backup resources on the external provider system.- Specified by:
createBackupin interfaceBackupTypeProvider- Parameters:
backup- the fully configured and validated backupopts- additional options used during backup creation- Returns:
- a
ServiceResponseobject. 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
Description copied from interface:BackupTypeProviderDelete the backup resources on the external provider system.- Specified by:
deleteBackupin interfaceBackupTypeProvider- Parameters:
backup- the backup detailsopts- additional options used during the backup deletion process- Returns:
- a
ServiceResponseindicating 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
Description copied from interface:BackupTypeProviderCancel the backup execution process without waiting for a result.- Specified by:
cancelBackupin interfaceBackupTypeProvider- Parameters:
backupResult- the details associated with the results of the backup execution.opts- additional options.- Returns:
- a
ServiceResponseindicating the success or failure of the backup execution cancellation.
-
extractBackup
Description copied from interface:BackupTypeProviderExtract 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:
extractBackupin interfaceBackupTypeProvider- Parameters:
backupResult- the details associated with the results of the backup execution.opts- additional options.- Returns:
- a
ServiceResponseindicating the success or failure of the backup extraction.
-