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

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

public class NodeAssociationParserImpl
extends Object
implements NodeAssociationParser

Since:
v3.13

Field Summary
static String ASSOCIATION_TYPE
           
static String SINK_NODE_ENTITY
           
static String SINK_NODE_ID
           
static String SOURCE_NODE_ENTITY
           
static String SOURCE_NODE_ID
           
 
Fields inherited from interface com.atlassian.jira.imports.project.parser.NodeAssociationParser
AFFECTS_VERSION_TYPE, COMPONENT_TYPE, FIX_VERSION_TYPE, NODE_ASSOCIATION_ENTITY_NAME
 
Constructor Summary
NodeAssociationParserImpl()
           
 
Method Summary
 EntityRepresentation getEntityRepresentation(ExternalNodeAssociation nodeAssociation)
          Gets an EntityRepresentation that contains the correct attributes based on the populated fields in the provided node association.
 ExternalNodeAssociation parse(Map attributes)
          Transforms a set of attributes into a NodeAssociation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE_NODE_ID

public static final String SOURCE_NODE_ID
See Also:
Constant Field Values

SOURCE_NODE_ENTITY

public static final String SOURCE_NODE_ENTITY
See Also:
Constant Field Values

SINK_NODE_ID

public static final String SINK_NODE_ID
See Also:
Constant Field Values

SINK_NODE_ENTITY

public static final String SINK_NODE_ENTITY
See Also:
Constant Field Values

ASSOCIATION_TYPE

public static final String ASSOCIATION_TYPE
See Also:
Constant Field Values
Constructor Detail

NodeAssociationParserImpl

public NodeAssociationParserImpl()
Method Detail

parse

public ExternalNodeAssociation parse(Map attributes)
                              throws ParseException
Description copied from interface: NodeAssociationParser
Transforms a set of attributes into a NodeAssociation.

Specified by:
parse in interface NodeAssociationParser
Parameters:
attributes - is a map of key value pairs that represent the attributes of a NodeAssocation. The following attributes are required, otherwise a ParseException will be thrown:
  • sourceNodeId (required)
  • sourceNodeEntity (required)
  • sinkNodeId (required)
  • sinkNodeEntity (required)
  • associationType (required)
Returns:
a ExternalNodeAssociation if the attributes contain the required attributes.
Throws:
ParseException - If the attributes are invalid.

getEntityRepresentation

public EntityRepresentation getEntityRepresentation(ExternalNodeAssociation nodeAssociation)
Description copied from interface: NodeAssociationParser
Gets an EntityRepresentation that contains the correct attributes based on the populated fields in the provided node association.

Specified by:
getEntityRepresentation in interface NodeAssociationParser
Parameters:
nodeAssociation - contains the populated fields that will end up in the EntityRepresentations map
Returns:
an EntityRepresentation that can be persisted using OfBiz


Copyright © 2002-2014 Atlassian. All Rights Reserved.