org.glite.security.voms.utilities
Class Settings

java.lang.Object
  extended byorg.glite.security.voms.utilities.Settings

public final class Settings
extends java.lang.Object

A class for reading the system's gLite configuration parameters, for example the value of GLITE_LOCATION. The parameters are loaded from the following locations, in order of increasing priority:

  1. Predefined set of default values
  2. /etc/sysconfig/glite
  3. /etc/default/glite
  4. /etc/glite.conf
  5. $HOME/.glite.conf
  6. Environment variables
  7. System properties

Values found later in the above list override earlier values.

Note that this class looks into environment variables even though they are normally empty in a Tomcat service. Some people run Tomcat from their user account, and set their GLITE_LOCATION etc. only in environment variables. We want to support that use case. Furthermore, looking at environment variables here makes this class useful outside of a web application.

Author:
Karoly Lorentey

Method Summary
static java.lang.String getSetting(java.lang.String name)
          Return the named variable in this system's gLite settings.
static java.util.Properties getSettings()
          Return a Properties object containing this system's gLite settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSettings

public static java.util.Properties getSettings()
Return a Properties object containing this system's gLite settings.


getSetting

public static java.lang.String getSetting(java.lang.String name)
Return the named variable in this system's gLite settings.

Parameters:
name - The name of the configuration variable.
Returns:
the value of the configuration variable.