com.ibm.dse.tools.workbench.base
Class WorkbenchLanguage

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.WorkbenchLanguage

public class WorkbenchLanguage
extends java.lang.Object

This class stores all the language dependant messages.


Field Summary
protected static java.lang.String defaultDataSource
          The default data source for the initialization file
protected static int defaultDataSourceType
          The default data source type for the initialization file
protected static Settings language
          The name of the language entry in the initialization file
static char paramChar
          The token that indicates the presence of a parameter in a message
 
Constructor Summary
WorkbenchLanguage()
           
 
Method Summary
protected static java.lang.String fillString(java.lang.String str, java.lang.String[] params)
          This method is used to add the value of the parameters to the given property's value
static java.util.Hashtable getGroup(java.lang.String groupName)
          This method returns a hashtable with the settings of the given group
static java.lang.String getText(java.lang.String key)
          This method returns the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
static java.lang.String getText(java.lang.String group, java.lang.String key)
          This method returns the value of the given group's property
static java.lang.String getText(java.lang.String str, java.lang.String[] params)
          This method returns the value of the given property with parameters
static java.lang.String getText(java.lang.String group, java.lang.String key, java.lang.String[] params)
          This method returns the value of the given group's property with parameters
protected static void initialize()
          Initialize the Settings using the defaultDataSource
static void setDataSource(java.lang.String name, int type)
          This method initializes the Settings hashtable using the given data source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultDataSource

protected static java.lang.String defaultDataSource
The default data source for the initialization file

defaultDataSourceType

protected static int defaultDataSourceType
The default data source type for the initialization file

language

protected static Settings language
The name of the language entry in the initialization file

paramChar

public static final char paramChar
The token that indicates the presence of a parameter in a message
Constructor Detail

WorkbenchLanguage

public WorkbenchLanguage()
Method Detail

fillString

protected static java.lang.String fillString(java.lang.String str,
                                             java.lang.String[] params)
This method is used to add the value of the parameters to the given property's value
Parameters:
str - java.lang.String the message code
params - java.lang.String[] the parameters to be added
Returns:
java.lang.String

getGroup

public static java.util.Hashtable getGroup(java.lang.String groupName)
This method returns a hashtable with the settings of the given group
Parameters:
groupName - java.lang.String
Returns:
java.util.Hashtable

getText

public static java.lang.String getText(java.lang.String key)
This method returns the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
Parameters:
key - java.lang.String The key
Returns:
java.lang.String The value

getText

public static java.lang.String getText(java.lang.String str,
                                       java.lang.String[] params)
This method returns the value of the given property with parameters
Parameters:
str - java.lang.String
params - java.lang.String[] The different parameters to be added to the message
Returns:
java.lang.String

getText

public static java.lang.String getText(java.lang.String group,
                                       java.lang.String key)
This method returns the value of the given group's property
Parameters:
group - java.lang.String The group
key - java.lang.String The key
Returns:
java.lang.String

getText

public static java.lang.String getText(java.lang.String group,
                                       java.lang.String key,
                                       java.lang.String[] params)
This method returns the value of the given group's property with parameters
Parameters:
group - java.lang.String The group
key - java.lang.String The key
params - java.lang.String[] The parameters to be added
Returns:
java.lang.String

initialize

protected static void initialize()
                          throws WBInputOutputException
Initialize the Settings using the defaultDataSource
Throws:
WBInputOutputException -  

setDataSource

public static void setDataSource(java.lang.String name,
                                 int type)
                          throws WBInputOutputException
This method initializes the Settings hashtable using the given data source
Parameters:
name - java.lang.String The data source location
type - int The data source type
Throws:
WBInputOutputException -