org.springmodules.commons.configuration
Class CommonsConfigurationFactoryBean

java.lang.Object
  extended by org.springmodules.commons.configuration.CommonsConfigurationFactoryBean

public class CommonsConfigurationFactoryBean
extends java.lang.Object

FactoryBean which wraps a Commons CompositeConfiguration object for usage with PropertiesLoaderSupport. This allows the configuration object to behave like a normal java.util.Properties object which can be passed on to setProperties() method allowing PropertyOverrideConfigurer and PropertyPlaceholderConfigurer to take advantage of Commons Configuration.

Internally a CompositeConfiguration object is used for merging multiple Configuration objects.

Author:
Costin Leau
See Also:
Properties, org.springframework.core.io.support.PropertiesLoaderSupport

Constructor Summary
CommonsConfigurationFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 Configuration[] getConfigurations()
           
 java.lang.Object getObject()
           
 java.lang.Class getObjectType()
           
 boolean isSingleton()
           
 void setConfigurations(Configuration[] configurations)
          Set the configurations objects which will be used as properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsConfigurationFactoryBean

public CommonsConfigurationFactoryBean()
Method Detail

getObject

public java.lang.Object getObject()
                           throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
org.springframework.beans.factory.FactoryBean#getObject()

getObjectType

public java.lang.Class getObjectType()
See Also:
org.springframework.beans.factory.FactoryBean#getObjectType()

isSingleton

public boolean isSingleton()
See Also:
org.springframework.beans.factory.FactoryBean#isSingleton()

getConfigurations

public Configuration[] getConfigurations()
Returns:
Returns the configurations.

setConfigurations

public void setConfigurations(Configuration[] configurations)
Set the configurations objects which will be used as properties.

Parameters:
configurations -

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
org.springframework.beans.factory.InitializingBean#afterPropertiesSet()


Copyright © 2005. All Rights Reserved.