org.exist.util
Class Configuration

java.lang.Object
  extended by org.exist.util.Configuration
All Implemented Interfaces:
ErrorHandler
Direct Known Subclasses:
SingleInstanceConfiguration

public class Configuration
extends Object
implements ErrorHandler


Nested Class Summary
static class Configuration.IndexModuleConfig
           
static class Configuration.JobConfig
           
 
Constructor Summary
Configuration()
           
Configuration(String configFilename)
           
Configuration(String configFilename, String existHomeDirname)
           
 
Method Summary
 void configureXACML(Element xacml)
           
 void error(SAXParseException exception)
          (non-Javadoc)
 void fatalError(SAXParseException exception)
          (non-Javadoc)
 String getConfigFilePath()
           
 File getExistHome()
           
 int getInteger(String name)
           
 Object getProperty(String name)
           
 boolean hasProperty(String name)
           
static Boolean parseBoolean(String value, boolean defaultValue)
          Takes the passed string and converts it to a non-null Boolean object.
 void setProperty(String name, Object obj)
           
 void warning(SAXParseException exception)
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
              throws DatabaseConfigurationException
Throws:
DatabaseConfigurationException

Configuration

public Configuration(String configFilename)
              throws DatabaseConfigurationException
Throws:
DatabaseConfigurationException

Configuration

public Configuration(String configFilename,
                     String existHomeDirname)
              throws DatabaseConfigurationException
Throws:
DatabaseConfigurationException
Method Detail

configureXACML

public void configureXACML(Element xacml)

getConfigFilePath

public String getConfigFilePath()

getExistHome

public File getExistHome()

getProperty

public Object getProperty(String name)

hasProperty

public boolean hasProperty(String name)

setProperty

public void setProperty(String name,
                        Object obj)

parseBoolean

public static Boolean parseBoolean(String value,
                                   boolean defaultValue)
Takes the passed string and converts it to a non-null Boolean object. If value is null, the specified default value is used. Otherwise, Boolean.TRUE is returned if and only if the passed string equals "yes" or "true", ignoring case.

Parameters:
value - The string to parse
defaultValue - The default if the string is null
Returns:
The parsed Boolean

getInteger

public int getInteger(String name)

error

public void error(SAXParseException exception)
           throws SAXException
(non-Javadoc)

Specified by:
error in interface ErrorHandler
Throws:
SAXException
See Also:
ErrorHandler.error(org.xml.sax.SAXParseException)

fatalError

public void fatalError(SAXParseException exception)
                throws SAXException
(non-Javadoc)

Specified by:
fatalError in interface ErrorHandler
Throws:
SAXException
See Also:
ErrorHandler.fatalError(org.xml.sax.SAXParseException)

warning

public void warning(SAXParseException exception)
             throws SAXException
(non-Javadoc)

Specified by:
warning in interface ErrorHandler
Throws:
SAXException
See Also:
ErrorHandler.warning(org.xml.sax.SAXParseException)


Copyright (C) Wolfgang Meier. All rights reserved.