Class AbstractMergeableElement
java.lang.Object
org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
org.codehaus.plexus.metadata.merge.support.AbstractMergeableElement
- All Implemented Interfaces:
Mergeable
- Direct Known Subclasses:
AbstractMergeableElementList,ComponentElement,ComponentSetElement,ConfigurationElement,PlexusRootElement,RequirementElement
-
Field Summary
Fields inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
element -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisRecessiveElementInConflict(AbstractMergeableElement re, String eltName) Deprecated.protected booleanisRecessiveElementInConflict(AbstractMergeableElement re, List eltNameList) Detects if there was a conflict, that is the specified element was present in both dominant and recessive element-sets.voidMerges an element of same type.voidmerge(Mergeable me, MergeStrategy strategy) Simply delegate toprotected booleanDetermines if the Element to be merged is to be sourced from Recessive Element set.Methods inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, detach, equals, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDefaultMergeStrategy, getDescendants, getDescendants, getDocument, getElement, getElementNamesForConflictResolution, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getParent, getParentElement, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, hashCode, indexOf, isAncestor, isExpectedElementType, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codehaus.plexus.metadata.merge.support.Mergeable
getAllowedTags
-
Constructor Details
-
AbstractMergeableElement
public AbstractMergeableElement(org.jdom2.Element element)
-
-
Method Details
-
isRecessiveElementInConflict
Deprecated.Detects if there was a conflict, that is the specified element was present in both dominant and recessive element-sets.This delegates to
isRecessiveElementInConflict(AbstractMergeableElement,List).- Parameters:
re- Recessive element.eltName- Element name to test for.- Returns:
trueif there was a conflict of element.
-
isRecessiveElementInConflict
Detects if there was a conflict, that is the specified element was present in both dominant and recessive element-sets.Use this to determine conflicts when the Dominant and Recessive element sets are keyed with Composite keys.
For instance:
<component>is keyed on<role>and<role-hint>.- Parameters:
re-AbstractMergeableElement.eltNameList- List of elements that will be checked for values in both dominant and recessive sets.- Returns:
- true/false.
-
mergeableElementComesFromRecessive
Determines if the Element to be merged is to be sourced from Recessive Element set.- Parameters:
re- Recessive element.eltName- Element name to test for.- Returns:
- true/false.
-
merge
Simply delegate to- Parameters:
me- RecessiveMergeableinstance.strategy-MergeStrategyto apply for merging.- Throws:
MergeException- if there was an error while merging.- See Also:
-
merge
Description copied from class:AbstractMergeableSupportMerges an element of same type.- Specified by:
mergein interfaceMergeable- Specified by:
mergein classAbstractMergeableSupport- Parameters:
me- Another entity that is mergeable.- Throws:
MergeException- if there was an error merging the mergeables.
-
isRecessiveElementInConflict(AbstractMergeableElement,List)instead.