com.sptci.echo2demo
Class Configuration

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

public class Configuration
extends java.lang.Object

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

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: Configuration.java,v 1.1.1.1 2006/02/06 00:44:09 rakesh Exp $
Author:
Rakesh Vidyadharan 2006-01-21

Field Summary
private static java.lang.String BUNDLE_NAME
          The name of the resource bundle to load.
private static java.util.ResourceBundle resource
          The resource bundle that represents the appropriate properties file.
 
Constructor Summary
private Configuration()
          Cannot be instantiated.
 
Method Summary
static int getInt(java.lang.String key)
          Returns configured integer value for the key.
static java.lang.String getString(java.lang.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
 

Field Detail

BUNDLE_NAME

private static final java.lang.String BUNDLE_NAME
The name of the resource bundle to load. "META-INF.resource.localisation.Configuration"

See Also:
Constant Field Values

resource

private static java.util.ResourceBundle resource
The resource bundle that represents the appropriate properties file.

Constructor Detail

Configuration

private Configuration()
Cannot be instantiated.

Method Detail

getString

public static final java.lang.String getString(java.lang.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 final int getInt(java.lang.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)


Copyright © 2006 Sans Pareil Technologies, Inc. All Rights Reserved.