SRJRCFrames
v0.1.296

de.schwarzrot.data.access.pref
Class PreferencesConfigurer

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 de.schwarzrot.data.access.pref.PreferencesConfigurer
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, BeanFactoryPostProcessor, InitializingBean, Ordered, PriorityOrdered

public class PreferencesConfigurer
extends PropertyPlaceholderConfigurer
implements InitializingBean

replacement for springs PreferencesPlaceholderConfigurer, as we use slightly different nodes for system and user space. This implementation has the following access priority:

  1. user preferences
  2. system preferences
  3. setting from property resource (i.e. provided with jarfiles)

Author:
Reinhard Mantey

Field Summary
 
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
PreferencesConfigurer()
           
 
Method Summary
 void afterPropertiesSet()
           
 String getApplicationName()
           
 String getSchemaName()
           
protected  String resolvePlaceholder(String placeholder, Properties props)
           
 void setApplicationName(String applicationName)
           
 void setLocation(Resource arg0)
           
 void setSchemaName(String schemaName)
           
 void setSystemPropertiesMode(int mode)
           
 
Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
parseStringValue, processProperties, resolvePlaceholder, resolveSystemProperty, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setSearchSystemEnvironment, 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, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesConfigurer

public PreferencesConfigurer()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

getApplicationName

public final String getApplicationName()

getSchemaName

public final String getSchemaName()

setApplicationName

public final void setApplicationName(String applicationName)

setLocation

public void setLocation(Resource arg0)
Overrides:
setLocation in class PropertiesLoaderSupport

setSchemaName

public final void setSchemaName(String schemaName)

setSystemPropertiesMode

public void setSystemPropertiesMode(int mode)
Overrides:
setSystemPropertiesMode in class PropertyPlaceholderConfigurer

resolvePlaceholder

protected String resolvePlaceholder(String placeholder,
                                    Properties props)
Overrides:
resolvePlaceholder in class PropertyPlaceholderConfigurer

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.