org.apache.empire.xml
Class XMLConfiguration

java.lang.Object
  extended by org.apache.empire.commons.ErrorObject
      extended by org.apache.empire.xml.XMLConfiguration
All Implemented Interfaces:
ErrorInfo

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.
 


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.empire.commons.ErrorObject
ErrorObject.ObjectErrorInfo
 
Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
XMLConfiguration()
           
 
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
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

XMLConfiguration

public XMLConfiguration()
Method Detail

init

public boolean init(java.lang.String filename,
                    boolean fromResource,
                    boolean initLogging)
Initialize the configuration.

Parameters:
filename - the file
fromResource - will read from the classpath if true
initLogging - 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-2010 Apache Software Foundation. All Rights Reserved.