com.vaadin.server
Class AbstractErrorMessage
java.lang.Object
com.vaadin.server.AbstractErrorMessage
- All Implemented Interfaces:
- ErrorMessage, java.io.Serializable
- Direct Known Subclasses:
- CompositeErrorMessage, SystemError, UserError
public abstract class AbstractErrorMessage
- extends java.lang.Object
- implements ErrorMessage
Base class for component error messages.
This class is used on the server side to construct the error messages to send
to the client.
- Since:
- 7.0
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractErrorMessage
protected AbstractErrorMessage(java.lang.String message)
getMessage
public java.lang.String getMessage()
setMessage
protected void setMessage(java.lang.String message)
getErrorLevel
public ErrorMessage.ErrorLevel getErrorLevel()
- Description copied from interface:
ErrorMessage
- Gets the errors level.
- Specified by:
getErrorLevel
in interface ErrorMessage
- Returns:
- the level of error as an integer.
setErrorLevel
protected void setErrorLevel(ErrorMessage.ErrorLevel level)
getMode
protected AbstractErrorMessage.ContentMode getMode()
setMode
protected void setMode(AbstractErrorMessage.ContentMode mode)
getCauses
protected java.util.List<ErrorMessage> getCauses()
addCause
protected void addCause(ErrorMessage cause)
getFormattedHtmlMessage
public java.lang.String getFormattedHtmlMessage()
- Description copied from interface:
ErrorMessage
- Returns the HTML formatted message to show in as the error message on the
client.
This method should perform any necessary escaping to avoid XSS attacks.
TODO this API may still change to use a separate data transfer object
- Specified by:
getFormattedHtmlMessage
in interface ErrorMessage
- Returns:
- HTML formatted string for the error message
getErrorMessageForException
public static ErrorMessage getErrorMessageForException(java.lang.Throwable t)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.