org.kasource.spring.properties
Class ApplicationProperties

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.kasource.spring.properties.ApplicationProperties
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered, org.springframework.core.PriorityOrdered

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

Exposes application properties read by org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.

Author:
rikardwi

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
ApplicationProperties()
           
 
Method Summary
 void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
           
 String value(String key)
          Return the value for the property with key.
 String value(String key, String defaultValue)
          Return the value for the property with key.
 
Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
parseStringValue, processProperties, resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
 
Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertPropertyValue, getOrder, setOrder
 
Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties, mergeProperties, 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
 

Constructor Detail

ApplicationProperties

public ApplicationProperties()
Method Detail

postProcessBeanFactory

public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
Specified by:
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
Overrides:
postProcessBeanFactory in class org.springframework.beans.factory.config.PropertyResourceConfigurer
Throws:
org.springframework.beans.BeansException

value

public String value(String key)
Return the value for the property with key.

Parameters:
key - Property name.
Returns:
value of property with name key or null if no such property exists.

value

public String value(String key,
                    String defaultValue)
Return the value for the property with key.

Parameters:
key - Property name.
defaultValue - The value to return if no property is found using key.
Returns:
value of property with name key or defaultValue if no such property exists.


Copyright © 2011. All Rights Reserved.