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
-
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, wait
Methods inherited from interface com.morpheusdata.core.backup.BackupTypeProvider
clean, configureRestoreBackup, deleteBackupResult, executeBackup, getBackupRestoreInstanceConfig, getContainerType, getCopyToStore, getDownloadEnabled, getHasCopyToStore, getOptionTypes, getRestoreExistingEnabled, getRestoreNewEnabled, getRestoreNewMode, getRestoreOptions, getRestoreType, isSnapshot, prepareBackupResult, prepareExecuteBackup, refresh, refreshBackupRestoreResult, refreshBackupResult, restoreBackup, validateRestoreBackup
Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getName, isPlugin
-
Constructor Details
-
AbstractMorpheusBackupTypeProvider
-
-
Method Details
-
getMorpheus
Description copied from interface:PluginProvider
Returns the Morpheus Context for interacting with data stored in the Main Morpheus Application- Specified by:
getMorpheus
in interfacePluginProvider
- Returns:
- an implementation of the MorpheusContext for running Future based rxJava queries
-
getPlugin
Description copied from interface:PluginProvider
Returns the instance of the Plugin class that this provider is loaded from- Specified by:
getPlugin
in interfacePluginProvider
- Returns:
- Plugin class contains references to other providers
-
configureBackup
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 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
ServiceResponse
object. A ServiceResponse with a false success will indicate a failed configuration and will halt the backup creation process.
-
validateBackup
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 interfaceBackupTypeProvider
- Parameters:
backup
- the backup to validateconfig
- 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 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:BackupTypeProvider
Create the backup resources on the external provider system.- Specified by:
createBackup
in interfaceBackupTypeProvider
- Parameters:
backup
- the fully configured and validated backupopts
- 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
Description copied from interface:BackupTypeProvider
Delete the backup resources on the external provider system.- Specified by:
deleteBackup
in interfaceBackupTypeProvider
- Parameters:
backup
- the backup detailsopts
- 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
Description copied from interface:BackupTypeProvider
Cancel the backup execution process without waiting for a result.- Specified by:
cancelBackup
in interfaceBackupTypeProvider
- 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
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 interfaceBackupTypeProvider
- 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.
-