org.apache.empire.xml
Class XMLConfiguration
java.lang.Object
org.apache.empire.commons.ErrorObject
org.apache.empire.xml.XMLConfiguration
- All Implemented Interfaces:
- ErrorInfo
- Direct Known Subclasses:
- SampleAdvConfig, SampleConfig, SampleConfig, SampleConfig
public class XMLConfiguration
- extends ErrorObject
This class manages the configuration of a Java Bean by an xml configuration file.
It also supports configuration of Log4J.
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Method Summary |
boolean |
init(java.lang.String filename,
boolean fromResource,
boolean initLogging)
Initialize the configuration. |
protected boolean |
initLogging()
|
protected boolean |
readConfiguration(java.lang.String fileName,
boolean fromResource)
Reads the configuration file and parses the XML Configuration. |
boolean |
readProperties(java.lang.Object bean,
java.lang.String propertiesNodeName)
|
protected void |
setPropertyValue(java.lang.Object bean,
org.w3c.dom.Node item)
|
Methods inherited from class org.apache.empire.commons.ErrorObject |
clearError, clearErrorInfo, error, error, error, error, error, error, error, getErrorInfo, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, internalSetError, isExceptionsEnabled, setExceptionsEnabled, success |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
XMLConfiguration
public XMLConfiguration()
init
public boolean init(java.lang.String filename,
boolean fromResource,
boolean initLogging)
- Initialize the configuration.
- Parameters:
filename
- the filefromResource
- will read from the classpath if trueinitLogging
- set to true to set up logging
- Returns:
- true on succes
readConfiguration
protected boolean readConfiguration(java.lang.String fileName,
boolean fromResource)
- Reads the configuration file and parses the XML Configuration.
initLogging
protected boolean initLogging()
readProperties
public boolean readProperties(java.lang.Object bean,
java.lang.String propertiesNodeName)
setPropertyValue
protected void setPropertyValue(java.lang.Object bean,
org.w3c.dom.Node item)
Copyright © 2008-2009 Apache Software Foundation. All Rights Reserved.