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
- Author:
- Rahul Thakur
-
Field Summary
Fields inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
element
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isRecessiveElementInConflict
(AbstractMergeableElement re, String eltName) Deprecated.protected boolean
isRecessiveElementInConflict
(AbstractMergeableElement re, List eltNameList) Detects if there was a conflict, that is the specified element was present in both dominant and recessive element-sets.void
Merges an element of same type.void
merge
(Mergeable me, MergeStrategy strategy) Simply delegate toprotected boolean
Determines 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, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
true
if 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
- RecessiveMergeable
instance.strategy
-MergeStrategy
to apply for merging.- Throws:
MergeException
- if there was an error while merging.- See Also:
-
merge
Description copied from class:AbstractMergeableSupport
Merges an element of same type.- Specified by:
merge
in interfaceMergeable
- Specified by:
merge
in classAbstractMergeableSupport
- Parameters:
me
- Another entity that is mergeable.- Throws:
MergeException
- if there was an error merging the mergeables.
-
isRecessiveElementInConflict(AbstractMergeableElement,List)
instead.