org.broadleafcommerce.common.extensibility.context.merge.handlers
Class NodeReplace

java.lang.Object
  extended by org.broadleafcommerce.common.extensibility.context.merge.handlers.BaseHandler
      extended by org.broadleafcommerce.common.extensibility.context.merge.handlers.NodeReplaceInsert
          extended by org.broadleafcommerce.common.extensibility.context.merge.handlers.NodeReplace
All Implemented Interfaces:
Comparable<Object>, MergeHandler

public class NodeReplace
extends NodeReplaceInsert

This handler is responsible for replacing nodes in the source document with the same nodes from the patch document. This handler will replace all nodes with the same name entirely, regardless of differences in attributes.

Author:
jfischer

Field Summary
 
Fields inherited from class org.broadleafcommerce.common.extensibility.context.merge.handlers.BaseHandler
children, name, priority, xpath
 
Constructor Summary
NodeReplace()
           
 
Method Summary
protected  boolean checkNode(List<Node> usedNodes, Node[] primaryNodes, Node node)
           
protected  boolean replaceNode(Node[] primaryNodes, Node testNode, List<Node> usedNodes)
           
 
Methods inherited from class org.broadleafcommerce.common.extensibility.context.merge.handlers.NodeReplaceInsert
exactNodeExists, merge, replaceNode
 
Methods inherited from class org.broadleafcommerce.common.extensibility.context.merge.handlers.BaseHandler
compareTo, getChildren, getName, getPriority, getXPath, setChildren, setName, setPriority, setXPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeReplace

public NodeReplace()
Method Detail

checkNode

protected boolean checkNode(List<Node> usedNodes,
                            Node[] primaryNodes,
                            Node node)
Overrides:
checkNode in class NodeReplaceInsert

replaceNode

protected boolean replaceNode(Node[] primaryNodes,
                              Node testNode,
                              List<Node> usedNodes)


Copyright © 2012. All Rights Reserved.