@PublicSpi public interface GlobalConfigurationHandler
Modifier and Type | Method and Description |
---|---|
void |
deleteConfiguration()
Invoked when configuration needs to be deleted.
|
Optional<String> |
exportConfiguration(ExportContext exportContext)
Invoked when a configuration is being exported.
|
void |
importConfiguration(String configuration,
ImportContext importContext)
Invoked when a configuration is being imported.
|
Optional<String> exportConfiguration(ExportContext exportContext)
Optional.empty()
if there is no configuration to be exported.
Implementers may call ConfigurationReferenceCollector
methods to handle references to other configuration objects.exportContext
- context of the export operation.Optional
with the exported configuration or Optional.empty()
if the app does not store any global
configuration.ExportContext
void importConfiguration(String configuration, ImportContext importContext)
ImportContext.getImportMode()
to distinguish between merge and restore.
Implementers can call ConfigurationReferenceLookup
methods to retrieve the respective matching configuration objects referred
with ConfigurationReferenceCollector
.configuration
- the configuration as serialized by exportConfiguration(ExportContext)
.importContext
- context of the import operation.ImportContext
,
ImportMode
void deleteConfiguration()
Copyright © 2022. All rights reserved.