org.red5.spring

## Class ExtendedPropertyPlaceholderConfigurer

- java.lang.Object
- - org.springframework.core.io.support.PropertiesLoaderSupport
  - - org.springframework.beans.factory.config.PropertyResourceConfigurer
    - - org.springframework.beans.factory.config.PlaceholderConfigurerSupport
      - - org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
        - - org.red5.spring.ExtendedPropertyPlaceholderConfigurer

All Implemented Interfaces:
  org.springframework.beans.factory.Aware, 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 ExtendedPropertyPlaceholderConfigurer
    extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

An extension of `PropertyPlaceholderConfigurer`. Provides runtime additions of properties and wildcard location lookups. Properties can be added at runtime by using the static `addGlobalProperty(java.lang.String, java.lang.String)` before* the bean definition is instantiated in the ApplicationContext. A property added by `addGlobalProperty(java.lang.String, java.lang.String)` will get merged into properties specified by the bean definition, overriding keys that overlap. wildcard locations can be used instead of locations, if both are declared the last will override. Wildcard locations are handled by `setWildcardLocations(String[])`, using `PathMatchingResourcePatternResolver` for matching locations. For wildcard locations that matches multiple Properties files, they are merged in by alphabetical filename order.

Author:
  Michael Guymon (michael.guymon@gmail.com)

### Nested Class Summary

Nested Classes
`static class` `ExtendedPropertyPlaceholderConfigurer.ResourceFilenameComparator`

### Field Summary

### Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

`SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE`

### Fields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport

`DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, valueSeparator`

### Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport

`localOverride, localProperties`

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

### Constructor Summary

Constructors
Constructor and Description
`ExtendedPropertyPlaceholderConfigurer()`

### Method Summary

Methods
`static void` `addGlobalProperty(String key, String val)` Add a global property to be merged
`Properties` `getMergedProperties()` Merged `Properties` created by `processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)`
`protected void` `processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)`
`void` `setWildcardLocations(String[] locations)` String[] of wildcard locations of properties that are converted to Resource[] using using `PathMatchingResourcePatternResolver`

### Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

`parseStringValue, resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName`

### Methods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport

`doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparator`

### Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer

`convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, 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

#### ExtendedPropertyPlaceholderConfigurer

    public ExtendedPropertyPlaceholderConfigurer()

### Method Detail

#### processProperties

    protected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
                         Properties props)
                              throws org.springframework.beans.BeansException

Overrides:
  `processProperties` in class `org.springframework.beans.factory.config.PropertyPlaceholderConfigurer`
Throws:
  `org.springframework.beans.BeansException`

#### getMergedProperties

    public Properties getMergedProperties()

Merged `Properties` created by `processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)`

Returns:
  `Properties`

#### setWildcardLocations

    public void setWildcardLocations(String[] locations)
                              throws IOException

String[] of wildcard locations of properties that are converted to Resource[] using using `PathMatchingResourcePatternResolver`

Parameters:
  `locations` - String[]
Throws:
  `IOException`

#### addGlobalProperty

    public static void addGlobalProperty(String key,
                         String val)

Add a global property to be merged

Parameters:
  `key` - String
  `val` - String