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
public abstract class AbstractMergeableElement extends AbstractMergeableSupport
- Author:
- Rahul Thakur
-
-
Field Summary
-
Fields inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
element
-
-
Constructor Summary
Constructors Constructor Description AbstractMergeableElement(org.jdom2.Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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.voidmerge(Mergeable me)Merges an element of same type.voidmerge(Mergeable me, MergeStrategy strategy)Simply delegate toprotected booleanmergeableElementComesFromRecessive(AbstractMergeableElement re, String eltName)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
-
-
-
-
Method Detail
-
isRecessiveElementInConflict
protected boolean isRecessiveElementInConflict(AbstractMergeableElement re, String eltName)
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
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.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
protected boolean mergeableElementComesFromRecessive(AbstractMergeableElement re, String eltName)
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
public void merge(Mergeable me, MergeStrategy strategy) throws MergeException
Simply delegate to- Parameters:
me- RecessiveMergeableinstance.strategy-MergeStrategyto apply for merging.- Throws:
MergeException- if there was an error while merging.- See Also:
Mergeable.merge(Mergeable,org.codehaus.plexus.metadata.merge.MergeStrategy)
-
merge
public void merge(Mergeable me) throws MergeException
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.
-
-