|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.solarmetric.kodo.conf.DefaultConfiguration
This Configuration type initializes from the settings in
either the kodo.properties
properties file. Any recognized
property can also be overridden by setting the System property of the same
name to the desired value.
Either file must be located at the top level of the CLASSPATH for the
context loader of the creating thread. Alternatively, the location of
the properties file can be specified by setting the
com.solarmetric.kodo.properties
system property.
Note that changing any properties of this Configuration will not result in changes to the files, and therefore will not be visible to other instances or after the JVM has restarted.
See the Configuration
interface for lists of recognized
properties, XML preferences.
Field Summary | |
(package private) static Localizer |
_loc
|
(package private) org.apache.commons.logging.Log |
_log
|
Fields inherited from interface com.solarmetric.kodo.conf.Configuration |
LOG_CACHE, LOG_CONF, LOG_ENHANCE, LOG_METADATA, LOG_PERFORMANCE, LOG_PORTABILITY, LOG_QUERY, LOG_RUNTIME |
Fields inherited from interface java.beans.BeanInfo |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
Constructor Summary | |
DefaultConfiguration()
|
Method Summary | |
protected void |
checkFrozen()
Checks if the configuration has been frozen and if so throws a JDOUserException , otherwise returns silently. |
Object |
clone()
Returns a clone of this Configuration. |
Configuration |
configurationClone()
Return a new Configuration that is an exact copy of this one. |
boolean |
equals(Object other)
Performs the equality check based on set property values from toProperties() . |
void |
freeze()
Freeze this Configuration; if frozen, calls to any setter methods will throw a JDOUserException . |
void |
fromProperties(Properties properties)
Set this Configuration via the given Properties. |
protected org.apache.commons.logging.Log |
getLog()
|
abstract Value[] |
getValues()
|
int |
hashCode()
Computes hash code based on set property values from toProperties() . |
boolean |
isFrozen()
Return true if this Configuration has been frozen. |
protected void |
loadDefaults()
Invoke this method to load default values from properties. |
void |
setProperties(String resourceName)
Sets the name of the properties resource that will be resolved against the current Thread 's context class loader as the
resource that contains the properties to use to initialize this
Configuration. |
void |
setPropertiesFile(File file)
Set the File that will be used to load the properties. |
void |
setPropertiesInputStream(InputStream in)
Initialize this Configuration from the specified InputStream . |
Properties |
toProperties()
A Properties representation of this Configuration. |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface java.beans.BeanInfo |
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors |
Field Detail |
static Localizer _loc
transient org.apache.commons.logging.Log _log
Constructor Detail |
public DefaultConfiguration()
Method Detail |
protected void loadDefaults()
protected org.apache.commons.logging.Log getLog()
public void setProperties(String resourceName) throws IOException
Thread
's context class loader as the
resource that contains the properties to use to initialize this
Configuration.resourceName
- the name of the resource to usepublic void setPropertiesInputStream(InputStream in) throws IOException
InputStream
.in
- the InputStream that contains the properties informationpublic void setPropertiesFile(File file) throws IOException
File
that will be used to load the properties.file
- the File that contains the properties resource.public void freeze()
Configuration
JDOUserException
.freeze
in interface Configuration
public boolean isFrozen()
Configuration
isFrozen
in interface Configuration
public Object clone()
Configuration
clone
in interface Configuration
clone
in class Object
public Configuration configurationClone()
Configuration
configurationClone
in interface Configuration
public final Properties toProperties()
Configuration
toProperties
in interface Configuration
public void fromProperties(Properties properties)
Configuration
fromProperties
in interface Configuration
protected void checkFrozen()
JDOUserException
, otherwise returns silently. Implementations
should call this method before setting any state.public boolean equals(Object other)
toProperties()
.equals
in class Object
public int hashCode()
toProperties()
.hashCode
in class Object
public abstract Value[] getValues()
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |