org.nnsoft.guice.rocoto.configuration
Class ConfigurationModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.nnsoft.guice.rocoto.configuration.ConfigurationModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class ConfigurationModule
extends com.google.inject.AbstractModule

The ConfigurationModule simplifies the task of loading configurations in Google Guice.


Constructor Summary
ConfigurationModule()
           
 
Method Summary
protected abstract  void bindConfigurations()
           
protected  void bindEnvironmentVariables()
          Add the System Variables properties.
protected  XMLPropertiesFormatBindingBuilder bindProperties(File propertiesResource)
           
protected  void bindProperties(Iterable<Map.Entry<String,String>> properties)
           
protected  void bindProperties(Iterator<Map.Entry<String,String>> properties)
           
protected  void bindProperties(Map<String,String> properties)
           
protected  void bindProperties(Properties properties)
           
protected  XMLPropertiesFormatBindingBuilder bindProperties(String classPathResource)
           
protected  XMLPropertiesFormatBindingBuilder bindProperties(String classPathResource, ClassLoader classLoader)
           
protected  XMLPropertiesFormatBindingBuilder bindProperties(URI propertiesResource)
           
protected  XMLPropertiesFormatBindingBuilder bindProperties(URL propertiesResource)
           
protected  PropertyValueBindingBuilder bindProperty(String name)
          Binds to a property with the given name.
protected  void bindSystemProperties()
          Add the Environment Variables properties, prefixed by env..
protected  void configure()
           
 
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationModule

public ConfigurationModule()
Method Detail

configure

protected final void configure()
Specified by:
configure in class com.google.inject.AbstractModule

bindConfigurations

protected abstract void bindConfigurations()

bindProperty

protected PropertyValueBindingBuilder bindProperty(String name)
Binds to a property with the given name.

Parameters:
name - The property name
Returns:
The property value binder

bindProperties

protected void bindProperties(Properties properties)
Parameters:
properties -

bindProperties

protected void bindProperties(Iterable<Map.Entry<String,String>> properties)
Parameters:
properties -

bindProperties

protected void bindProperties(Iterator<Map.Entry<String,String>> properties)
Parameters:
properties -

bindSystemProperties

protected void bindSystemProperties()
Add the Environment Variables properties, prefixed by env..


bindProperties

protected void bindProperties(Map<String,String> properties)
Parameters:
properties -

bindEnvironmentVariables

protected void bindEnvironmentVariables()
Add the System Variables properties.


bindProperties

protected XMLPropertiesFormatBindingBuilder bindProperties(File propertiesResource)
Parameters:
propertiesResource -
Returns:

bindProperties

protected XMLPropertiesFormatBindingBuilder bindProperties(URI propertiesResource)
Parameters:
propertiesResource -
Returns:

bindProperties

protected XMLPropertiesFormatBindingBuilder bindProperties(String classPathResource)
Parameters:
classPathResource -
Returns:

bindProperties

protected XMLPropertiesFormatBindingBuilder bindProperties(String classPathResource,
                                                           ClassLoader classLoader)
Parameters:
classPathResource -
classLoader -
Returns:

bindProperties

protected XMLPropertiesFormatBindingBuilder bindProperties(URL propertiesResource)
Parameters:
propertiesResource -
Returns:


Copyright © 2010-2012 99 Software Foundation. All Rights Reserved.