com.atlassian.jira.imports.project.customfield.ProjectCustomFieldImporter |
![]()
CascadingSelectCustomFieldImporter,
GroupCustomFieldImporter,
NoTransformationCustomFieldImporter,
ProjectPickerCustomFieldImporter,
SelectCustomFieldImporter,
TextLengthValidatingCustomFieldImporter,
UserCustomFieldImporter,
VersionCustomFieldImporter
|
Clients of @PublicSpi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicSpi
as per each product's API policy (clients should refer to each product's API policy for
the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).
@PublicSpi
interfaces and classes are specifically designed to be implemented/extended by clients.
Hence, the guarantee of binary compatibility is different to that of @PublicApi
elements (if an element
is both @PublicApi
and @PublicSpi
, both guarantees apply).
Does the custom field specific, "actual work", of importing custom field values during a project import.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ProjectCustomFieldImporter.MappedCustomFieldValue | A simple class that is used to return a value/parentKey pair of new "mapped" values for a custom field. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The custom field needs to determine if the provided custom field value, in the context of the config and
project import mapper, is a valid value that can be imported.
| |||||||||||
The custom field needs to determine what the "mapped" value will be for the provided custom field value and return
this new string representation of the value.
|
The custom field needs to determine if the provided custom field value, in the context of the config and project import mapper, is a valid value that can be imported.
The implementation has two ways to report dependencies:
If this method does not return any errors in the MessageSet, and any objects marked as required can be mapped in
the new system, then it is safe to do the import and call the getMappedImportValue(ProjectImportMapper, ExternalCustomFieldValue, FieldConfig)
method.
It is valid for implementors of this method to return null
, and this will be treated the same as an empty MessageSet
.
projectImportMapper | contains a fully populated and validated ProjectImportMapper which contains system mappings that the custom fields can use to determine if the value is one that they can map. |
---|---|
customFieldValue | the Object representation of the stored custom field value. |
fieldConfig | the relevant FieldConfig that the custom field value is in use with. This will allow the custom field to lookup any relevant options that it may have configured. |
i18n | an i18nHelper setup from the custom fields configuration that can be used to i18n error and warning messages. |
The custom field needs to determine what the "mapped" value will be for the provided custom field value and return this new string representation of the value. This value may come from the passed in project import mapper, it may come from mapping custom field options, or may come from an external system.
projectImportMapper | contains a fully populated and validated ProjectImportMapper which contains system mappings that the custom fields can use to determine if the value is one that they can map. |
---|---|
customFieldValue | the Object representation of the stored custom field value. |
fieldConfig | the relevant FieldConfig that the custom field value is in use with. This will allow the custom field to lookup any relevant options that it may have configured. |