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

java.lang.Object
  extended by org.broadleafcommerce.common.extensibility.context.merge.handlers.BaseHandler
All Implemented Interfaces:
Comparable<Object>, MergeHandler
Direct Known Subclasses:
AttributePreserveInsert, InsertChildrenOf, InsertItems, NodeReplaceInsert, NodeValueMerge

public abstract class BaseHandler
extends Object
implements MergeHandler, Comparable<Object>

Convenience base class which all handler implementations extend. This class provides the common properties required by all MergeHandler implemenations.

Author:
jfischer

Field Summary
protected  MergeHandler[] children
           
protected  String name
           
protected  int priority
           
protected  String xpath
           
 
Constructor Summary
BaseHandler()
           
 
Method Summary
 int compareTo(Object arg0)
           
 MergeHandler[] getChildren()
          Retrieve any child merge handlers associated with this handler.
 String getName()
          Retrieve the name associated with this merge handlers.
 int getPriority()
          Retrieve the priority for the handler.
 String getXPath()
          Retrieve the XPath query associated with this handler.
 void setChildren(MergeHandler[] children)
          Set the child merge handlers
 void setName(String name)
          Set the period-delimited numeric string that names this handler
 void setPriority(int priority)
          Set the priority for this handler
 void setXPath(String xpath)
          Set the xpath query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.common.extensibility.context.merge.handlers.MergeHandler
merge
 

Field Detail

priority

protected int priority

xpath

protected String xpath

children

protected MergeHandler[] children

name

protected String name
Constructor Detail

BaseHandler

public BaseHandler()
Method Detail

getPriority

public int getPriority()
Description copied from interface: MergeHandler
Retrieve the priority for the handler. Priorities are used by the MergeManager to establish the order of operations for performing merges.

Specified by:
getPriority in interface MergeHandler
Returns:
the priority value

getXPath

public String getXPath()
Description copied from interface: MergeHandler
Retrieve the XPath query associated with this handler. XPath is used by the handler to define to section of the source and patch documents that will be merged.

Specified by:
getXPath in interface MergeHandler
Returns:
the xpath query

setPriority

public void setPriority(int priority)
Description copied from interface: MergeHandler
Set the priority for this handler

Specified by:
setPriority in interface MergeHandler

setXPath

public void setXPath(String xpath)
Description copied from interface: MergeHandler
Set the xpath query

Specified by:
setXPath in interface MergeHandler

compareTo

public int compareTo(Object arg0)
Specified by:
compareTo in interface Comparable<Object>

getChildren

public MergeHandler[] getChildren()
Description copied from interface: MergeHandler
Retrieve any child merge handlers associated with this handler. Child merge handlers may be added alter merge behavior for a subsection of the merge area defined by this merge handler.

Specified by:
getChildren in interface MergeHandler
Returns:
child merge handlers

setChildren

public void setChildren(MergeHandler[] children)
Description copied from interface: MergeHandler
Set the child merge handlers

Specified by:
setChildren in interface MergeHandler

getName

public String getName()
Description copied from interface: MergeHandler
Retrieve the name associated with this merge handlers. Merge handler names are period-delimited numeric strings that define the hierarchical relationship of mergehandlers and their children. For example, "2" could be used to define the second handler in the configuration list and "2.1" would be the name describing the first child handler of "2".

Specified by:
getName in interface MergeHandler
Returns:
the period-delimited numeric string that names this handler

setName

public void setName(String name)
Description copied from interface: MergeHandler
Set the period-delimited numeric string that names this handler

Specified by:
setName in interface MergeHandler


Copyright © 2013. All Rights Reserved.