org.echarts.servlet.sip.utilities
Class FileBasedConfiguration

java.lang.Object
  extended by org.echarts.servlet.sip.utilities.FileBasedConfiguration

public class FileBasedConfiguration
extends java.lang.Object

Class providing support for access to configuration stored in the filesystem in the form of java.util.Properties simple line-oriented format. The file can be specified via JVM parameter org.echarts.servlet.sip.configuration.filename, and defaults to "configuration.properties" in the working directory.


Field Summary
static java.lang.String CONFIGURATION_PROPERTIES_FILENAME
           
 
Method Summary
static FileBasedConfiguration getInstance()
           
 java.lang.String getParameter(java.lang.String paramName)
          Gets the value of specified parameter as specified in configuration file.
 java.lang.String getParameter(java.lang.String paramName, java.lang.String defaultValue)
          Gets the value of specified parameter as specified in configuration file.
 java.util.List<java.lang.String> getParameterNames()
          Gets a list of all parameter names specified in configuration file.
 void refresh()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_PROPERTIES_FILENAME

public static final java.lang.String CONFIGURATION_PROPERTIES_FILENAME
See Also:
Constant Field Values
Method Detail

getInstance

public static FileBasedConfiguration getInstance()

refresh

public void refresh()

getParameter

public java.lang.String getParameter(java.lang.String paramName)
Gets the value of specified parameter as specified in configuration file.

Parameters:
paramName - name of desired parameter
Returns:
value of desired parameter, or null if not present

getParameter

public java.lang.String getParameter(java.lang.String paramName,
                                     java.lang.String defaultValue)
Gets the value of specified parameter as specified in configuration file.

Parameters:
paramName - name of desired parameter
defaultValue - default value to use if parameter is not present in file
Returns:
value of desired parameter, or defaultValue if not present

getParameterNames

public java.util.List<java.lang.String> getParameterNames()
Gets a list of all parameter names specified in configuration file.

Returns:
List of parameter names