org.eclipse.birt.core.config
Class SystemConfigVarManager

java.lang.Object
  extended by org.eclipse.birt.core.config.SystemConfigVarManager
Direct Known Subclasses:
FileConfigVarManager

public class SystemConfigVarManager
extends java.lang.Object

Implements a default config variable manager using System support


Constructor Summary
SystemConfigVarManager()
          Constructor
 
Method Summary
 boolean getConfigBoolean(java.lang.String key)
           
 java.lang.Integer getConfigInteger(java.lang.String key)
           
 int getConfigInteger(java.lang.String key, int defaultValue)
           
 java.lang.String getConfigVar(java.lang.String key)
           
 java.lang.String getConfigVar(java.lang.String key, java.lang.String defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemConfigVarManager

public SystemConfigVarManager()
Constructor

Method Detail

getConfigVar

public java.lang.String getConfigVar(java.lang.String key)
Parameters:
key - the configuration variable name
Returns:
The value for the configuration variable. null if it is not set.

getConfigVar

public java.lang.String getConfigVar(java.lang.String key,
                                     java.lang.String defaultValue)
Parameters:
key - the configuration variable name
defaultValue - returns this value is the configuration variable is not set
Returns:
The value for the configuration variable. In case the config var is not set, or there is an exception, defaultValue is returned.

getConfigBoolean

public boolean getConfigBoolean(java.lang.String key)
Parameters:
key - the configuration variable name
Returns:
true if set to true (case insensitive), false in any other cases

getConfigInteger

public java.lang.Integer getConfigInteger(java.lang.String key)
Parameters:
key - the configuration variable name
Returns:
the value for the configuration variable. returns null if the config var is not set or not set to an integer or any other exception happens.

getConfigInteger

public int getConfigInteger(java.lang.String key,
                            int defaultValue)
Parameters:
key - the configuration variable name
defaultValue - returns this value is the configuration variable is not set
Returns:
the value for the configuration variable. In case the config var is not set, or not set to a number, or there is an exception, defaultValue is returned.


Copyright © 2008 Actuate Corp. All rights reserved.