org.exolab.jmscts.core
Class TestProperties

java.lang.Object
  |
  +--org.exolab.jmscts.core.TestProperties

public final class TestProperties
extends java.lang.Object

Helper class to provide access to properties defined in a jmscts.properties property file. This is read from the ${jmscts.home}/config directory.

Version:
$Revision: 1.2 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson

Method Summary
static int getInt(java.lang.Class prefix, java.lang.String name, int defaultValue)
          Returns the value of a property.
static int getInt(java.lang.String name, int defaultValue)
          Returns the value of a property.
static long getLong(java.lang.Class prefix, java.lang.String name, long defaultValue)
          Returns the value of a property.
static long getLong(java.lang.String name, long defaultValue)
          Returns the value of a property.
static java.lang.String getString(java.lang.Class prefix, java.lang.String name, java.lang.String defaultValue)
          Returns the value of a property.
static java.lang.String getString(java.lang.String name, java.lang.String defaultValue)
          Returns the value of a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static java.lang.String getString(java.lang.Class prefix,
                                         java.lang.String name,
                                         java.lang.String defaultValue)
Returns the value of a property. The property name is the concatentation of prefix.getName() + "." + name
Parameters:
prefix - the property name prefix
name - the property name suffix
defaultValue - the value to use if no property exists
Returns:
the value of the property, or defaultValue if no property exists

getString

public static java.lang.String getString(java.lang.String name,
                                         java.lang.String defaultValue)
Returns the value of a property.
Parameters:
name - the property name
defaultValue - the value to use if no property exists
Returns:
the value of the property, or defaultValue if no property exists

getInt

public static int getInt(java.lang.Class prefix,
                         java.lang.String name,
                         int defaultValue)
Returns the value of a property. The property name is the concatentation of prefix.getName() + "." + name
Parameters:
prefix - the property name prefix
name - the property name suffix
defaultValue - the value to use if no property exists
Returns:
the value of the property, or defaultValue if no property exists

getInt

public static int getInt(java.lang.String name,
                         int defaultValue)
Returns the value of a property.
Parameters:
name - the property name
defaultValue - the value to use if no property exists
Returns:
the value of the property, or defaultValue if no property exists

getLong

public static long getLong(java.lang.Class prefix,
                           java.lang.String name,
                           long defaultValue)
Returns the value of a property. The property name is the concatentation of prefix.getName() + "." + name
Parameters:
prefix - the property name prefix
name - the property name suffix
defaultValue - the value to use if no property exists
Returns:
the value of the property, or defaultValue if no property exists

getLong

public static long getLong(java.lang.String name,
                           long defaultValue)
Returns the value of a property.
Parameters:
name - the property name
defaultValue - the value to use if no property exists
Returns:
the value of the property, or defaultValue if no property exists


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.