org.apache.excalibur.configuration.merged
Class ConfigurationMerger
java.lang.Object
org.apache.excalibur.configuration.merged.ConfigurationMerger
- public class ConfigurationMerger
- extends Object
The ConfigurationMerger will take a Configuration object and layer it over another.
It will use special attributes on the layer's children to control how children
of the layer and base are combined. In order for a child of the layer to be merged with a
child of the base, the following must hold true:
- The child in the layer Configuration has an attribute named
phoenix-configuration:merge
and its value is equal to a boolean
TRUE
- There must be a single child in both the layer and base with the same getName() OR
there exists an attribute named
phoenix-configuration:key-attribute
that names an attribute that exists on both the layer and base that can be used to match
multiple children of the same getName()
- Author:
- Peter Royal
- See Also:
ConfigurationSplitter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationMerger
public ConfigurationMerger()
merge
public static Configuration merge(Configuration layer,
Configuration base)
throws ConfigurationException
- Merge two configurations.
- Parameters:
layer
- Configuration to layer over the basebase
- Configuration layer will be merged with
- Returns:
- Result of merge
- Throws:
ConfigurationException
- if unable to merge
Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.