org.chenillekit.core.services.impl
Class ConfigurationServiceImpl

java.lang.Object
  extended by org.chenillekit.core.services.impl.ConfigurationServiceImpl
All Implemented Interfaces:
ConfigurationService

public class ConfigurationServiceImpl
extends Object
implements ConfigurationService

Version:
$Id: ConfigurationServiceImpl.java 670 2010-07-19 09:22:02Z mlusetti $

Constructor Summary
ConfigurationServiceImpl()
           
 
Method Summary
 org.apache.commons.configuration.Configuration getConfiguration()
          get the configuration from system (JVM).
 org.apache.commons.configuration.Configuration getConfiguration(Context context)
          get the configuration from JNDI context.
 org.apache.commons.configuration.Configuration getConfiguration(DataSource datasource, String table, String nameColumn, String keyColumn, String valueColumn, String name)
          Build a configuration from a table containing multiple configurations.
 org.apache.commons.configuration.Configuration getConfiguration(Resource configurationResource)
          get the configuration from the named resource.
 org.apache.commons.configuration.Configuration getConfiguration(Resource configurationResource, boolean mergeWithSysProps)
          get the configuration from the named resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationServiceImpl

public ConfigurationServiceImpl()
Method Detail

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration(Resource configurationResource)
get the configuration from the named resource.

the system properties merged auto. into the returned configuration

Specified by:
getConfiguration in interface ConfigurationService
Parameters:
configurationResource - the configuration resource
Returns:
the configuration

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration(Resource configurationResource,
                                                                       boolean mergeWithSysProps)
get the configuration from the named resource.

Specified by:
getConfiguration in interface ConfigurationService
Parameters:
configurationResource - the configuration resource
mergeWithSysProps - merge the configuration resource with system properties
Returns:
the configuration

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration(Context context)
get the configuration from JNDI context.

Specified by:
getConfiguration in interface ConfigurationService
Parameters:
context - the JNDI context
Returns:
the configuration

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration()
get the configuration from system (JVM).

Specified by:
getConfiguration in interface ConfigurationService
Returns:
the configuration

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration(DataSource datasource,
                                                                       String table,
                                                                       String nameColumn,
                                                                       String keyColumn,
                                                                       String valueColumn,
                                                                       String name)
Build a configuration from a table containing multiple configurations.

Specified by:
getConfiguration in interface ConfigurationService
Parameters:
datasource - the datasource to connect to the database
table - the name of the table containing the configurations
nameColumn - the column containing the name of the configuration
keyColumn - the column containing the keys of the configuration
valueColumn - the column containing the values of the configuration
name - the name of the configuration


Copyright © 2008-2010 ChenilleKit. All Rights Reserved.