at.gv.egovernment.moa.spss.util
Class MessageProvider
java.lang.Object
|
+--at.gv.egovernment.moa.spss.util.MessageProvider
- public class MessageProvider
- extends Object
Singleton wrapper around a Messages
object.
- Version:
- $Id$
- Author:
- Patrick Peck
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageProvider
protected MessageProvider(String[] resourceNames,
Locale[] locales)
- Create a
MessageProvider
.
- Parameters:
resourceNames
- The names of the resources containing the messages.locales
- The corresponding locales.
getInstance
public static MessageProvider getInstance()
- Return the single instance of the
MessageProvider
.
Intialilizes the MessageProvider
with the default message
locations: /resources/properties/spss_messages
.
- Returns:
- The single
MessageProvider
.
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.