org.broadleafcommerce.common.extensibility.context.merge
Class MergePoint

java.lang.Object
  extended by org.broadleafcommerce.common.extensibility.context.merge.MergePoint

public class MergePoint
extends Object

This class provides the xml merging apparatus at a defined XPath merge point in 2 xml documents. The MergeHandler that embodies the XPath point can have embedded XPath merge points, resulting in a cumulative effect with varying merge behavior for a sector of the documents. For example, it may be desirable to replace all the child nodes of a given node with all the child nodes from the same parent node in the patch document, with the exception of a single node. That single node may instead contribute its contents in a additive fashion (rather than replace).

Author:
jfischer

Constructor Summary
MergePoint(MergeHandler handler, Document doc1, Document doc2)
           
 
Method Summary
 Node[] merge(List<Node> exhaustedNodes)
          Execute the merge operation and also provide a list of nodes that have already been merged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergePoint

public MergePoint(MergeHandler handler,
                  Document doc1,
                  Document doc2)
Method Detail

merge

public Node[] merge(List<Node> exhaustedNodes)
             throws XPathExpressionException,
                    TransformerException
Execute the merge operation and also provide a list of nodes that have already been merged. It is up to the handler implementation to respect or ignore this list.

Parameters:
exhaustedNodes -
Returns:
list of merged nodes
Throws:
XPathExpressionException
TransformerException


Copyright © 2012. All Rights Reserved.