Package ubic.gemma.web.util
Interface MessageUtil
-
- All Known Implementing Classes:
MessageUtilImpl
public interface MessageUtil
Provides methods for putting messages to the user in the session.- Author:
- paul
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getText(String msgKey, Object[] args, Locale locale)
Convenience method for getting a i18n key's value with arguments.String
getText(String msgKey, String arg, Locale locale)
Convenient method for getting a i18n key's value with a single string argument.String
getText(String msgKey, Locale locale)
Convenience method for getting a i18n key's value.void
saveMessage(javax.servlet.http.HttpServletRequest request, String msg)
Put a message into the session.void
saveMessage(javax.servlet.http.HttpServletRequest request, String key, Object[] parameters, String defaultMessage)
Put a message into the session.void
saveMessage(javax.servlet.http.HttpServletRequest request, String key, Object parameter, String defaultMessage)
Put a message into the session.void
saveMessage(javax.servlet.http.HttpServletRequest request, String key, String defaultMessage)
Put a message into the session.void
saveMessage(javax.servlet.http.HttpSession session, String msg)
Put a message into the session.
-
-
-
Method Detail
-
getText
String getText(String msgKey, Locale locale)
Convenience method for getting a i18n key's value. Implementation note: Calling getMessageSourceAccessor() is used because the RequestContext variable is not set in unit tests b/c there's no DispatchServlet Request.- Parameters:
msgKey
- keylocale
- the current locale- Returns:
- text
-
getText
String getText(String msgKey, Object[] args, Locale locale)
Convenience method for getting a i18n key's value with arguments.- Parameters:
msgKey
- keyargs
- argslocale
- the current locale- Returns:
- text
-
getText
String getText(String msgKey, String arg, Locale locale)
Convenient method for getting a i18n key's value with a single string argument.- Parameters:
msgKey
- message keyarg
- argumentlocale
- the current locale- Returns:
- text
-
saveMessage
void saveMessage(javax.servlet.http.HttpServletRequest request, String msg)
Put a message into the session. These can be displayed to the user. Messages accumulate in a list until they are viewed in messages.jsp - at which point they are removed from the session.- Parameters:
request
- requestmsg
- msg
-
saveMessage
void saveMessage(javax.servlet.http.HttpServletRequest request, String key, Object parameter, String defaultMessage)
Put a message into the session. These can be displayed to the user. Messages accumulate in a list until they are viewed in messages.jsp - at which point they are removed from the session.- Parameters:
request
- requestparameter
- parameter to be filled into the message.defaultMessage
- default message
-
saveMessage
void saveMessage(javax.servlet.http.HttpServletRequest request, String key, Object[] parameters, String defaultMessage)
Put a message into the session. These can be displayed to the user. Messages accumulate in a list until they are viewed in messages.jsp - at which point they are removed from the session.- Parameters:
request
- requestparameters
- Array of parameters to be filled into the message.defaultMessage
- default message
-
saveMessage
void saveMessage(javax.servlet.http.HttpServletRequest request, String key, String defaultMessage)
Put a message into the session. These can be displayed to the user. Messages accumulate in a list until they are viewed in messages.jsp - at which point they are removed from the session.- Parameters:
request
- requestkey
- keydefaultMessage
- default message
-
saveMessage
void saveMessage(javax.servlet.http.HttpSession session, String msg)
Put a message into the session. These can be displayed to the user. Messages accumulate in a list until they are viewed in messages.jsp - at which point they are removed from the session.- Parameters:
session
- sessionmsg
- msg
-
-