com.atlassian.jira.imports.project.parser
Class CustomFieldParserImpl

java.lang.Object
  extended by com.atlassian.jira.imports.project.parser.CustomFieldParserImpl
All Implemented Interfaces:
CustomFieldParser

public class CustomFieldParserImpl
extends Object
implements CustomFieldParser

Since:
v3.13

Field Summary
 
Fields inherited from interface com.atlassian.jira.imports.project.parser.CustomFieldParser
CUSTOM_FIELD_CONFIGURATION_ENTITY_NAME, CUSTOM_FIELD_ENTITY_NAME, CUSTOM_FIELD_SCHEME_ISSUE_TYPE_ENTITY_NAME
 
Constructor Summary
CustomFieldParserImpl()
           
 
Method Summary
 ExternalCustomField parseCustomField(Map attributes)
          Parses the custom field data from the backup XML.
 BackupOverviewBuilderImpl.ConfigurationContext parseCustomFieldConfiguration(Map attributes)
          Parses the custom field configuration context data from the backup XML.
 BackupOverviewBuilderImpl.FieldConfigSchemeIssueType parseFieldConfigSchemeIssueType(Map attributes)
          Parses the custom field issue type configuration context data from the backup XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomFieldParserImpl

public CustomFieldParserImpl()
Method Detail

parseCustomField

public ExternalCustomField parseCustomField(Map attributes)
                                     throws ParseException
Description copied from interface: CustomFieldParser
Parses the custom field data from the backup XML. This handles the custom field name, description, id, etc.

Specified by:
parseCustomField in interface CustomFieldParser
Parameters:
attributes - is a map of key value pairs that represent the attributes of an ExternalCustomField. The following attributes are required, otherwise a ParseException will be thrown:
  • id (required)
  • name (required)
  • customfieldtypekey (required)
Returns:
an ExternalCustomField if the attributes contain the required fields
Throws:
ParseException - if the required fields are not found in the attributes map

parseCustomFieldConfiguration

public BackupOverviewBuilderImpl.ConfigurationContext parseCustomFieldConfiguration(Map attributes)
                                                                             throws ParseException
Description copied from interface: CustomFieldParser
Parses the custom field configuration context data from the backup XML. This provides the project constraints for a custom field and correctly identifies the BackupOverviewBuilderImpl.FieldConfigSchemeIssueType constraints.

Specified by:
parseCustomFieldConfiguration in interface CustomFieldParser
Parameters:
attributes - is a map of key value pairs that represent the attributes of an ConfigurationContext. The following attributes are required, otherwise a ParseException will be thrown:
  • id (required)
  • key (required)
Also, if the key does not start with "customfield_" then we will return a null ConfigurationContext meaning this parser can not handle the value.
Returns:
a ConfigurationContext that identifies a single context for a custom field, null if the ConfigurationContext is not a custom field configuration context.
Throws:
ParseException - if the attributes map does not contain the required fields or the field data is invalid

parseFieldConfigSchemeIssueType

public BackupOverviewBuilderImpl.FieldConfigSchemeIssueType parseFieldConfigSchemeIssueType(Map attributes)
                                                                                     throws ParseException
Description copied from interface: CustomFieldParser
Parses the custom field issue type configuration context data from the backup XML. This provides the issue type constrains for a BackupOverviewBuilderImpl.ConfigurationContext, if any exist.

Specified by:
parseFieldConfigSchemeIssueType in interface CustomFieldParser
Parameters:
attributes - is a map of key value pairs that represent the attributes of an FieldConfigSchemeIssueType. The following attributes are required, otherwise a ParseException will be thrown:
  • id (required)
  • fieldconfigscheme (required)
  • issuetype (required)
Returns:
a FieldConfigSchemeIssueType that identifies the issue types a custom field context is constrained by
Throws:
ParseException - if the attributes do not contain a required field


Copyright © 2002-2012 Atlassian. All Rights Reserved.