| java.lang.Object org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl
All known Subclasses: org.apache.ojb.broker.util.configuration.impl.OjbConfiguration, org.apache.ojb.broker.util.logging.LoggingConfiguration,
ConfigurationAbstractImpl | abstract public class ConfigurationAbstractImpl implements Configuration(Code) | | Configuration Base Class that
keeps a Properties based configuration persistent in a file.
This class provides only basic infrastructure for loading etc.
author: Thomas Mahler version: $Id: ConfigurationAbstractImpl.java,v 1.15.2.4 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 byte | getByte(String key, byte defaultValue) | 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, Class assignable) 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 long | getLong(String key, long defaultValue) | 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 ";". | protected void | load() Loads the Configuration from the properties file. | protected void | setFilename(String name) | public void | setLogger(Logger loggerInstance) |
filename | protected String filename(Code) | | the name of the properties file
|
properties | protected Properties properties(Code) | | the properties object holding the configuration data
|
ConfigurationAbstractImpl | public ConfigurationAbstractImpl()(Code) | | The constructor loads the configuration from file
|
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.
See Also: ConfigurationAbstractImpl.trueValues See Also: ConfigurationAbstractImpl.falseValues Parameters: key - the key Parameters: defaultValue - the default Value the value for the key, or defaultValue |
getByte | public byte getByte(String key, byte defaultValue)(Code) | | |
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, 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)(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 |
getLong | public long getLong(String key, long defaultValue)(Code) | | |
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 in defaultValue See Also: StringTokenizer |
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 in defaultValue |
|
|