org.objectweb.cjdbc.util.i18n
Class Translate

java.lang.Object
  extended byorg.objectweb.cjdbc.util.i18n.Translate

public class Translate
extends java.lang.Object

Class to translate the different messages of cjdbc.

Version:
1.0
Author:
Emmanuel Cecchet, Nicolas Modrzyk

Field Summary
static java.lang.String file
          The base path to get translated sentence from.
static java.lang.String jmx
          Jmx description is stored in a different file
(package private) static Trace logger
          Logger instance.
static java.util.ResourceBundle mbeans
          Description for mbeans
static java.util.ResourceBundle phrase
          Prevents failure if resource is not found.
 
Constructor Summary
Translate()
           
 
Method Summary
static java.lang.String get(java.lang.String key)
          Returns associated sentence to that key
static java.lang.String get(java.lang.String key, boolean parameter)
           
static java.lang.String get(java.lang.String key, java.lang.Exception ne)
          Returns constant formatting for reporting of exceptions
static java.lang.String get(java.lang.String key, java.lang.String parameter)
          Returns constant formatting for passing parameter for logger.
static java.lang.String get(java.lang.String key, java.lang.String[] parameters)
          Returns constant formatting for passing parameters for logger.
static java.lang.String getJmxDescription(java.lang.String key)
          Returns description for jmx
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Trace logger
Logger instance.


file

public static java.lang.String file
The base path to get translated sentence from.

See Also:
ResourceBundle

jmx

public static java.lang.String jmx
Jmx description is stored in a different file


phrase

public static java.util.ResourceBundle phrase
Prevents failure if resource is not found.


mbeans

public static java.util.ResourceBundle mbeans
Description for mbeans

Constructor Detail

Translate

public Translate()
Method Detail

getJmxDescription

public static final java.lang.String getJmxDescription(java.lang.String key)
Returns description for jmx

Parameters:
key - the key to find in the mbeans description file
Returns:
the corresponding sentence of the key if not found

get

public static final java.lang.String get(java.lang.String key)
Returns associated sentence to that key

Parameters:
key - the key to find in the translation file
Returns:
the corresponding sentence of the key if not found

get

public static final java.lang.String get(java.lang.String key,
                                         java.lang.Exception ne)
Returns constant formatting for reporting of exceptions

Parameters:
key - the key to find in translation file.
ne - the exception to report.
Returns:
the corresponding sentence with key and exception messasge

get

public static final java.lang.String get(java.lang.String key,
                                         java.lang.String parameter)
Returns constant formatting for passing parameter for logger.

Parameters:
key - the key to find in the translation file
parameter - to put inside square braquets
Returns:
the corresponding sentence of the key if not found

get

public static final java.lang.String get(java.lang.String key,
                                         boolean parameter)
See Also:
get(String,String)

get

public static final java.lang.String get(java.lang.String key,
                                         java.lang.String[] parameters)
Returns constant formatting for passing parameters for logger.

Parameters:
key - the key to find in the translation file
parameters - to put inside square braquets
Returns:
the corresponding sentence of the key if not found


Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.