com.atlassian.jira.imports.project.parser
Interface EntityPropertyParser

All Known Implementing Classes:
EntityPropertyParserImpl

public interface EntityPropertyParser

Converts entity property xml in a JIRA backup to an object representation and converts the object representation into EntityRepresentation.

Since:
v6.2

Field Summary
static String ENTITY_PROPERTY_ENTITY_NAME
           
 
Method Summary
 EntityRepresentation getEntityRepresentation(ExternalEntityProperty entityProperty, Long newEntityId)
          Gets an EntityRepresentation that contains the correct attributes based on the populated fields in the provided entity property.
 ExternalEntityProperty parse(Map<String,String> attributes)
          Parses the entity property data from the backup XML.
 

Field Detail

ENTITY_PROPERTY_ENTITY_NAME

static final String ENTITY_PROPERTY_ENTITY_NAME
See Also:
Constant Field Values
Method Detail

parse

ExternalEntityProperty parse(Map<String,String> attributes)
                             throws ParseException
Parses the entity property data from the backup XML.

Parameters:
attributes - is a map of key value pairs that represent the attributes of an ExternalEntityProperty. The following attributes are required, otherwise a ParseException will be thrown:
  • id (required)
  • entityName (required)
  • entityId (required)
  • propertyKey (required)
  • value(required)
  • created (required)
  • updated (required)
Returns:
an ExternalEntityProperty if the attributes contain the required fields
Throws:
ParseException - if the required fields are not found in the attributes map

getEntityRepresentation

EntityRepresentation getEntityRepresentation(ExternalEntityProperty entityProperty,
                                             Long newEntityId)
Gets an EntityRepresentation that contains the correct attributes based on the populated fields in the provided entity property.

Parameters:
entityProperty - contains the populated fields that will end up in the EntityRepresentations map
newEntityId - new id for external entity
Returns:
an EntityRepresentation that can be persisted using OfBiz


Copyright © 2002-2014 Atlassian. All Rights Reserved.