org.dbforms.util
Class MessageResource

java.lang.Object
  extended by org.dbforms.util.MessageResource

public class MessageResource
extends Object

base class for handling message resources

Author:
Henner Kollmann

Constructor Summary
MessageResource(String subClass)
          Creates a new MessageResource object.
 
Method Summary
 String getMessage(String msg, Locale loc)
          Retrieve message from ResourceBundle.
 String getMessage(String msg, Locale loc, String[] parms)
          Retrieve message from ResourceBundle and replace parameter "{x}" with values in parms array.
 String getSubClass()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageResource

public MessageResource(String subClass)
Creates a new MessageResource object.

Parameters:
subClass - DOCUMENT ME!
Method Detail

getMessage

public String getMessage(String msg,
                         Locale loc)
Retrieve message from ResourceBundle. If the ResourceBundle is not yet cached, cache it and retreive message.

Parameters:
msgmsg - : Message key to lookup.
locloc - : Locale object to map message with good ResourceBundle.
Returns:
String : Message resolve, null if not found.

getMessage

public String getMessage(String msg,
                         Locale loc,
                         String[] parms)
Retrieve message from ResourceBundle and replace parameter "{x}" with values in parms array.

Parameters:
msgmsg - : Message key to lookup.
locloc - : Locale object to map message with good ResourceBundle.
parmsparms[] - : Parameters to replace "{x}" in message .
Returns:
String : Message resolve with parameter replaced, null if message key not found.

getSubClass

public String getSubClass()
DOCUMENT ME!

Returns:
DOCUMENT ME!


Copyright © 2002-2006 DbForms. All Rights Reserved.