@PublicSpi public interface AppDataHandler
The implementation of this interface is responsible for serializing/deserializing app data and recording references to Jira configuration elements like app filter type option IDs, etc.
In case the annotation-based approach for handler declaration is chosen, the implementation of this interface should be annotated with
ОbjectsEnumeratedBy
to describe app's types and objects that could be
exported/imported.
Modifier and Type | Method and Description |
---|---|
Optional<String> |
exportData(Map<String,List<String>> selectedObjectIds,
ExportContext exportContext)
Invoked when an app data is being exported.
|
void |
importData(String data,
ImportContext importContext)
Invoked when an app data is being imported.
|
Optional<String> exportData(Map<String,List<String>> selectedObjectIds, ExportContext exportContext)
Implementers may call ConfigurationReferenceCollector
methods to handle references to
other configuration objects.
selectedObjectIds
- map of the selected objects for export by the user with their type as a key (see AppDataObjectType.getId()
) and
object ids as values (see AppDataObject.getObjectId()
).exportContext
- context of the export operation.ExportContext
void importData(String data, ImportContext importContext)
Implementers can call ConfigurationReferenceLookup
methods to retrieve the respective
matching app objects referred with ConfigurationReferenceCollector
.
data
- the app data as serialized by AppDataHandler#exportData(Map<String, List<String>> selectedObjectIds, ExportContext exportContext)
.importContext
- context of the import operation.ImportContext
Copyright © 2022. All rights reserved.