public class ConfigurationUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
ConfigurationUtil()
Private constructor to block instantiation.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
areAttributesEqual(Configuration c1,
Configuration c2)
Return true if the attributes of both configurations are equal.
|
private static boolean |
areChildrenEqual(Configuration c1,
Configuration c2)
Return true if the children of both configurations are equal.
|
private static boolean |
areValuesEqual(Configuration c1,
Configuration c2)
Return true if the values of two configurations are equal.
|
private static org.w3c.dom.Element |
createElement(org.w3c.dom.Document document,
Configuration configuration)
Create an DOM
Element from a Configuration
object. |
static boolean |
equals(Configuration c1,
Configuration c2)
Test to see if two Configuration's can be considered the same.
|
private static boolean |
findMatchingChild(Configuration c,
java.util.ArrayList matchAgainst)
Return true if find a matching child and remove child from list.
|
static Configuration |
toConfiguration(org.w3c.dom.Element element)
Convert a DOM Element tree into a configuration tree.
|
static org.w3c.dom.Element |
toElement(Configuration configuration)
Convert a configuration tree into a DOM Element tree.
|
static java.lang.String |
toString(Configuration configuration)
Serialize the configuration object to a String.
|
private ConfigurationUtil()
public static Configuration toConfiguration(org.w3c.dom.Element element)
element
- the DOM Elementpublic static org.w3c.dom.Element toElement(Configuration configuration)
configuration
- the configuration objectpublic static java.lang.String toString(Configuration configuration)
DefaultConfigurationSerializer.serialize(Configuration)
lets the caller
handle exceptions.configuration
- Configuration instance to serializeConfiguration
,
or an error message.public static boolean equals(Configuration c1, Configuration c2)
c1
- Configuration to testc2
- Configuration to testprivate static boolean areChildrenEqual(Configuration c1, Configuration c2)
c1
- configuration1c2
- configuration2private static boolean findMatchingChild(Configuration c, java.util.ArrayList matchAgainst)
c
- the configurationmatchAgainst
- the list of items to match againstprivate static boolean areAttributesEqual(Configuration c1, Configuration c2)
c1
- configuration1c2
- configuration2private static boolean areValuesEqual(Configuration c1, Configuration c2)
c1
- configuration1c2
- configuration2private static org.w3c.dom.Element createElement(org.w3c.dom.Document document, Configuration configuration)
Element
from a Configuration
object.document
- the DOM documentconfiguration
- the configuration to convert