|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
org.codehaus.plexus.metadata.merge.support.AbstractMergeableElement
org.codehaus.plexus.metadata.merge.support.AbstractMergeableElementList
public abstract class AbstractMergeableElementList
Base class that allows for handling merging two element lists.
TODO Refactor and make this extendAbstractMergeableElement
which is what
this actually is, but with added bits for merging child element lists.
Field Summary |
---|
Fields inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport |
---|
element |
Constructor Summary | |
---|---|
AbstractMergeableElementList(org.jdom.Element element)
|
Method Summary | |
---|---|
protected abstract java.util.List |
getElementNamesForConflictResolution(java.util.List defaultList)
Sub classes should override if they wish to provide a different combination of composite keys for determining conflicts. |
protected abstract java.lang.String |
getTagNameForRecurringMergeable()
Allows the sub classes to provided a tag name that they expect to recurr within them. |
protected void |
merge(org.jdom.Element parent,
java.util.Map dMap,
java.util.Map rMap)
Identifies the conflicting elements in the dominant and recessive Map instance and merges as required. |
void |
merge(Mergeable me)
Merges an element of same type. |
protected java.util.Map |
parseRecurringMergeables(java.lang.String tagName,
java.util.List compositeKeyList,
Mergeable parentElement)
Parses <component> elements and builds a map keyed basd on the list of composite keys specified. |
Methods inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableElement |
---|
isRecessiveElementInConflict, isRecessiveElementInConflict, merge, mergeableElementComesFromRecessive |
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 Detail |
---|
public AbstractMergeableElementList(org.jdom.Element element)
Method Detail |
---|
protected java.util.Map parseRecurringMergeables(java.lang.String tagName, java.util.List compositeKeyList, Mergeable parentElement) throws java.lang.Exception
tagName
- Name of the tag that appears multiple timescompositeKeyList
- List of element/tag names to be used as composite keys to register recurring
Mergeable
instances.
Mergeable
instances keyed on the composite key obtained from
getElementNamesForConflictResolution(java.util.List)
java.lang.Exception
- if there was an error parsing and registering Mergeable
instancespublic void merge(Mergeable me) throws MergeException
Mergeable
merge
in interface Mergeable
merge
in class AbstractMergeableElement
me
- Another entity that is mergeable.
MergeException
- if there was an error merging the mergeables.protected void merge(org.jdom.Element parent, java.util.Map dMap, java.util.Map rMap) throws java.lang.Exception
Map
instance and merges as required.
parent
- Element
that is parent for the children in the dominant Map instance. Merged content is
added to this element.dMap
- Dominant Map keyed by the composite key obtained from
getElementNamesForConflictResolution(List)
rMap
- Recessive Map keyed by the composite key obtained from
getElementNamesForConflictResolution(List)
java.lang.Exception
- if there was an error merging both the maps.protected abstract java.lang.String getTagNameForRecurringMergeable()
Mergeable
element that occurs multiple times.protected abstract java.util.List getElementNamesForConflictResolution(java.util.List defaultList)
AbstractMergeableSupport
getElementNamesForConflictResolution
in class AbstractMergeableSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |