| java.lang.Object org.apache.jetspeed.pipeline.valve.impl.PropertyLoaderValve
PropertyLoaderValve | public class PropertyLoaderValve implements Valve(Code) | | The purpose of this valve is to load a property file and make the information
available on the request as an attribute. The name of the attribute is the
key that is passed into the constructor.
There are 3 different ways to use this object: 1. Provide a key and a
PropertiesConfiguration object 2. Provide a key and a path to a properties
file 3. Provide a string which is used for both the key and as an environment
lookup to find the path to a properties file.
The PropertiesConfiguration object is put on the request and can be consumed
by anyone downstream of this valve
Multiple valves can be configured via Spring and put into the pipeline if
more than one property file is needed.
Spring configuration samples are shown below:
/apps/jetspeed/etc/jetspeed-production.properties
php-properties
php-properties
/apps/jetspeed/etc/jetspeed-production.properties
app.props
For this last one, an environment variable with the name "app.props" would
contain the file path to the properties file.
author: David Gurney |
m_oPropertiesConfiguration | protected PropertiesConfiguration m_oPropertiesConfiguration(Code) | | |
m_sPropertyFilePath | protected String m_sPropertyFilePath(Code) | | |
PropertyLoaderValve | public PropertyLoaderValve(String p_sKey, PropertiesConfiguration p_oPropertiesConfiguration)(Code) | | |
PropertyLoaderValve | public PropertyLoaderValve(String p_sKey, String p_sPropertyFilePath)(Code) | | |
PropertyLoaderValve | public PropertyLoaderValve(String p_sEnvironmentKey)(Code) | | Parameters: p_sEnvironmentKey - -This value will be used both as the storage key and as thename to use when looking up an environment variable. Theenvironment variable should contain the file path of theproperties file to be loaded |
|
|