fr.tireme.shared
Class Messages

java.lang.Object
  extended by fr.tireme.shared.Messages

public class Messages
extends java.lang.Object

Manage messages used by the Graphical User Interface.

Since:
12 aout 2002
Version:
1.0
Author:
Pierre Attar ; pat@tireme.fr

Constructor Summary
Messages(java.lang.String base)
          Constructor for the Messages object using the default language
Messages(java.lang.String base, java.util.Locale locale)
          Constructor for the Messages object
 
Method Summary
 java.lang.String getLanguage()
          Gets the language of the message objetc
 java.lang.String getMessage(java.lang.String idMess)
          Get a message with no arguments
 java.lang.String getMessage(java.lang.String idMess, java.lang.Object[] messageArguments)
          Get a message with arguments
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages(java.lang.String base,
                java.util.Locale locale)
         throws StandardException
Constructor for the Messages object

Parameters:
base - Base name of the properties files
locale - Language to use
Throws:
StandardException

Messages

public Messages(java.lang.String base)
         throws StandardException
Constructor for the Messages object using the default language

Parameters:
base - Base name of the properties files
Throws:
StandardException
Method Detail

getMessage

public java.lang.String getMessage(java.lang.String idMess)
Get a message with no arguments

Parameters:
idMess - message ID
Returns:
Localized string

getMessage

public java.lang.String getMessage(java.lang.String idMess,
                                   java.lang.Object[] messageArguments)
Get a message with arguments

Parameters:
idMess - message ID
messageArguments - arguments as array of objects
Returns:
Localized string

getLanguage

public java.lang.String getLanguage()
Gets the language of the message objetc

Returns:
language value