|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.imports.project.customfield.NoTransformationCustomFieldImporter
@PublicApi public class NoTransformationCustomFieldImporter
This class provides an implementation of ProjectCustomFieldImporter for Custom Fields which don't need to transform the custom field value upon import into a new JIRA instance. This would be used for any Custom Fields that store a "literal value" - eg text, date, etc.
The getMappedImportValue(com.atlassian.jira.imports.project.mapper.ProjectImportMapper, com.atlassian.jira.imports.project.customfield.ExternalCustomFieldValue, com.atlassian.jira.issue.fields.config.FieldConfig)
method will just return the original value, and the ProjectCustomFieldImporter.canMapImportValue(com.atlassian.jira.imports.project.mapper.ProjectImportMapper, com.atlassian.jira.imports.project.customfield.ExternalCustomFieldValue, com.atlassian.jira.issue.fields.config.FieldConfig, com.atlassian.jira.util.I18nHelper)
method
will never return errors or warnings.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.imports.project.customfield.ProjectCustomFieldImporter |
---|
ProjectCustomFieldImporter.MappedCustomFieldValue |
Constructor Summary | |
---|---|
NoTransformationCustomFieldImporter()
|
Method Summary | |
---|---|
MessageSet |
canMapImportValue(ProjectImportMapper projectImportMapper,
ExternalCustomFieldValue customFieldValue,
FieldConfig fieldConfig,
I18nHelper i18n)
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. |
ProjectCustomFieldImporter.MappedCustomFieldValue |
getMappedImportValue(ProjectImportMapper projectImportMapper,
ExternalCustomFieldValue customFieldValue,
FieldConfig fieldConfig)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoTransformationCustomFieldImporter()
Method Detail |
---|
public MessageSet canMapImportValue(ProjectImportMapper projectImportMapper, ExternalCustomFieldValue customFieldValue, FieldConfig fieldConfig, I18nHelper i18n)
ProjectCustomFieldImporter
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 ProjectCustomFieldImporter.getMappedImportValue(com.atlassian.jira.imports.project.mapper.ProjectImportMapper, com.atlassian.jira.imports.project.customfield.ExternalCustomFieldValue, com.atlassian.jira.issue.fields.config.FieldConfig)
method.
It is valid for implementors of this method to return null
, and this will be treated the same as an empty MessageSet
.
canMapImportValue
in interface ProjectCustomFieldImporter
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.
public ProjectCustomFieldImporter.MappedCustomFieldValue getMappedImportValue(ProjectImportMapper projectImportMapper, ExternalCustomFieldValue customFieldValue, FieldConfig fieldConfig)
ProjectCustomFieldImporter
getMappedImportValue
in interface ProjectCustomFieldImporter
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |