org.apache.commons.configuration
Class SystemConfiguration

java.lang.Object
  extended byorg.apache.commons.configuration.event.EventSource
      extended byorg.apache.commons.configuration.AbstractConfiguration
          extended byorg.apache.commons.configuration.MapConfiguration
              extended byorg.apache.commons.configuration.SystemConfiguration
All Implemented Interfaces:
Cloneable, Configuration

public class SystemConfiguration
extends MapConfiguration

A configuration based on the system properties.

Since:
1.1
Version:
$Revision: 727834 $, $Date: 2008-12-18 23:16:32 +0100 (Do, 18 Dez 2008) $
Author:
Emmanuel Bourg

Field Summary
 
Fields inherited from class org.apache.commons.configuration.MapConfiguration
map
 
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN
 
Constructor Summary
SystemConfiguration()
          Create a Configuration based on the system properties.
 
Method Summary
static void setSystemProperties(PropertiesConfiguration systemConfig)
          Set System properties from a configuration file.
static void setSystemProperties(String fileName)
          The method allows system properties to be set from a property file.
 
Methods inherited from class org.apache.commons.configuration.MapConfiguration
addPropertyDirect, clearPropertyDirect, clone, containsKey, getKeys, getMap, getProperty, isEmpty
 
Methods inherited from class org.apache.commons.configuration.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, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subset
 
Methods inherited from class org.apache.commons.configuration.event.EventSource
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemConfiguration

public SystemConfiguration()
Create a Configuration based on the system properties.

See Also:
System.getProperties()
Method Detail

setSystemProperties

public static void setSystemProperties(String fileName)
                                throws Exception
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.

setSystemProperties

public static void setSystemProperties(PropertiesConfiguration systemConfig)
Set System properties from a configuration file.

Parameters:
systemConfig - The configuration containing the properties to be set.


Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.