to.etc.util
Class DeveloperOptions

java.lang.Object
  extended by to.etc.util.DeveloperOptions

public class DeveloperOptions
extends java.lang.Object

This is a static-only class which should be used to access options that configure a system on a developer's station. This class accesses the file .developer.properties in the home directory of the user starting the program. Properties in that file can be accessed using calls within this module. The file is read only once; retrieved values are cached for speedy performance.

Author:
Frits Jalvingh Created on Feb 15, 2006

Method Summary
static boolean getBool(java.lang.String name, boolean def)
          Returns the developer option specified by name as a boolean.
static int getInt(java.lang.String name, int def)
          Returns the developer option specified by name as an integer.
static java.lang.String getString(java.lang.String name)
          Returns the developer option specified as a string.
static java.lang.String getString(java.lang.String name, java.lang.String def)
          Returns the developer option specified by name as a string.
static boolean isDeveloperWorkstation()
          Returns T if this is a developer's workstation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isDeveloperWorkstation

public static boolean isDeveloperWorkstation()
Returns T if this is a developer's workstation. It is true if the .developer.properties file exists in the user's home.

Returns:

getString

public static java.lang.String getString(java.lang.String name)
Returns the developer option specified as a string. Return null if the option is not present.


getString

public static java.lang.String getString(java.lang.String name,
                                         java.lang.String def)
Returns the developer option specified by name as a string. If the option is not present in the file return the default value.

Parameters:
name -
def -
Returns:

getBool

public static boolean getBool(java.lang.String name,
                              boolean def)
Returns the developer option specified by name as a boolean. If the option is not present in the file return the default value.

Parameters:
name -
def -
Returns:

getInt

public static int getInt(java.lang.String name,
                         int def)
Returns the developer option specified by name as an integer. If the option is not present in the file return the default value.

Parameters:
name -
def -
Returns: