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 loc)
          Constructor for the Messages object.
 
Method Summary
 java.lang.String getLanguage()
          Gets the language of the message object.
 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)
         throws StandardException
Constructor for the Messages object using the default language.

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

Messages

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

Parameters:
base - Base name of the properties files
loc - Language to use
Throws:
StandardException - exception
Method Detail

getLanguage

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

Returns:
language value

getMessage

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

Parameters:
idMess - message ID
Returns:
Localized string

getMessage

public final 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