Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.0.3 generated on February 20 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.conf
Interface Configuration

All Superinterfaces:
  BeanInfo, com.solarmetric.util.Closeable, Serializable

All Known Subinterfaces:
  JDBCConfiguration, JDOConfiguration, JDOConnectionFactory, JDOManagedConnectionFactory

All Known Implementing Classes:
  ConfigurationImpl

public interface Configuration
extends BeanInfo, Serializable, com.solarmetric.util.Closeable

Interface for generic configuration objects. Includes the ability to write configuration to and from `Properties` instances.

Any property names ending in `Properties` can be used to configure the object they pertain to using a simple space-delimited, properties-style string. For example, if a hypothetical property `LogFactoryClass` is set to a class with methods `setLogFile (String)` and `setAppend (boolean)`, then these properties can be automatically set on the instance instantiated from this class by specifying a `LogFactoryProperties` string like: '`logFile=/tmp/log.txt append=true`'.

Field Summary
`static String` | `ATTRIBUTE_ALLOWED_VALUES` Attribute of returned `Value` property descriptors listing recognized values for the property.
`static String` | `ATTRIBUTE_TYPE` Attribute of the returned `Value` property descriptors naming the property's type or category.

Fields inherited from interface java.beans.BeanInfo
`ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32`

Method Summary
`void` | `close()` Free the resources used by this object.
`void` | `fromProperties(Properties properties)` Set this Configuration via the given Properties.
`org.apache.commons.logging.Log` | `getLog(String category)` Return the log for the given category.
`org.apache.commons.logging.LogFactory` | `getLogFactory()` The log factory.
`Value` | `getValue(String property)` Return a `Value` for a given property.
`Value[]` | `getValues()` Return the set of all `Value`s.
`boolean` | `isCaching()` Return whether `Properties` conversions are cached.
`boolean` | `isFrozen()` Return true if this Configuration has been frozen.
`void` | `setCaching(boolean cache)` Set whether to optimize `Properties` conversion by caching `Value` states.
`void` | `setFrozen(boolean frozen)` Lock down the configuration's state.
`void` | `setLog(String category, org.apache.commons.logging.Log log)` Set the log for the given category.
`void` | `setLogFactory(org.apache.commons.logging.LogFactory factory)` log factory.
`Properties` | `toProperties()` A Properties representation of this Configuration.

Methods inherited from interface java.beans.BeanInfo
`getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors`

Field Detail

### ATTRIBUTE_ALLOWED_VALUES

    public static final String ATTRIBUTE_ALLOWED_VALUES

  Attribute of returned `Value` property descriptors listing recognized values for the property.

### ATTRIBUTE_TYPE

    public static final String ATTRIBUTE_TYPE

  Attribute of the returned `Value` property descriptors naming the property's type or category.

Method Detail

### getLogFactory

    public org.apache.commons.logging.LogFactory getLogFactory()

  The log factory. Kodo employs the jakarta logging framework. If no log factory has been set explicitly, the default factory is used.

### setLogFactory

    public void setLogFactory(org.apache.commons.logging.LogFactory factory)

  log factory. Kodo employs the jakarta logging framework.

### getLog

    public org.apache.commons.logging.Log getLog(String category)

  Return the log for the given category.
  See Also:
    `getLogFactory()`

### setLog

    public void setLog(String category,
                       org.apache.commons.logging.Log log)

  Set the log for the given category.
  See Also:
    `setLogFactory(org.apache.commons.logging.LogFactory)`

### getValue

    public Value getValue(String property)

  Return a `Value` for a given property.

### getValues

    public Value[] getValues()

  Return the set of all `Value`s.

### setCaching

    public void setCaching(boolean cache)

  Set whether to optimize `Properties` conversion by caching `Value` states.

### isCaching

    public boolean isCaching()

  Return whether `Properties` conversions are cached.

### setFrozen

    public void setFrozen(boolean frozen)

  Lock down the configuration's state. Attempting to set state after a configuration has been frozen results in a `IllegalStateException`.

### isFrozen

    public boolean isFrozen()

  Return true if this Configuration has been frozen.

### toProperties

    public Properties toProperties()

  A Properties representation of this Configuration. Note that changes made to this Properties object will not be automatically reflected in this Configuration object.

### fromProperties

    public void fromProperties(Properties properties)

  Set this Configuration via the given Properties. Any keys missing from the given properties will not be set. Note that changes made to this Properties object will not be automatically reflected in this Configuration object.

### close

    public void close()

  Free the resources used by this object.
  Specified by:
    `close` in interface `com.solarmetric.util.Closeable`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.0.3 generated on February 20 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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