@PublicApi
public interface DataImportOSPropertyValidator
<OSPropertyEntry>
elements in the backup XML.
All DataImportOSPropertyValidator
instances will be invoked before the import
(restore) process starts.
To register an implementation of this interface, use the <data-import-properties-validator>
element in your
atlassian-plugin.xml
.
Example:
<data-import-properties-validator key="my-data-import-validator"
i18n-name-key="my.data.import.validator.name"
class="com.example.myplugin.MyDataImportPropertiesValidator" />
Modifier and Type | Interface and Description |
---|---|
static interface |
DataImportOSPropertyValidator.DataImportProperties
Accessors to property entries in the backup XML.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
getPropertyKeysToValidate()
Specifies a set of property entries that will be validated.
|
ServiceResult |
validate(DataImportParams dataImportParams,
DataImportOSPropertyValidator.DataImportProperties dataImportProperties)
Validates the backup XML.
|
Set<String> getPropertyKeysToValidate()
DataImportOSPropertyValidator.DataImportProperties
instance
that gets passed into the validate(DataImportParams, DataImportOSPropertyValidator.DataImportProperties)
method.
Note that the DataImportOSPropertyValidator.DataImportProperties
instance
will also contain properties that are requested by other instances of DataImportOSPropertyValidator
.ServiceResult validate(DataImportParams dataImportParams, DataImportOSPropertyValidator.DataImportProperties dataImportProperties)
dataImportParams
- Import parameters provided by user during import processdataImportProperties
- Property entries loaded from the backup XML being validated. To guarantee that the properties
we need to validate are available, we need to ensure that they are returned by the
getPropertyKeysToValidate()
method. The entries contained here are those requested
by all validator instances, i.e. you may get additional properties beyond what's specified by
getPropertyKeysToValidate()
.Copyright © 2002-2019 Atlassian. All Rights Reserved.