org.apache.commons.configuration
Class BasePathConfiguration

java.lang.Object
  extended byorg.apache.commons.configuration.AbstractConfiguration
      extended byorg.apache.commons.configuration.BaseConfiguration
          extended byorg.apache.commons.configuration.BasePathConfiguration
All Implemented Interfaces:
BasePathLoader, Configuration
Direct Known Subclasses:
BasePropertiesConfiguration, XMLConfiguration

public abstract class BasePathConfiguration
extends BaseConfiguration
implements BasePathLoader

This is exactly the same as the BaseConfiguration but the backing store is based on a path (e.g. a file path) from which it is loaded.

Version:
$Id: BasePathConfiguration.java,v 1.1.1.1 2003/12/23 15:09:05 epugh Exp $
Author:
Henning P. Schmiedehausen, Oliver Heger

Nested Class Summary
 
Nested classes inherited from class org.apache.commons.configuration.AbstractConfiguration
AbstractConfiguration.Container, AbstractConfiguration.PropertiesTokenizer
 
Field Summary
private  java.lang.String basePath
          Base path of the configuration file used to create this Configuration object.
 
Fields inherited from class org.apache.commons.configuration.BaseConfiguration
 
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration
defaults, END_TOKEN, START_TOKEN
 
Constructor Summary
BasePathConfiguration()
           
 
Method Summary
 java.lang.String getBasePath()
          Returns the Base path from which this Configuration Factory operates.
 void setBasePath(java.lang.String basePath)
          Sets the basePath for all file references from this Configuration Factory.
 
Methods inherited from class org.apache.commons.configuration.BaseConfiguration
addPropertyDirect, clearProperty, containsKey, getKeys, getPropertyDirect, isEmpty
 
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration
addProperty, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolateHelper, processString, setProperty, subset, testBoolean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basePath

private java.lang.String basePath
Base path of the configuration file used to create this Configuration object. Might be null, then a "synthetic" PropertyConfiguration has been created which is not loaded from a file

Constructor Detail

BasePathConfiguration

public BasePathConfiguration()
Method Detail

getBasePath

public java.lang.String getBasePath()
Returns the Base path from which this Configuration Factory operates. This is never null. If you set the BasePath to null, then "." is returned.

Specified by:
getBasePath in interface BasePathLoader
Returns:
The base Path of this configuration factory.

setBasePath

public void setBasePath(java.lang.String basePath)
Sets the basePath for all file references from this Configuration Factory. If you pass null in, this is interpreted as "current directory".

Specified by:
setBasePath in interface BasePathLoader
Parameters:
basePath - The new basePath to set.