|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.excalibur.configuration.ConfigurationUtil
General utility supporting static operations for generating string representations of a configuration suitable for debugging.
| Constructor Summary | |
ConfigurationUtil()
|
|
| Method Summary | |
static boolean |
equals(Configuration c1,
Configuration c2)
Test to see if two Configuration's can be considered the same. |
static String |
list(Configuration config)
Returns a simple string representation of the the supplied configuration. |
static void |
list(StringBuffer buffer,
String lead,
Configuration config)
populates a string buffer with an XML representation of a supplied configuration. |
static Configuration[] |
match(Configuration config,
String element,
String attribute)
Return all occurance of a configuration child containing the supplied attribute name. |
static Configuration[] |
match(Configuration config,
String element,
String attribute,
String value)
Return occurance of a configuration child containing the supplied attribute name and value. |
static Configuration |
matchFirstOccurance(Configuration config,
String element,
String attribute,
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 Configuration |
matchFirstOccurance(Configuration config,
String element,
String attribute,
String value,
boolean create)
Return the first occurance of a configuration child containing the supplied attribute name and value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConfigurationUtil()
| Method Detail |
public static String list(Configuration config)
config - a configuration
public static void list(StringBuffer buffer,
String lead,
Configuration config)
buffer - the string bufferlead - padding offsetconfig - a configuration
public static Configuration[] match(Configuration config,
String element,
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 Configuration[] match(Configuration config,
String element,
String attribute,
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 Configuration matchFirstOccurance(Configuration config,
String element,
String attribute,
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 Configuration matchFirstOccurance(Configuration config,
String element,
String attribute,
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 match
public static boolean equals(Configuration c1,
Configuration c2)
c1 - Configuration to testc2 - Configuration to test
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||