org.codehaus.plexus.cdc.merge.support
public abstract class AbstractMergeableElementList extends AbstractMergeableElement
Version: $Id: AbstractMergeableElementList.java 3522 2006-07-12 15:06:21Z brett $
Constructor Summary | |
---|---|
AbstractMergeableElementList(Element element) |
Method Summary | |
---|---|
protected abstract List | getElementNamesForConflictResolution(List defaultList) |
protected abstract String | getTagNameForRecurringMergeable()
Allows the sub classes to provided a tag name that they expect to recurr
within them.
|
void | merge(Mergeable me) |
protected void | merge(Element parent, Map dMap, Map rMap)
Identifies the conflicting elements in the dominant and recessive
Map instance and merges as required.
|
protected Map | parseRecurringMergeables(String tagName, List compositeKeyList, Mergeable parentElement)
Parses <component> elements and builds a map keyed basd on the list of composite keys specified.
|
Returns: tag name of the Mergeable element that occurs multiple times.
Parameters: 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 rMap Recessive Map keyed by the composite key obtained from getElementNamesForConflictResolution
Throws: Exception if there was an error merging both the maps.
Parameters: tagName Name of the tag that appears multiple times compositeKeyList List of element/tag names to be used as composite keys to register recurring Mergeable instances.
Returns: Map of Mergeable instances keyed on the composite key obtained from getElementNamesForConflictResolution
Throws: Exception if there was an error parsing and registering Mergeable instances