public class CustomFieldMapperValidatorImpl extends Object implements CustomFieldMapperValidator
| Constructor and Description |
|---|
CustomFieldMapperValidatorImpl(CustomFieldManager customFieldManager,
ConstantsManager constantsManager,
ProjectManager projectManager) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
customFieldIsValidForRequiredContexts(ExternalCustomFieldConfiguration externalCustomFieldConfiguration,
CustomField newCustomField,
String oldCustomFieldId,
CustomFieldMapper customFieldMapper,
IssueTypeMapper issueTypeMapper,
String projectKey)
Returns true if the new custom field is valid for all the issue types that the old custom field is used from.
|
boolean |
customFieldTypeIsImportable(String customFieldTypeKey)
Returns true if the given customFieldTypeKey from the Project Import exists in the current system, and also
implements the CustomFieldImportable interface.
|
MessageSet |
validateMappings(I18nHelper i18nHelper,
BackupProject backupProject,
IssueTypeMapper issueTypeMapper,
CustomFieldMapper customFieldMapper)
Validates the automatic mappings that have been created to see if the mappings are relevant in the current
JIRA instances setup.
|
public CustomFieldMapperValidatorImpl(CustomFieldManager customFieldManager, ConstantsManager constantsManager, ProjectManager projectManager)
public MessageSet validateMappings(I18nHelper i18nHelper, BackupProject backupProject, IssueTypeMapper issueTypeMapper, CustomFieldMapper customFieldMapper)
CustomFieldMapperValidatorNote that validation of the actual values in the Custom Fields is done separately by the Custom Field itself.
validateMappings in interface CustomFieldMapperValidatori18nHelper - helper bean that allows us to get i18n translationsbackupProject - is the backup project the data is mapped fromissueTypeMapper - is the populated issueTypeMappercustomFieldMapper - is the populated statusMapperpublic boolean customFieldIsValidForRequiredContexts(ExternalCustomFieldConfiguration externalCustomFieldConfiguration, CustomField newCustomField, String oldCustomFieldId, CustomFieldMapper customFieldMapper, IssueTypeMapper issueTypeMapper, String projectKey)
CustomFieldMapperValidatorcustomFieldIsValidForRequiredContexts in interface CustomFieldMapperValidatorexternalCustomFieldConfiguration - contains the configuration of the custom field as defined in the backup XML.newCustomField - is a custom field in the current JIRA instance who's context is being checked.oldCustomFieldId - the old custom field id from the backup XML which will indicate which issue types the
field was used in.customFieldMapper - is the populated custom field mapper.issueTypeMapper - is the populated issue type mapper.projectKey - is the project we are importing into.public boolean customFieldTypeIsImportable(String customFieldTypeKey)
CustomFieldMapperValidatorcustomFieldTypeIsImportable in interface CustomFieldMapperValidatorcustomFieldTypeKey - Key of the CustomField Type that we are checking.Copyright © 2002-2022 Atlassian. All Rights Reserved.