Class SystemConfiguration
java.lang.Object
org.apache.commons.configuration.event.EventSource
org.apache.commons.configuration.AbstractConfiguration
org.apache.commons.configuration.MapConfiguration
org.apache.commons.configuration.SystemConfiguration
- All Implemented Interfaces:
Cloneable, Configuration
A configuration based on the system properties.
- Since:
- 1.1
- Version:
- $Id: SystemConfiguration.java 1210204 2011-12-04 20:38:02Z oheger $
- Author:
- Emmanuel Bourg
-
Field Summary
Fields inherited from class MapConfiguration
mapFields inherited from class AbstractConfiguration
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN -
Constructor Summary
ConstructorsConstructorDescriptionCreate a Configuration based on the system properties. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetSystemProperties(String fileName) The method allows system properties to be set from a property file.static voidsetSystemProperties(String basePath, String fileName) The method allows system properties to be set from a property file.static voidsetSystemProperties(PropertiesConfiguration systemConfig) Set System properties from a configuration file.Methods inherited from class MapConfiguration
addPropertyDirect, clearPropertyDirect, clone, containsKey, getKeys, getMap, getProperty, isEmpty, isTrimmingDisabled, setTrimmingDisabledMethods inherited from class AbstractConfiguration
addErrorLogListener, addProperty, append, clear, clearProperty, copy, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getList, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, getSubstitutor, interpolate, interpolate, interpolatedConfiguration, interpolateHelper, isDelimiterParsingDisabled, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subsetMethods inherited from class EventSource
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
-
Constructor Details
-
SystemConfiguration
-
-
Method Details
-
setSystemProperties
The method allows system properties to be set from a property file.- Parameters:
fileName- The name of the property file.- Throws:
Exception- if an error occurs.- Since:
- 1.6
-
setSystemProperties
The method allows system properties to be set from a property file.- Parameters:
basePath- The base path to look for the property file.fileName- The name of the property file.- Throws:
Exception- if an error occurs.- Since:
- 1.6
-
setSystemProperties
Set System properties from a configuration file.- Parameters:
systemConfig- The configuration containing the properties to be set.- Since:
- 1.6
-