|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reactive.configuration.PropertiesConfigurationFactory
public class PropertiesConfigurationFactory
This class merges properties from several sources into one Properties object.
An example of the bean factory configuration required for Commons Configuration
TODO: Add example XML
Note: This class is basically Spring's org.springframework.beans.factory.config.PropertyResourceConfigurer by Juergen Hoeller with a few things moved to other classes.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
PropertiesConfigurationFactory()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Merges the properties provided by setLocations(org.springframework.core.io.Resource[]) and
setProperties(java.util.Properties) after all properties have been set by the bean factory. |
java.util.Properties |
getConfiguration()
A convenience method that returns the merged properties. |
java.util.Properties |
getMergedProperties()
Returns the merge properties, the result of merging the properties specified by setLocation(org.springframework.core.io.Resource) ,
setLocations(org.springframework.core.io.Resource[]) and setProperties(java.util.Properties) . |
void |
setFileEncoding(java.lang.String encoding)
Set the encoding to use for parsing properties files. |
void |
setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
Set if failure to find the property resource should be ignored. |
void |
setLocation(org.springframework.core.io.Resource location)
Set a location of a properties file to be loaded. |
void |
setLocations(org.springframework.core.io.Resource[] locations)
Set locations of properties files to be loaded. |
void |
setProperties(java.util.Properties properties)
Set local properties, e.g. |
void |
setPropertiesPersister(org.springframework.util.PropertiesPersister propertiesPersister)
Set the PropertiesPersister to use for parsing properties files. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public PropertiesConfigurationFactory()
Method Detail |
---|
public void setProperties(java.util.Properties properties)
setLocation(org.springframework.core.io.Resource)
,
setLocations(org.springframework.core.io.Resource[])
public void setLocation(org.springframework.core.io.Resource location)
setLocations(org.springframework.core.io.Resource[])
public void setLocations(org.springframework.core.io.Resource[] locations)
setLocation(org.springframework.core.io.Resource)
public void setFileEncoding(java.lang.String encoding)
PropertiesPersister.load(java.util.Properties, java.io.InputStream)
public void setPropertiesPersister(org.springframework.util.PropertiesPersister propertiesPersister)
DefaultPropertiesPersister
public void setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
public void afterPropertiesSet() throws java.lang.Exception
setLocations(org.springframework.core.io.Resource[])
and
setProperties(java.util.Properties)
after all properties have been set by the bean factory.
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
- If an IO error occurs while attempting to read a properties file from diskpublic java.util.Properties getMergedProperties()
setLocation(org.springframework.core.io.Resource)
,
setLocations(org.springframework.core.io.Resource[])
and setProperties(java.util.Properties)
.
public java.util.Properties getConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |