com.parabon.ec.util
Class LocatedPropertiesConfiguration

java.lang.Object
  extended by org.apache.commons.configuration.event.EventSource
      extended by org.apache.commons.configuration.AbstractConfiguration
          extended by org.apache.commons.configuration.BaseConfiguration
              extended by org.apache.commons.configuration.AbstractFileConfiguration
                  extended by org.apache.commons.configuration.PropertiesConfiguration
                      extended by com.parabon.ec.util.LocatedPropertiesConfiguration
All Implemented Interfaces:
java.lang.Cloneable, org.apache.commons.configuration.Configuration, org.apache.commons.configuration.FileConfiguration

public class LocatedPropertiesConfiguration
extends org.apache.commons.configuration.PropertiesConfiguration

A properties configuration database where the file each property was read from is stored with the property along with its value.

Author:
curt

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.configuration.PropertiesConfiguration
org.apache.commons.configuration.PropertiesConfiguration.PropertiesReader, org.apache.commons.configuration.PropertiesConfiguration.PropertiesWriter
 
Field Summary
 
Fields inherited from class org.apache.commons.configuration.AbstractFileConfiguration
autoSave, basePath, EVENT_RELOAD, fileName, strategy
 
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN
 
Constructor Summary
LocatedPropertiesConfiguration()
          Constructs empty database.
LocatedPropertiesConfiguration(java.io.File file)
          Constructs database loaded from property file.
LocatedPropertiesConfiguration(java.lang.String filename)
          Constructs database loaded from a property file.
 
Method Summary
protected  void addPropertyDirect(java.lang.String key, java.lang.Object value)
           
 java.lang.String getOrigin()
          Gets the origin of parameters in this database.
 void setOrigin(java.lang.String location)
          Sets the origin of the parameters loaded into this database.
 
Methods inherited from class org.apache.commons.configuration.PropertiesConfiguration
clone, createLayout, getHeader, getInclude, getIncludesAllowed, getLayout, load, save, setBasePath, setHeader, setInclude, setIncludesAllowed, setLayout, unescapeJava
 
Methods inherited from class org.apache.commons.configuration.AbstractFileConfiguration
addProperty, clearProperty, containsKey, enterNoReload, exitNoReload, fireEvent, getBasePath, getEncoding, getFile, getFileName, getKeys, getPath, getProperty, getReloadingStrategy, getURL, isAutoSave, isEmpty, load, load, load, load, load, load, possiblySave, reload, save, save, save, save, save, save, setAutoSave, setEncoding, setFile, setFileName, setPath, setProperty, setReloadingStrategy, setURL
 
Methods inherited from class org.apache.commons.configuration.BaseConfiguration
clear, clearPropertyDirect
 
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration
addErrorLogListener, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getList, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, getSubstitutor, interpolate, interpolate, interpolateHelper, isDelimiterParsingDisabled, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setThrowExceptionOnMissing, subset
 
Methods inherited from class org.apache.commons.configuration.event.EventSource
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.configuration.Configuration
clear, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, subset
 

Constructor Detail

LocatedPropertiesConfiguration

public LocatedPropertiesConfiguration()
Constructs empty database.


LocatedPropertiesConfiguration

public LocatedPropertiesConfiguration(java.lang.String filename)
                               throws org.apache.commons.configuration.ConfigurationException
Constructs database loaded from a property file.

Parameters:
filename - Property file
Throws:
org.apache.commons.configuration.ConfigurationException

LocatedPropertiesConfiguration

public LocatedPropertiesConfiguration(java.io.File file)
                               throws org.apache.commons.configuration.ConfigurationException
Constructs database loaded from property file.

Parameters:
file - Property file
Throws:
org.apache.commons.configuration.ConfigurationException
Method Detail

setOrigin

public void setOrigin(java.lang.String location)
Sets the origin of the parameters loaded into this database. For parameters read from a file this is normally the file's pathname.

Parameters:
location - Human-readable origin string.

getOrigin

public java.lang.String getOrigin()
Gets the origin of parameters in this database.

Returns:
Origin string.

addPropertyDirect

protected void addPropertyDirect(java.lang.String key,
                                 java.lang.Object value)
Overrides:
addPropertyDirect in class org.apache.commons.configuration.BaseConfiguration