|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.webapp.nls.BundleBase
public abstract class BundleBase
Base class for bundle related things, exposing formatters and other code around the single "findMessage" method.
Constructor Summary | |
---|---|
BundleBase()
|
Method Summary | |
---|---|
abstract java.lang.String |
findMessage(java.util.Locale loc,
java.lang.String code)
Locate the specified key for the specified locale. |
java.lang.String |
formatMessage(java.lang.String key,
java.lang.Object... param)
Gets the string, and applies default message formatting using the parameters passed in the current locale. |
java.lang.String |
getString(java.util.Locale loc,
java.lang.String key)
Returns a translation of key in the specified locale (or the one closest to it). |
java.lang.String |
getString(java.lang.String key)
Returns the translation of the key passed in the current client locale. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BundleBase()
Method Detail |
---|
public abstract java.lang.String findMessage(java.util.Locale loc, java.lang.String code)
NlsMessageProvider
findMessage
in interface NlsMessageProvider
public java.lang.String getString(java.util.Locale loc, java.lang.String key)
loc
- key
-
ResourceNotFoundException
- the bundle cannot be located.public java.lang.String getString(java.lang.String key)
key
-
public java.lang.String formatMessage(java.lang.String key, java.lang.Object... param)
key
- param
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |