org.javagen.agile.core.ioc.spring
Class GlobalPropertyHolder

java.lang.Object
  extended by org.springframework.core.io.support.PropertiesLoaderSupport
      extended by org.springframework.beans.factory.config.PropertyResourceConfigurer
          extended by org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
              extended by org.javagen.agile.core.ioc.spring.GlobalPropertyHolder
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered

public class GlobalPropertyHolder
extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

Add a third properties source overrideProperties, so we can override these properties instead of having to redefine every property as using the setProperties method would require.

This allows overriding properties in the Maven 2 Plugin config.

Author:
Richard Easterling

Field Summary
protected  Model globalPropertiesModel
           
protected  Properties overrideProperties
           
 
Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
 
Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
logger, XML_FILE_EXTENSION
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
GlobalPropertyHolder()
           
 
Method Summary
 Model getGlobalPropertiesModel()
           
 Properties getOverrideProperties()
           
 void injectPropertiesIntoNode()
          load global properties into global properties model
 Properties mergeProperties()
          Return a merged Properties instance containing the loaded properties, properties set on this FactoryBean and the overrideProperties.
 void setGlobalPropertiesModel(Model globalPropertiesModel)
           
 void setOverrideProperties(Properties overrideProperties)
           
 
Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
parseStringValue, processProperties, resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
 
Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder
 
Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

overrideProperties

protected Properties overrideProperties

globalPropertiesModel

protected Model globalPropertiesModel
Constructor Detail

GlobalPropertyHolder

public GlobalPropertyHolder()
Method Detail

mergeProperties

public Properties mergeProperties()
                           throws IOException
Return a merged Properties instance containing the loaded properties, properties set on this FactoryBean and the overrideProperties.

Overrides:
mergeProperties in class org.springframework.core.io.support.PropertiesLoaderSupport
Throws:
IOException

injectPropertiesIntoNode

public void injectPropertiesIntoNode()
load global properties into global properties model


getOverrideProperties

public Properties getOverrideProperties()

setOverrideProperties

public void setOverrideProperties(Properties overrideProperties)

getGlobalPropertiesModel

public Model getGlobalPropertiesModel()

setGlobalPropertiesModel

public void setGlobalPropertiesModel(Model globalPropertiesModel)


Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.