Class PropertyConfigurator
- java.lang.Object
-
- org.exoplatform.container.PropertyConfigurator
-
- All Implemented Interfaces:
Startable
- Direct Known Subclasses:
ExtendedPropertyConfigurator
public class PropertyConfigurator extends Object implements Startable
The property configurator configures a set of system properties via the
PropertyManagerstatic methods. It is possible to configure properties from the init params or from an external file.The constructor will inspect the
InitParamsparams argument to find a param namedpropertieswith an expected type ofPropertiesParam. The properties contained in that argument will be sourced into the property manager. When such properties are loaded from an XML configuration file, the values are evaluated and property substitution occurs.When the property
PropertyManager.PROPERTIES_URLis not null and points to a valid property file it will loaded and sourced. Property values will be evaluated and property substitution will occur. When the file name ends with the.propertiesproperties are loaded using theProperties.load(java.io.InputStream)method. When the file name ends with the.xmlproperties are loaded using theProperties.loadFromXML(java.io.InputStream)method. Suffix checks are done ignoring the case.When properties are loaded from an URL, the order of the properties declarations in the file matters.
- Version:
- $Revision$
- Author:
- Julien Viet
-
-
Constructor Summary
Constructors Constructor Description PropertyConfigurator(ConfigurationManager confManager)PropertyConfigurator(InitParams params, ConfigurationManager confManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidstart()Start this component.voidstop()Stop this component.
-
-
-
Constructor Detail
-
PropertyConfigurator
public PropertyConfigurator(ConfigurationManager confManager)
-
PropertyConfigurator
public PropertyConfigurator(InitParams params, ConfigurationManager confManager)
-
-
Method Detail
-
start
public void start()
Description copied from interface:StartableStart this component. Called initially at the begin of the lifecycle. It can be called again after a stop.
-
stop
public void stop()
Description copied from interface:StartableStop this component. Called near the end of the lifecycle. It can be called again after a further start. ImplementDisposableif you need a single call at the definite end of the lifecycle.
-
-