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

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

public class EntityPropertyParserImpl
extends Object
implements EntityPropertyParser

Since:
v6.2

Field Summary
 
Fields inherited from interface com.atlassian.jira.imports.project.parser.EntityPropertyParser
ENTITY_PROPERTY_ENTITY_NAME
 
Constructor Summary
EntityPropertyParserImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityPropertyParserImpl

public EntityPropertyParserImpl()
Method Detail

parse

public ExternalEntityProperty parse(Map<String,String> attributes)
                             throws ParseException
Description copied from interface: EntityPropertyParser
Parses the entity property data from the backup XML.

Specified by:
parse in interface EntityPropertyParser
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

public EntityRepresentation getEntityRepresentation(ExternalEntityProperty entityProperty,
                                                    Long newEntityId)
Description copied from interface: EntityPropertyParser
Gets an EntityRepresentation that contains the correct attributes based on the populated fields in the provided entity property.

Specified by:
getEntityRepresentation in interface EntityPropertyParser
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.