org.riotfamily.riot.status
Class AbstractStatusMonitor
java.lang.Object
org.riotfamily.riot.status.AbstractStatusMonitor
- All Implemented Interfaces:
- StatusMonitor, BeanNameAware, MessageSourceAware
- Direct Known Subclasses:
- HqlStatusMonitor
public abstract class AbstractStatusMonitor
- extends Object
- implements StatusMonitor, MessageSourceAware, BeanNameAware
Convenience base class for StatusMonitor
implementations.
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStatusMonitor
public AbstractStatusMonitor()
setMessageSource
public void setMessageSource(MessageSource messageSource)
- Specified by:
setMessageSource
in interface MessageSourceAware
setMessageKey
public void setMessageKey(String messageKey)
isHideZeroStatus
public boolean isHideZeroStatus()
setHideZeroStatus
public void setHideZeroStatus(boolean hideZeroStatus)
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interface BeanNameAware
setLink
public void setLink(String link)
setCache
public void setCache(String period)
getMessages
public Collection<StatusMessage> getMessages(Locale locale)
- Description copied from interface:
StatusMonitor
- Implementors may return a Collection of
StatusMessage
instances.
Make sure that you properly escape all parts of the message that could
contain user-generated content to prevent XSS attacks.
- Specified by:
getMessages
in interface StatusMonitor
isVisible
protected boolean isVisible(Object[] args)
getArgs
protected abstract Object[] getArgs()
- Subclasses must return an array of objects which will be passed to
the MessageSource as arguments. All arguments that are neither
primitive wrappers nor dates will be HTML-escaped automatically to
prevent XSS attacks.
- See Also:
FormatUtils.htmlEscapeArgs(Object[])