SPT Core API

com.sptci.echo2
Class Configuration

java.lang.Object
  extended by com.sptci.echo2.Configuration

public class Configuration
extends Object

A utility class that is used to load and retrieve the localised configurable properties for UI components. This class needs an active ApplicationInstance to be properly initialised.

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: Configuration.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2006-03-01

Method Summary
static int getInt(Object source, String key)
          Returns configured integer value for the key for the specified source object.
static int getInt(String key)
          Returns configured integer value for the key.
static String getString(Class source, String key)
          Returns localised configured text for the key for the specified source class.
static String getString(Object source, String key)
          Returns localised configured text for the key for the specified source object.
static String getString(String key)
          Returns localised configured text for the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static String getString(Object source,
                               String key)
Returns localised configured text for the key for the specified source object. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The object for which the localised text is to be retrieved.
key - The key of the text to be returned
Returns:
The appropriate localised text (if the key is not defined, the string "!key!" is returned)
See Also:
getString( Class, String )

getString

public static String getString(Class source,
                               String key)
Returns localised configured text for the key for the specified source class. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The class for which the localised text is to be retrieved.
key - The key of the text to be returned
Returns:
The appropriate localised text (if the key is not defined, the string "!key!" is returned)
See Also:
getString( String )

getString

public static String getString(String key)
Returns localised configured text for the key.

Parameters:
key - The key of the text to be returned
Returns:
The appropriate localised text (if the key is not defined, the string "!key!" is returned)

getInt

public static int getInt(Object source,
                         String key)
Returns configured integer value for the key for the specified source object. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The object whose configured localised value is to be retrieved.
key - The key of the integer value to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)
See Also:
getInt( String )

getInt

public static int getInt(String key)
Returns configured integer value for the key.

Parameters:
key - The key of the integer value to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)

SPT Core API