Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » config » [javadoc | source]
org.springframework.beans.factory.config
public class: PreferencesPlaceholderConfigurer [javadoc | source]
java.lang.Object
   org.springframework.core.io.support.PropertiesLoaderSupport
      org.springframework.beans.factory.config.PropertyResourceConfigurer
         org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
            org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer

All Implemented Interfaces:
    InitializingBean, BeanFactoryAware, BeanNameAware, PriorityOrdered, BeanFactoryPostProcessor

Subclass of PropertyPlaceholderConfigurer that supports JDK 1.4's Preferences API (java.util.prefs).

Tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in this configurer's properties. Thus, behaves like PropertyPlaceholderConfigurer if no corresponding preferences defined.

Supports custom paths for the system and user preferences trees. Also supports custom paths specified in placeholders ("myPath/myPlaceholderKey"). Uses the respective root node if not specified.

Fields inherited from org.springframework.beans.factory.config.PropertyPlaceholderConfigurer:
DEFAULT_PLACEHOLDER_PREFIX,  DEFAULT_PLACEHOLDER_SUFFIX,  SYSTEM_PROPERTIES_MODE_NEVER,  SYSTEM_PROPERTIES_MODE_FALLBACK,  SYSTEM_PROPERTIES_MODE_OVERRIDE
Fields inherited from org.springframework.core.io.support.PropertiesLoaderSupport:
XML_FILE_EXTENSION,  logger
Method from org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer Summary:
afterPropertiesSet,   resolvePlaceholder,   resolvePlaceholder,   setSystemTreePath,   setUserTreePath
Methods from org.springframework.beans.factory.config.PropertyPlaceholderConfigurer:
parseStringValue,   processProperties,   resolvePlaceholder,   resolvePlaceholder,   resolveSystemProperty,   setBeanFactory,   setBeanName,   setIgnoreUnresolvablePlaceholders,   setNullValue,   setPlaceholderPrefix,   setPlaceholderSuffix,   setSearchSystemEnvironment,   setSystemPropertiesMode,   setSystemPropertiesModeName
Methods from org.springframework.beans.factory.config.PropertyResourceConfigurer:
convertProperties,   convertPropertyValue,   getOrder,   postProcessBeanFactory,   processProperties,   setOrder
Methods from org.springframework.core.io.support.PropertiesLoaderSupport:
loadProperties,   mergeProperties,   setFileEncoding,   setIgnoreResourceNotFound,   setLocalOverride,   setLocation,   setLocations,   setProperties,   setPropertiesArray,   setPropertiesPersister
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer Detail:
 public  void afterPropertiesSet() 
    This implementation eagerly fetches the Preferences instances for the required system and user tree nodes.
 protected String resolvePlaceholder(String placeholder,
    Properties props) 
    This implementation tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in the passed-in properties.
 protected String resolvePlaceholder(String path,
    String key,
    Preferences preferences) 
    Resolve the given path and key against the given Preferences.
 public  void setSystemTreePath(String systemTreePath) 
    Set the path in the system preferences tree to use for resolving placeholders. Default is the root node.
 public  void setUserTreePath(String userTreePath) 
    Set the path in the system preferences tree to use for resolving placeholders. Default is the root node.