at.gv.egovernment.moa.util
Class Messages

java.lang.Object
  |
  +--at.gv.egovernment.moa.util.Messages

public class Messages
extends Object

Provides access to the system messages resource used for exception handling and logging messages. Messages must be provided as a resource bundle at the path.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
Messages(String[] resourceNames, Locale[] locales)
          Create a new Message object containing the messages in the given resources.
 
Method Summary
 String getMessage(String messageId, Object[] parameters)
          Get the message corresponding to a given message ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages(String[] resourceNames,
                Locale[] locales)
Create a new Message object containing the messages in the given resources.
Parameters:
resourceNames - The names of the resources containing the messages.
locales - The corresponding locales.
Method Detail

getMessage

public String getMessage(String messageId,
                         Object[] parameters)
Get the message corresponding to a given message ID.
Parameters:
messageId - The ID of the message.
parameters - The parameters to fill in into the message arguments.
Returns:
The formatted message.