| java.lang.Object com.anthonyeden.lib.util.MessageUtilities
MessageUtilities | public class MessageUtilities (Code) | | Utilities for retrieving localized messages.
author: Anthony Eden |
Method Summary | |
public static String | getMessage(String pkg, String name, Object[] args) Locate the given message and merge it with the given arguments using
the MessageFormat class. | public static String | getMessage(String pkg, String name, Object[] args, Locale locale) Locate the given message and merge it with the given arguments using
the MessageFormat class. | public static String | getMessage(Class c, String pkg, String name, Object[] args) Locate the given message and merge it with the given arguments using
the MessageFormat class. | public static String | getMessage(Class c, String pkg, String name, Object[] args, Locale locale) Locate the given message and merge it with the given arguments using
the MessageFormat class. |
getMessage | public static String getMessage(String pkg, String name, Object[] args)(Code) | | Locate the given message and merge it with the given arguments using
the MessageFormat class. This method uses ResourceBundle to locate
a bundle called org.jpublish.messages and then pulls the appropriate
message.
Parameters: name - The message name Parameters: args - The arguments The message |
getMessage | public static String getMessage(String pkg, String name, Object[] args, Locale locale)(Code) | | Locate the given message and merge it with the given arguments using
the MessageFormat class. This method uses ResourceBundle to locate
a bundle called org.jpublish.messages and then pulls the appropriate
message.
The pkg argument is used to prepend a package name to the
bundle name so that different JARs can have different bundles. For
example, if pkg is com.foo then the Bundle should be located by the
classloader at com/foo/messages.properties. pkg can be null in which
case /messages.properties will be used.
Parameters: pkg - The package Parameters: name - The message name Parameters: args - The arguments Parameters: locale - The Locale The message |
getMessage | public static String getMessage(Class c, String pkg, String name, Object[] args)(Code) | | Locate the given message and merge it with the given arguments using
the MessageFormat class. This method uses ResourceBundle to locate
a bundle called org.jpublish.messages and then pulls the appropriate
message. The actual message key is determined by concatenating the
class name and the name parameter.
Parameters: c - The requesting class Parameters: pkg - The package name Parameters: name - The message name Parameters: args - The arguments The message |
getMessage | public static String getMessage(Class c, String pkg, String name, Object[] args, Locale locale)(Code) | | Locate the given message and merge it with the given arguments using
the MessageFormat class. This method uses ResourceBundle to locate
a bundle called org.jpublish.messages and then pulls the appropriate
message. The actual message key is determined by concatenating the
class name and the name parameter.
Parameters: c - The requesting Class Parameters: name - The message name Parameters: args - The arguments Parameters: locale - The locale The message |
|
|