SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.conf
Class Configurations

java.lang.Object
  |
  +--com.solarmetric.kodo.conf.Configurations

public class Configurations
extends Object

Utility methods dealing with configuration.


Constructor Summary
Configurations()
           
 
Method Summary
static void configureInstance(Object obj, String properties)
           
static Object createInstance(String clsName, Properties properties, ClassLoader loader)
          Creates an instance of the given class ane configures it with the given properties.
static Object createInstance(String clsName, String properties, ClassLoader loader)
          Creates an instance of the given class ane configures it with the given properties.
static Object lookup(String name)
          Looks up the given name in JNDI.
static Options parseOptions(String properties)
           
static void populateConfiguration(Configuration conf, Options opts)
          Set the given Configuration instance from the command line options provided.
static Properties replaceVariables(Properties properties)
          Replace variables in property values of the form ${variable} with the key of that value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configurations

public Configurations()
Method Detail

createInstance

public static Object createInstance(String clsName,
                                    Properties properties,
                                    ClassLoader loader)
Creates an instance of the given class ane configures it with the given properties.

createInstance

public static Object createInstance(String clsName,
                                    String properties,
                                    ClassLoader loader)
Creates an instance of the given class ane configures it with the given properties. Property settings should be in the form "prop1=val1 prop2=val2 ...". If the given class is null, null is returned.

parseOptions

public static Options parseOptions(String properties)

replaceVariables

public static Properties replaceVariables(Properties properties)

Replace variables in property values of the form ${variable} with the key of that value. E.g.,

  foo=bar
  baz=${foo}
  

Will result in:

  foo=bar
  baz=bar
  


configureInstance

public static void configureInstance(Object obj,
                                     String properties)

lookup

public static Object lookup(String name)
Looks up the given name in JNDI. If the name is null, null is returned.

populateConfiguration

public static void populateConfiguration(Configuration conf,
                                         Options opts)
Set the given Configuration instance from the command line options provided. All property names of the given configuration are recognized; additionally, if a properties argument exists, the Properties instance it points to will be loaded and set into the given configuration instance.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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