2009-01-09 1.2.0

org.eclipse.soda.dk.core
Class EscConfiguration

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscConfiguration
All Implemented Interfaces:
ConfigurationService

public class EscConfiguration
extends java.lang.Object
implements ConfigurationService

Since:
1.0
Version:
1.2.0
See Also:
ConfigurationService

Field Summary
static java.lang.String[] FALSE_VALUES
          Define the false values (String[]) constant.
static java.lang.String[] TRUE_VALUES
          Define the true values (String[]) constant.
 
Constructor Summary
EscConfiguration()
          Constructs an instance of this class.
EscConfiguration(java.util.Dictionary properties)
          Constructs an instance of this class from the specified properties parameter.
 
Method Summary
static java.lang.Boolean booleanObject(java.lang.Object data)
          Boolean object with the specified data parameter and return the Boolean result.
static boolean booleanValue(java.lang.Object data)
          Boolean value with the specified data parameter and return the boolean result.
static byte[] bytesValue(java.lang.Object data)
          Bytes value with the specified data parameter and return the byte[] result.
static byte byteValue(java.lang.Object data)
          Byte value with the specified data parameter and return the int result.
static char charValue(java.lang.Object data)
          Char value with the specified data parameter and return the char result.
static double doubleValue(java.lang.Object data)
          Double value with the specified data parameter and return the double result.
static float floatValue(java.lang.Object data)
          Float value with the specified data parameter and return the float result.
 boolean getBoolean(java.lang.String key, boolean defaultBoolean)
          Get the boolean configuration value.
 byte getByte(java.lang.String key, byte defaultByte)
          Get byte with the specified key and default byte parameters and return the byte result.
 char getChar(java.lang.String key, char defaultChar)
          Get char with the specified key and default char parameters and return the char result.
static ConfigurationService getConfiguration()
          Get the ConfigurationService.
protected  java.util.Properties getDefaultProperties()
          Get the default properties.
 double getDouble(java.lang.String key, double defaultDouble)
          Get double with the specified key and default double parameters and return the double result.
 float getFloat(java.lang.String key, float defaultFloat)
          Get float with the specified key and default float parameters and return the float result.
 int getInt(java.lang.String key, int defaultInt)
          /** Get the integer configuration value.
 long getLong(java.lang.String key, long defaultLong)
          /** Get the long configuration value.
 java.lang.Object getObject(java.lang.String key, java.lang.Object defaultObject)
          Get object with the specified key and default object parameters and return the Object result.
 java.util.Dictionary getProperties()
          Get the properties.
 java.lang.Object getProperty(java.lang.String key)
          Get the specified property.
 short getShort(java.lang.String key, short defaultShort)
          Get short with the specified key and default short parameters and return the short result.
 java.lang.String getString(java.lang.String key, java.lang.String defaultString)
          /** Get the String configuration value.
static int intValue(java.lang.Object data)
          Int value with the specified data parameter and return the int result.
static java.util.List listObject(java.lang.Object data)
          List object with the specified data parameter and return the List result.
static long longValue(java.lang.Object data)
          Long value with the specified data parameter and return the long result.
static java.util.Map mapObject(java.lang.Object data)
          Map object with the specified data parameter and return the Map result.
static java.lang.Number numberValue(java.lang.Object data)
          Number value with the specified data parameter and return the Number result.
 void put(java.lang.String key, java.lang.Object value)
          Change/set the specified property value.
static void setConfiguration(ConfigurationService configuration)
          Sets the configuration value.
static short shortValue(java.lang.Object data)
          Short value with the specified data parameter and return the int result.
static java.lang.String stringObject(java.lang.Object data)
          String object with the specified data parameter and return the String result.
 java.lang.String toString()
          Returns the string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FALSE_VALUES

public static final java.lang.String[] FALSE_VALUES
Define the false values (String[]) constant.


TRUE_VALUES

public static final java.lang.String[] TRUE_VALUES
Define the true values (String[]) constant.

Constructor Detail

EscConfiguration

public EscConfiguration()
Constructs an instance of this class.

See Also:
EscConfiguration(Dictionary)

EscConfiguration

public EscConfiguration(java.util.Dictionary properties)
Constructs an instance of this class from the specified properties parameter.

Parameters:
properties - The properties (Dictionary) parameter.
See Also:
EscConfiguration()
Method Detail

booleanObject

public static final java.lang.Boolean booleanObject(java.lang.Object data)
Boolean object with the specified data parameter and return the Boolean result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the boolean object (Boolean) value.
See Also:
listObject(Object), mapObject(Object), stringObject(Object), getObject(String,Object)

booleanValue

public static final boolean booleanValue(java.lang.Object data)
Boolean value with the specified data parameter and return the boolean result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the boolean value (boolean) value.
See Also:
byteValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

byteValue

public static final byte byteValue(java.lang.Object data)
Byte value with the specified data parameter and return the int result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the byte value (int) value.
See Also:
booleanValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

bytesValue

public static final byte[] bytesValue(java.lang.Object data)
Bytes value with the specified data parameter and return the byte[] result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the bytes value (byte[]) value.
See Also:
booleanValue(Object), byteValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

charValue

public static final char charValue(java.lang.Object data)
Char value with the specified data parameter and return the char result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the char value (char) value.
Since:
1.2
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

doubleValue

public static final double doubleValue(java.lang.Object data)
Double value with the specified data parameter and return the double result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the double value (double) value.
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), charValue(Object), floatValue(Object), intValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

floatValue

public static final float floatValue(java.lang.Object data)
Float value with the specified data parameter and return the float result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the float value (float) value.
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), intValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

getConfiguration

public static ConfigurationService getConfiguration()
Get the ConfigurationService.

Returns:
Results of the get configuration (ConfigurationService) value.
See Also:
EscConfiguration(), EscConfiguration(Dictionary), setConfiguration(ConfigurationService)

intValue

public static final int intValue(java.lang.Object data)
Int value with the specified data parameter and return the int result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the int value (int) value.
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), longValue(Object), numberValue(Object), shortValue(Object)

listObject

public static final java.util.List listObject(java.lang.Object data)
List object with the specified data parameter and return the List result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the list object (List) value.
See Also:
booleanObject(Object), mapObject(Object), stringObject(Object), getObject(String,Object)

longValue

public static final long longValue(java.lang.Object data)
Long value with the specified data parameter and return the long result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the long value (long) value.
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), numberValue(Object), shortValue(Object)

mapObject

public static final java.util.Map mapObject(java.lang.Object data)
Map object with the specified data parameter and return the Map result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the map object (Map) value.
See Also:
booleanObject(Object), listObject(Object), stringObject(Object), getObject(String,Object)

numberValue

public static java.lang.Number numberValue(java.lang.Object data)
Number value with the specified data parameter and return the Number result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the number value (Number) value.
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), longValue(Object), shortValue(Object)

setConfiguration

public static void setConfiguration(ConfigurationService configuration)
Sets the configuration value.

Parameters:
configuration - The configuration (ConfigurationService) parameter.
See Also:
EscConfiguration(), EscConfiguration(Dictionary), getConfiguration()

shortValue

public static final short shortValue(java.lang.Object data)
Short value with the specified data parameter and return the int result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the short value (int) value.
See Also:
booleanValue(Object), byteValue(Object), bytesValue(Object), charValue(Object), doubleValue(Object), floatValue(Object), intValue(Object), longValue(Object), numberValue(Object)

stringObject

public static final java.lang.String stringObject(java.lang.Object data)
String object with the specified data parameter and return the String result.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the string object (String) value.
See Also:
booleanObject(Object), listObject(Object), mapObject(Object), getObject(String,Object)

getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean defaultBoolean)
Get the boolean configuration value.

Specified by:
getBoolean in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultBoolean - The default boolean (boolean) parameter.
Returns:
Results of the get boolean (boolean) value.
See Also:
ConfigurationService.getBoolean(java.lang.String,boolean)

getByte

public byte getByte(java.lang.String key,
                    byte defaultByte)
Get byte with the specified key and default byte parameters and return the byte result.

Specified by:
getByte in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultByte - The default byte (byte) parameter.
Returns:
Results of the get byte (byte) value.

getChar

public char getChar(java.lang.String key,
                    char defaultChar)
Get char with the specified key and default char parameters and return the char result.

Specified by:
getChar in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultChar - The default char (char) parameter.
Returns:
Results of the get char (char) value.
Since:
1.2

getDefaultProperties

protected java.util.Properties getDefaultProperties()
Get the default properties.

Returns:
Results of the get default properties (Properties) value.

getDouble

public double getDouble(java.lang.String key,
                        double defaultDouble)
Get double with the specified key and default double parameters and return the double result.

Specified by:
getDouble in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultDouble - The default double (double) parameter.
Returns:
Results of the get double (double) value.

getFloat

public float getFloat(java.lang.String key,
                      float defaultFloat)
Get float with the specified key and default float parameters and return the float result.

Specified by:
getFloat in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultFloat - The default float (float) parameter.
Returns:
Results of the get float (float) value.

getInt

public int getInt(java.lang.String key,
                  int defaultInt)
/** Get the integer configuration value.

Specified by:
getInt in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultInt - The default int (int) parameter.
Returns:
Results of the get int (int) value.
See Also:
ConfigurationService.getInt(java.lang.String,int)

getLong

public long getLong(java.lang.String key,
                    long defaultLong)
/** Get the long configuration value.

Specified by:
getLong in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultLong - The default long (long) parameter.
Returns:
Results of the get long (long) value.
See Also:
ConfigurationService.getLong(java.lang.String,long)

getObject

public java.lang.Object getObject(java.lang.String key,
                                  java.lang.Object defaultObject)
Get object with the specified key and default object parameters and return the Object result.

Specified by:
getObject in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultObject - The default object (Object) parameter.
Returns:
Results of the get object (Object) value.
See Also:
booleanObject(Object), listObject(Object), mapObject(Object), stringObject(Object)

getProperties

public java.util.Dictionary getProperties()
Get the properties.

Specified by:
getProperties in interface ConfigurationService
Returns:
Results of the get properties (Dictionary) value.
See Also:
getDefaultProperties()

getProperty

public java.lang.Object getProperty(java.lang.String key)
Get the specified property.

Parameters:
key - The key (String) parameter.
Returns:
Results of the get property (String) value.

getShort

public short getShort(java.lang.String key,
                      short defaultShort)
Get short with the specified key and default short parameters and return the short result.

Specified by:
getShort in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultShort - The default short (short) parameter.
Returns:
Results of the get short (short) value.

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String defaultString)
/** Get the String configuration value.

Specified by:
getString in interface ConfigurationService
Parameters:
key - The key (String) parameter.
defaultString - The default string (String) parameter.
Returns:
Results of the get string (String) value.
See Also:
ConfigurationService.getString(java.lang.String,java.lang.String), toString()

put

public void put(java.lang.String key,
                java.lang.Object value)
Change/set the specified property value.

Parameters:
key - The key (String) parameter.
value - The value (Object) parameter.

toString

public java.lang.String toString()
Returns the string value.

Overrides:
toString in class java.lang.Object
Returns:
The string (String) value.
See Also:
getString(String,String)

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.