com.fullspan.pwkeep.resource
Class PwkResource

java.lang.Object
  extended by com.fullspan.pwkeep.resource.PwkResource

public class PwkResource
extends java.lang.Object

Utility class to retrieve and format messages.

Version:
$Revision: 1.4 $, $Date: 2004/01/18 08:09:06 $
Author:
Mitch Stuart, $Author: mitch $

Constructor Summary
PwkResource()
           
 
Method Summary
static java.lang.String formatMessage(java.lang.String key, java.lang.Object[] arguments)
          Formats a message from messages.properties.
static java.lang.String getMessage(java.lang.String key)
          Gets a message from messages.properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PwkResource

public PwkResource()
Method Detail

getMessage

public static java.lang.String getMessage(java.lang.String key)
Gets a message from messages.properties.

Parameters:
key - the key for the string in the properties file
Returns:
the message
See Also:
ResourceBundle.getString(String)

formatMessage

public static java.lang.String formatMessage(java.lang.String key,
                                             java.lang.Object[] arguments)
Formats a message from messages.properties.

Parameters:
key - the key for the string in the properties file
arguments - the arguments with which to format the message
Returns:
the formatted message
See Also:
MessageFormat.format(String, Object[])