| java.lang.Object de.odysseus.calyxo.control.MessageSupport
All known Subclasses: de.odysseus.calyxo.control.impl.DefaultMessageSupport,
MessageSupport | abstract public class MessageSupport (Code) | | Messages support class.
Actions may produce errors, warnings and infos during request processing.
Corresponding messages can be retreived from and saved to the current
request using this class.
There are several convenience methods to save error, warning and info
messages without explicitely getting the messages.
There's one instance per module.
Use one of the getInstance() methods to get it.
author: Christoph Beck |
Method Summary | |
final public void | addError(HttpServletRequest request, String key, Message message) | final public void | addError(HttpServletRequest request, Message message) | final public void | addInfo(HttpServletRequest request, String key, Message message) | final public void | addInfo(HttpServletRequest request, Message message) | final public void | addWarning(HttpServletRequest request, String key, Message message) | final public void | addWarning(HttpServletRequest request, Message message) | abstract public Messages | getErrors(HttpServletRequest request, boolean create) Get error messages for the specified request. | abstract public Messages | getInfos(HttpServletRequest request, boolean create) Get info messages for the specified request. | final public static MessageSupport | getInstance(HttpServletRequest request) | final public static MessageSupport | getInstance(PageContext pageContext) Convenience method. | final public static MessageSupport | getInstance(ModuleContext context) | abstract public Messages | getWarnings(HttpServletRequest request, boolean create) Get warning messages for the specified request. | abstract public void | setErrors(HttpServletRequest request, Messages messages) Save the specified messages as errors for the specified request. | abstract public void | setInfos(HttpServletRequest request, Messages messages) Save the specified messages as infos for the specified request. | abstract public void | setWarnings(HttpServletRequest request, Messages messages) Save the specified messages as warnings for the specified request. |
MESSAGE_SUPPORT_KEY | final public static String MESSAGE_SUPPORT_KEY(Code) | | Module scope key where the message support instance is stored.
|
addError | final public void addError(HttpServletRequest request, String key, Message message)(Code) | | Add message as error message, associated with a key
Parameters: request - the request we are processing Parameters: key - the key used when adding the message to the Messages object Parameters: message - the message to be added |
addError | final public void addError(HttpServletRequest request, Message message)(Code) | | Add message as global error message
Parameters: request - the request we are processing Parameters: message - the message to be added |
addInfo | final public void addInfo(HttpServletRequest request, String key, Message message)(Code) | | Add message as info message, associated with a key
Parameters: request - the request we are processing Parameters: key - the key used when adding the message to the Messages object Parameters: message - the message to be added |
addInfo | final public void addInfo(HttpServletRequest request, Message message)(Code) | | Add message as global info message
Parameters: request - the request we are processing Parameters: message - the message to be added |
addWarning | final public void addWarning(HttpServletRequest request, String key, Message message)(Code) | | Add message as warning message, associated with a key
Parameters: request - the request we are processing Parameters: key - the key used when adding the message to the Messages object Parameters: message - the message to be added |
addWarning | final public void addWarning(HttpServletRequest request, Message message)(Code) | | Add message as global warning message
Parameters: request - the request we are processing Parameters: message - the message to be added |
getErrors | abstract public Messages getErrors(HttpServletRequest request, boolean create)(Code) | | Get error messages for the specified request.
Parameters: request - the request we are processing Parameters: create - if true , create, save and return a new instanceif no error messages are present messages instance or null |
getInfos | abstract public Messages getInfos(HttpServletRequest request, boolean create)(Code) | | Get info messages for the specified request.
Parameters: request - the request we are processing Parameters: create - if true , create, save and return a new instanceif no info messages are present messages instance or null |
getWarnings | abstract public Messages getWarnings(HttpServletRequest request, boolean create)(Code) | | Get warning messages for the specified request.
Parameters: request - the request we are processing Parameters: create - if true , create, save and return a new instanceif no warning messages are present messages instance or null |
setErrors | abstract public void setErrors(HttpServletRequest request, Messages messages)(Code) | | Save the specified messages as errors for the specified request.
This will replace any existing error messages.
Parameters: request - the request we are processing Parameters: messages - the messages to be saved |
setInfos | abstract public void setInfos(HttpServletRequest request, Messages messages)(Code) | | Save the specified messages as infos for the specified request.
This will replace any existing info messages.
Parameters: request - the request we are processing Parameters: messages - the messages to be saved |
setWarnings | abstract public void setWarnings(HttpServletRequest request, Messages messages)(Code) | | Save the specified messages as warnings for the specified request.
This will replace any existing warning messages.
Parameters: request - the request we are processing Parameters: messages - the messages to be saved |
|
|