SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.conf
Class SimpleConfiguration

java.lang.Object
  |
  +--com.solarmetric.rd.conf.AbstractConfiguration
        |
        +--com.solarmetric.rd.conf.SimpleConfiguration
All Implemented Interfaces:
java.beans.BeanInfo, Configuration, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
SimpleJDOConfiguration

public class SimpleConfiguration
extends AbstractConfiguration

Implementation of the Configuration interface. Subclasses can choose to obtain configuration information from JNDI, Properties, a Bean-builder, etc.

On construction, the class will attempt to locate a default properties file called solarmetric.properties located at any top level token of the CLASSPATH. The name of the properties file can be overridden; see the AbstractConfiguration class description for details.

Subclasses should be sure to pass in false to the constructor when they call it, then call AbstractConfiguration.loadDefaults() themselves if they want to load default properties. Otherwise, their field initializations will overwrite the defaults that were loaded.

See Also:
Serialized Form

Field Summary
protected  org.apache.commons.logging.LogFactory logFactory
           
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
SimpleConfiguration()
          Default constructor.
SimpleConfiguration(boolean loadDefaults)
          Constructor.
 
Method Summary
protected  com.solarmetric.rd.conf.BooleanValue addValue(java.lang.String property, java.lang.Class cls, boolean def, java.lang.String type, boolean expert)
          Add the given value to the set of configuration properties.
protected  com.solarmetric.rd.conf.ClassValue addValue(java.lang.String property, java.lang.Class cls, java.lang.Class def, java.lang.Class intf, java.lang.String type, boolean expert)
          Add the given value to the set of configuration properties.
protected  com.solarmetric.rd.conf.ClassValue addValue(java.lang.String property, java.lang.Class cls, java.lang.Class def, java.lang.String[] implementors, java.lang.String type, boolean expert)
          Add the given value to the set of configuration properties.
protected  com.solarmetric.rd.conf.IntValue addValue(java.lang.String property, java.lang.Class cls, int def, java.lang.String type, boolean expert)
          Add the given value to the set of configuration properties.
protected  com.solarmetric.rd.conf.StringValue addValue(java.lang.String property, java.lang.Class cls, java.lang.String def, java.lang.String[] allowed, java.lang.String type, boolean expert)
          Add the given value to the set of configuration properties.
protected  com.solarmetric.rd.conf.StringValue addValue(java.lang.String property, java.lang.Class cls, java.lang.String def, java.lang.String type, boolean expert)
          Add the given value to the set of configuration properties.
protected  com.solarmetric.rd.conf.Value addValue(com.solarmetric.rd.conf.Value val)
          Add the given value to the set of configuration properties.
 org.apache.commons.logging.Log getLog(java.lang.String category)
          Return the log for the given category.
 org.apache.commons.logging.LogFactory getLogFactory()
          The log factory.
protected  java.lang.String getProductName()
          Return the product name.
 java.util.Collection getValues()
          Return the internal set of Value instances.
 void setLog(java.lang.String category, org.apache.commons.logging.Log log)
          Set the log for the given category.
 void setLogFactory(org.apache.commons.logging.LogFactory logFactory)
          log factory.
 
Methods inherited from class com.solarmetric.rd.conf.AbstractConfiguration
checkFrozen, equals, free, fromProperties, getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors, hashCode, isFrozen, loadDefaults, readExternal, setFrozen, setProperties, toProperties, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logFactory

protected org.apache.commons.logging.LogFactory logFactory
Constructor Detail

SimpleConfiguration

public SimpleConfiguration()
Default constructor. Attempts to load default properties from the solarmetric.properties resource. Override the getProductName() method to change the name of the default properties resource.


SimpleConfiguration

public SimpleConfiguration(boolean loadDefaults)
Constructor.

Parameters:
loadDefaults - whether to attempt to load the default solarmetric.properties resource
Method Detail

getProductName

protected java.lang.String getProductName()
Description copied from class: AbstractConfiguration
Return the product name.

Specified by:
getProductName in class AbstractConfiguration
See Also:
AbstractConfiguration.loadDefaults()

setLogFactory

public void setLogFactory(org.apache.commons.logging.LogFactory logFactory)
Description copied from interface: Configuration
log factory. Kodo employs the jakarta logging framework.


getLogFactory

public org.apache.commons.logging.LogFactory getLogFactory()
Description copied from interface: Configuration
The log factory. Kodo employs the jakarta logging framework. If no log factory has been set explicitly, the default factory is used.


setLog

public void setLog(java.lang.String category,
                   org.apache.commons.logging.Log log)
Description copied from interface: Configuration
Set the log for the given category.

See Also:
Configuration.setLogFactory(org.apache.commons.logging.LogFactory)

getLog

public org.apache.commons.logging.Log getLog(java.lang.String category)
Description copied from interface: Configuration
Return the log for the given category.

See Also:
Configuration.getLogFactory()

getValues

public java.util.Collection getValues()
Return the internal set of Value instances.

Specified by:
getValues in class AbstractConfiguration

addValue

protected com.solarmetric.rd.conf.Value addValue(com.solarmetric.rd.conf.Value val)
Add the given value to the set of configuration properties.


addValue

protected com.solarmetric.rd.conf.StringValue addValue(java.lang.String property,
                                                       java.lang.Class cls,
                                                       java.lang.String def,
                                                       java.lang.String type,
                                                       boolean expert)
Add the given value to the set of configuration properties.


addValue

protected com.solarmetric.rd.conf.StringValue addValue(java.lang.String property,
                                                       java.lang.Class cls,
                                                       java.lang.String def,
                                                       java.lang.String[] allowed,
                                                       java.lang.String type,
                                                       boolean expert)
Add the given value to the set of configuration properties.


addValue

protected com.solarmetric.rd.conf.ClassValue addValue(java.lang.String property,
                                                      java.lang.Class cls,
                                                      java.lang.Class def,
                                                      java.lang.Class intf,
                                                      java.lang.String type,
                                                      boolean expert)
Add the given value to the set of configuration properties.


addValue

protected com.solarmetric.rd.conf.ClassValue addValue(java.lang.String property,
                                                      java.lang.Class cls,
                                                      java.lang.Class def,
                                                      java.lang.String[] implementors,
                                                      java.lang.String type,
                                                      boolean expert)
Add the given value to the set of configuration properties.


addValue

protected com.solarmetric.rd.conf.IntValue addValue(java.lang.String property,
                                                    java.lang.Class cls,
                                                    int def,
                                                    java.lang.String type,
                                                    boolean expert)
Add the given value to the set of configuration properties.


addValue

protected com.solarmetric.rd.conf.BooleanValue addValue(java.lang.String property,
                                                        java.lang.Class cls,
                                                        boolean def,
                                                        java.lang.String type,
                                                        boolean expert)
Add the given value to the set of configuration properties.


SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.