| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.util.MessageHelper
This is a helper class for getting messages from the Resource. It also performs token replacement
| Constructor Summary | |
| MessageHelper() | |
| Method Summary | |
| static String | findMessage(Locale locale,
                       String key,
                       Object[] args)Gets the message for the input key from the default resources, as specified in the 'framework.messageResources.bundle' property of framework.properties files. | 
| static String | findMessage(MessageResources resources,
                       Locale locale,
                       String key,
                       Object[] args)Gets the message for the input key from the resources. | 
| static String | findMessage(PageContext pageContext,
                       String key,
                       Object[] args)Gets the message for the input key from the resources (an attribute in the request stream). | 
| static String | findMessage(PageContext pageContext,
                       String resources,
                       String locale,
                       String key,
                       Object[] args)Gets the message for the input key from the resources (an attribute in the request stream). | 
| static String | findMessage(String key,
                       Object[] args)Gets the message for the input key from the default resources, as specified in the 'framework.messageResources.bundle' property of framework.properties files. | 
| static boolean | hasTokens(String input)Returns a true if the input String consists of a tokenized string. | 
| static String | removeTokenMarkers(String input)This is a convenience method to remove the token markers from the input string. | 
| static String | replaceTokens(Locale locale,
                           String message)Replace the tokens in the input message with appropriate values from the default resources, as specified in the 'framework.messageResources.bundle' property of framework.properties files. | 
| static String | replaceTokens(MessageResources resources,
                           Locale locale,
                           String message)Replace the tokens in the input message with appropriate values from the resources. | 
| static String | replaceTokens(PageContext pageContext,
                           String message)Replace the tokens in the input message with appropriate values from the resources (an attribute in the request stream). | 
| static String | replaceTokens(PageContext pageContext,
                           String resources,
                           String locale,
                           String message)Replace the tokens in the input message with appropriate values from the resources (an attribute in the request stream). | 
| static String | replaceTokens(String message)Replace the tokens in the input message with appropriate values from the default resources, as specified in the 'framework.messageResources.bundle' property of framework.properties files. | 
| static String | tokenize(String input)This will add the Token Markers around the input String. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public MessageHelper()
| Method Detail | 
public static String findMessage(String key,
                                 Object[] args)
key - The key of the the message to be looked up.args - An array of arguments to be added to the message.
public static String findMessage(Locale locale,
                                 String key,
                                 Object[] args)
locale - the Locale to be used when looking up the ResourceBundle.key - The key of the the message to be looked up.args - An array of arguments to be added to the message.
public static String findMessage(PageContext pageContext,
                                 String key,
                                 Object[] args)
pageContext - The servlet pageContext we are processing.key - The key of the the message to be looked up.args - An array of arguments to be added to the message.
public static String findMessage(PageContext pageContext,
                                 String resources,
                                 String locale,
                                 String key,
                                 Object[] args)
pageContext - The servlet pageContext we are processing.resources - The key that identifies that the MessageResources object in the pageContextlocale - The key that identifies that the Locale object in the pageContextkey - The key of the the message to be looked up.args - An array of arguments to be added to the message.
public static String findMessage(MessageResources resources,
                                 Locale locale,
                                 String key,
                                 Object[] args)
resources - The underlying resource bundle to look at.locale - The requested message Locale.key - The key of the the message to be looked up.args - An array of arguments to be added to the message.
public static String replaceTokens(String message)
message - Message to be looked up for token replacement.
public static String replaceTokens(Locale locale,
                                   String message)
locale - the Locale to be used when looking up the ResourceBundle.message - Message to be looked up for token replacement.
public static String replaceTokens(PageContext pageContext,
                                   String message)
pageContext - The servlet pageContext we are processing.message - Message to be looked up for token replacement.
public static String replaceTokens(PageContext pageContext,
                                   String resources,
                                   String locale,
                                   String message)
pageContext - The servlet pageContext we are processing.resources - The key that identifies that the MessageResources object in the pageContextlocale - The key that identifies that the Locale object in the pageContextmessage - Message to be looked up for token replacement.
public static String replaceTokens(MessageResources resources,
                                   Locale locale,
                                   String message)
resources - The underlying resource bundle to look at.locale - The requested message Locale.message - Message to be looked up for token replacement.
public static String tokenize(String input)
input - the string to be tokenized.
public static boolean hasTokens(String input)
input - the string to be checked for presence of tokens
public static String removeTokenMarkers(String input)
input - The string from which the token markers are to be removed.
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||