public class ConfigurationUtil
extends java.lang.Object
Constructor and Description |
---|
ConfigurationUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(org.apache.avalon.framework.configuration.Configuration c1,
org.apache.avalon.framework.configuration.Configuration c2)
Test to see if two Configuration's can be considered the same.
|
static java.lang.String |
list(org.apache.avalon.framework.configuration.Configuration config)
Returns a simple string representation of the the supplied configuration.
|
static void |
list(java.lang.StringBuffer buffer,
java.lang.String lead,
org.apache.avalon.framework.configuration.Configuration config)
populates a string buffer with an XML representation of a supplied configuration.
|
static org.apache.avalon.framework.configuration.Configuration[] |
match(org.apache.avalon.framework.configuration.Configuration config,
java.lang.String element,
java.lang.String attribute)
Return all occurance of a configuration child containing the supplied attribute name.
|
static org.apache.avalon.framework.configuration.Configuration[] |
match(org.apache.avalon.framework.configuration.Configuration config,
java.lang.String element,
java.lang.String attribute,
java.lang.String value)
Return occurance of a configuration child containing the supplied attribute name and value.
|
static org.apache.avalon.framework.configuration.Configuration |
matchFirstOccurance(org.apache.avalon.framework.configuration.Configuration config,
java.lang.String element,
java.lang.String attribute,
java.lang.String value)
Return the first occurance of a configuration child containing the supplied attribute name
and value or create a new empty configuration if no match found.
|
static org.apache.avalon.framework.configuration.Configuration |
matchFirstOccurance(org.apache.avalon.framework.configuration.Configuration config,
java.lang.String element,
java.lang.String attribute,
java.lang.String value,
boolean create)
Return the first occurance of a configuration child containing the supplied attribute
name and value.
|
public static java.lang.String list(org.apache.avalon.framework.configuration.Configuration config)
config
- a configurationpublic static void list(java.lang.StringBuffer buffer, java.lang.String lead, org.apache.avalon.framework.configuration.Configuration config)
buffer
- the string bufferlead
- padding offsetconfig
- a configurationpublic static org.apache.avalon.framework.configuration.Configuration[] match(org.apache.avalon.framework.configuration.Configuration config, java.lang.String element, java.lang.String attribute)
config
- the configurationelement
- the name of child elements to select from the configurationattribute
- the attribute name to filter (null will match any attribute name)public static org.apache.avalon.framework.configuration.Configuration[] match(org.apache.avalon.framework.configuration.Configuration config, java.lang.String element, java.lang.String attribute, java.lang.String value)
config
- the configurationelement
- the name of child elements to select from the configurationattribute
- the attribute name to filter (null will match any attribute name )value
- the attribute value to match (null will match any attribute value)public static org.apache.avalon.framework.configuration.Configuration matchFirstOccurance(org.apache.avalon.framework.configuration.Configuration config, java.lang.String element, java.lang.String attribute, java.lang.String value)
config
- the configurationelement
- the name of child elements to select from the configurationattribute
- the attribute name to filtervalue
- the attribute value to match (null will match any attribute value)public static org.apache.avalon.framework.configuration.Configuration matchFirstOccurance(org.apache.avalon.framework.configuration.Configuration config, java.lang.String element, java.lang.String attribute, java.lang.String value, boolean create)
config
- the configurationelement
- the name of child elements to select from the configurationattribute
- the attribute name to filtervalue
- the attribute value to match (null will match any attribute value)create
- the creation policy if no matchpublic static boolean equals(org.apache.avalon.framework.configuration.Configuration c1, org.apache.avalon.framework.configuration.Configuration c2)
c1
- Configuration to testc2
- Configuration to testCopyright © 1997-2003 Apache Software Foundation. All Rights Reserved.