| org.apache.ojb.broker.util.configuration.Configuration
All known Subclasses: org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl,
Configuration | public interface Configuration (Code) | | The Configuration interface defines lookup-methods to lookup
typed configuration-values.
For example boolean getBoolean(String key, boolean defaultValue)
looks up a boolean value associated with key .
If no value is found for key the boolean defaultValue
is returned.
author: Thomas Mahler version: $Id: Configuration.java,v 1.5.2.1 2005/12/21 22:28:15 tomdz Exp $ |
Method Summary | |
public boolean | getBoolean(String key, boolean defaultValue) Returns the boolean value for the specified key. | public Class | getClass(String key, Class defaultValue, Class assignable) Returns the class specified by the value for the specified key. | public Class | getClass(String key, Class defaultValue, Class[] assignables) Returns the class specified by the value for the specified key. | public Class | getClass(String key, Class defaultValue) Returns the class specified by the value for the specified key. | public int | getInteger(String key, int defaultValue) Returns the integer value for the specified key. | public String | getString(String key, String defaultValue) Returns the string value for the specified key. | public String[] | getStrings(String key, String defaultValue, String seperators) Gets an array of Strings from the value of the specified key, seperated
by any key from seperators . | public String[] | getStrings(String key, String defaultValue) Gets an array of Strings from the value of the specified key, seperated
by ";". | public void | setLogger(Logger loggerInstance) this method allows to set a logger that tracks configuration events. |
getBoolean | public boolean getBoolean(String key, boolean defaultValue)(Code) | | Returns the boolean value for the specified key. If no value for this key
is found in the configuration or the value is not an legal boolean
defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default Value the value for the key, or defaultValue |
getClass | public Class getClass(String key, Class defaultValue, Class assignable)(Code) | | Returns the class specified by the value for the specified key. If no
value for this key is found in the configuration, no class of this name
can be found or the specified class is not assignable
assignable defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default Value Parameters: assignable - a classe and/or interface the specified class mustextend/implement. the value for the key, or defaultValue |
getClass | public Class getClass(String key, Class defaultValue, Class[] assignables)(Code) | | Returns the class specified by the value for the specified key. If no
value for this key is found in the configuration, no class of this name
can be found or the specified class is not assignable to each
class/interface in assignables defaultValue is
returned.
Parameters: key - the key Parameters: defaultValue - the default Value Parameters: assignables - classes and/or interfaces the specified class mustextend/implement. the value for the key, or defaultValue |
getClass | public Class getClass(String key, Class defaultValue)(Code) | | Returns the class specified by the value for the specified key. If no
value for this key is found in the configuration or no class of this name
can be found defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default Value the value for the key, or defaultValue |
getInteger | public int getInteger(String key, int defaultValue)(Code) | | Returns the integer value for the specified key. If no value for this key
is found in the configuration or the value is not an legal integer
defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default Value the value for the key, or defaultValue |
getString | public String getString(String key, String defaultValue)(Code) | | Returns the string value for the specified key. If no value for this key
is found in the configuration defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default value the value for the key, or defaultValue |
getStrings | public String[] getStrings(String key, String defaultValue, String seperators)(Code) | | Gets an array of Strings from the value of the specified key, seperated
by any key from seperators . If no value for this key
is found the array contained in defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default Value Parameters: seperators - the seprators to be used the strings for the key, or the strings contained indefaultValue |
getStrings | public String[] getStrings(String key, String defaultValue)(Code) | | Gets an array of Strings from the value of the specified key, seperated
by ";". If no value for this key
is found the array contained in defaultValue is returned.
Parameters: key - the key Parameters: defaultValue - the default Value the strings for the key, or the strings contained indefaultValue |
setLogger | public void setLogger(Logger loggerInstance)(Code) | | this method allows to set a logger that tracks configuration events.
Parameters: loggerInstance - the logger to set |
|
|