Class BaseHandler
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
Convenience base class which all handler implementations extend. This class
provides the common properties required by all MergeHandler implemenations.
- Author:
- jfischer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintRetrieve any child merge handlers associated with this handler.getName()Retrieve the name associated with this merge handlers.intRetrieve the priority for the handler.getXPath()Retrieve the XPath query associated with this handler.voidsetChildren(MergeHandler[] children) Set the child merge handlersvoidSet the period-delimited numeric string that names this handlervoidsetPriority(int priority) Set the priority for this handlervoidSet the xpath queryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.broadleafcommerce.common.extensibility.context.merge.handlers.MergeHandler
merge
-
Field Details
-
priority
protected int priority -
xpath
-
children
-
name
-
-
Constructor Details
-
BaseHandler
public BaseHandler()
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:MergeHandlerRetrieve the priority for the handler. Priorities are used by the MergeManager to establish the order of operations for performing merges.- Specified by:
getPriorityin interfaceMergeHandler- Returns:
- the priority value
-
setPriority
public void setPriority(int priority) Description copied from interface:MergeHandlerSet the priority for this handler- Specified by:
setPriorityin interfaceMergeHandler
-
getXPath
Description copied from interface:MergeHandlerRetrieve 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:
getXPathin interfaceMergeHandler- Returns:
- the xpath query
-
setXPath
Description copied from interface:MergeHandlerSet the xpath query- Specified by:
setXPathin interfaceMergeHandler
-
compareTo
- Specified by:
compareToin interfaceComparable<Object>
-
getChildren
Description copied from interface:MergeHandlerRetrieve 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:
getChildrenin interfaceMergeHandler- Returns:
- child merge handlers
-
setChildren
Description copied from interface:MergeHandlerSet the child merge handlers- Specified by:
setChildrenin interfaceMergeHandler
-
getName
Description copied from interface:MergeHandlerRetrieve 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:
getNamein interfaceMergeHandler- Returns:
- the period-delimited numeric string that names this handler
-
setName
Description copied from interface:MergeHandlerSet the period-delimited numeric string that names this handler- Specified by:
setNamein interfaceMergeHandler
-