fr.dyade.aaa.common
Class Configuration

java.lang.Object
  extended by fr.dyade.aaa.common.Configuration

public class Configuration
extends java.lang.Object

This class holds a static list of properties accessible from anywhere. It is used to avoid multiplying system-wide properties.


Field Summary
private static java.util.Properties properties
           
 
Constructor Summary
Configuration()
           
 
Method Summary
static boolean getBoolean(java.lang.String key)
          Determines the boolean value of the property with the specified name.
static java.lang.Integer getInteger(java.lang.String key)
          Determines the integer value of the property with the specified name.
static java.lang.Integer getInteger(java.lang.String key, int value)
          Determines the integer value of the property with the specified name.
static java.lang.Long getLong(java.lang.String key)
          Determines the integer value of the property with the specified name.
static java.lang.Long getLong(java.lang.String key, long value)
          Determines the long value of the property with the specified name.
static java.lang.String getProperty(java.lang.String key)
          Searches for the property with the specified key in the property list.
static java.lang.String getProperty(java.lang.String key, java.lang.String value)
          Searches for the property with the specified key in the property list.
static void putProperty(java.lang.String name, java.lang.String value)
          Adds a new property to the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

private static java.util.Properties properties
Constructor Detail

Configuration

public Configuration()
Method Detail

getProperty

public static java.lang.String getProperty(java.lang.String key)
Searches for the property with the specified key in the property list.

Parameters:
key - the hashtable key.
Returns:
the value with the specified key value.

getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String value)
Searches for the property with the specified key in the property list.

Parameters:
key - the hashtable key.
value - a default value.
Returns:
the value with the specified key value.

getInteger

public static java.lang.Integer getInteger(java.lang.String key)
Determines the integer value of the property with the specified name.

Parameters:
key - property name.
Returns:
the Integer value of the property.

getInteger

public static java.lang.Integer getInteger(java.lang.String key,
                                           int value)
Determines the integer value of the property with the specified name.

Parameters:
key - property name.
value - a default value.
Returns:
the Integer value of the property.

getLong

public static java.lang.Long getLong(java.lang.String key)
Determines the integer value of the property with the specified name.

Parameters:
key - property name.
Returns:
the Integer value of the property.

getLong

public static java.lang.Long getLong(java.lang.String key,
                                     long value)
Determines the long value of the property with the specified name.

Parameters:
key - property name.
value - a default value.
Returns:
the Integer value of the property.

getBoolean

public static boolean getBoolean(java.lang.String key)
Determines the boolean value of the property with the specified name.

Parameters:
key - property name.
Returns:
the boolean value of the property.

putProperty

public static void putProperty(java.lang.String name,
                               java.lang.String value)
Adds a new property to the configuration.

Parameters:
name - property name.
value - property value.


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.