java.lang.Object
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 Details

    • priority

      protected int priority
    • xpath

      protected String xpath
    • children

      protected MergeHandler[] children
    • name

      protected String name
  • Constructor Details

    • BaseHandler

      public BaseHandler()
  • Method Details

    • 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
    • setPriority

      public void setPriority(int priority)
      Description copied from interface: MergeHandler
      Set the priority for this handler
      Specified by:
      setPriority in interface MergeHandler
    • 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
    • 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