|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pepper.platform.i18n.MessageCatalog
public class MessageCatalog
Text catalog keyed by String for internationalized messages
Constructor Summary | |
---|---|
MessageCatalog(String name,
ClassLoader classLoader)
Creates a new instance of MessageCatalog using the
given parameters. |
Method Summary | |
---|---|
String |
getMessage(String key,
int arg1)
Returns the message catalog string associated with the given key; arg1 is converted to a string and substituted for the first parameter of the message. |
String |
getMessage(String key,
int arg1,
int arg2)
Returns the message catalog string associated with the given key; arg1 and arg2 are converted to strings and substituted for the first two parameters of the message. |
String |
getMessage(String key,
Object arg1)
Returns the message catalog string associated with the given key; arg1 is converted to a string and substituted for the first parameter of the message. |
String |
getMessage(String key,
Object[] args)
Returns the message catalog string associated with the given key; the contents of the args array are converted to strings and substituted for the corresponding parameters of the message. |
String |
getMessage(String key,
Object arg1,
Object arg2)
Returns the message catalog string associated with the given key; arg1 and arg2 are converted to strings and substituted for the first two parameters of the message. |
String |
getMessage(String key,
Object arg1,
Object arg2,
Object arg3)
Returns the message catalog string associated with the given key; the argN paramaters are converted to strings and substituted for the first N parameters of the message. |
String |
getMessage(String key,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
Returns the message catalog string associated with the given key; the argN paramaters are converted to strings and substituted for the first N parameters of the message. |
String |
getMessage(String key,
String argList)
Returns a string based on the key and using the supplied arguments |
String |
getName()
Gets the name attribute of the CatalogI18n object. |
String |
getString(String key)
Returns the message catalog string associated with the given key. |
String |
getString(String key,
String defaultValue)
Returns the message catalog string associated with the given key; if the specified message is not found, then the default value parameter is returned. |
void |
setParent(MessageCatalog parent)
Set the parent catalog of this message catalog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageCatalog(String name, ClassLoader classLoader) throws MissingResourceException
MessageCatalog
using the
given parameters.
name
- the name of the properties file to load.classLoader
- the ClassLoader
to use to try to load bundle.
MissingResourceException
- Description of the failure.Method Detail |
---|
public void setParent(MessageCatalog parent)
parent
- Parent MessageCatalog instancepublic String getString(String key)
key
- a String
specifying a message catalog key.
String
containing the specified message.public String getMessage(String key, String argList)
key
- a String
specifying a message catalog key.argList
- a Comma separated string
of args to substitute
String
containing the specified message.public String getString(String key, String defaultValue)
key
- a String
specifying a message catalog key.defaultValue
- a String
specifying a default message value.
String
containing the specified message, or the
the default value parameter if the message is not found.public String getMessage(String key, Object arg1)
key
- a String
specifying a message catalog key.arg1
- an Object
which is converted to a String
and substitued for the first parameter of the message.
String
containing the specified message.public String getMessage(String key, Object arg1, Object arg2)
key
- a String
specifying a message catalog key.arg1
- an Object
which is converted to a String
and substitued for the first parameter of the message.arg2
- an Object
which is converted to a String
and substitued for the second parameter of the message.
String
containing the specified message.public String getMessage(String key, Object arg1, Object arg2, Object arg3)
key
- a String
specifying a message catalog key.arg1
- an Object
which is converted to a String
and substitued for the first parameter of the message.arg2
- an Object
which is converted to a String
and substitued for the second parameter of the message.arg3
- an Object
which is converted to a String
and substitued for the third parameter of the message.
String
containing the specified message.public String getMessage(String key, Object arg1, Object arg2, Object arg3, Object arg4)
key
- a String
specifying a message catalog key.arg1
- an Object
which is converted to a String
and substitued for the first parameter of the message.arg2
- an Object
which is converted to a String
and substitued for the second parameter of the message.arg3
- an Object
which is converted to a String
and substitued for the third parameter of the message.arg4
- an Object
which is converted to a String
and substitued for the fourth parameter of the message.
String
containing the specified message.public String getMessage(String key, int arg1)
key
- a String
specifying a message catalog key.arg1
- an int
which is converted to a String
and substitued for the first parameter of the message.
String
containing the specified message.public String getMessage(String key, int arg1, int arg2)
key
- a String
specifying a message catalog key.arg1
- an int
which is converted to a String
and substitued for the first parameter of the message.arg2
- an int
which is converted to a String
and substitued for the second parameter of the message.
String
containing the specified message.public String getMessage(String key, Object[] args)
key
- a String
specifying a message catalog key.args
- an Object
array; each entry in the array is
converted to a String
and substitued for the
corresponding message parameters.
String
containing the specified message.public String getName()
String
containing the name of the catalog.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |