com.vaadin.terminal
Class AbstractErrorMessage

java.lang.Object
  extended by com.vaadin.terminal.AbstractErrorMessage
All Implemented Interfaces:
ErrorMessage, Serializable
Direct Known Subclasses:
CompositeErrorMessage, SystemError, UserError

public abstract class AbstractErrorMessage
extends 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

Nested Class Summary
static class AbstractErrorMessage.ContentMode
           
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.ErrorMessage
ErrorMessage.ErrorLevel
 
Field Summary
 
Fields inherited from interface com.vaadin.terminal.ErrorMessage
CRITICAL, ERROR, INFORMATION, SYSTEMERROR, WARNING
 
Constructor Summary
protected AbstractErrorMessage(String message)
           
 
Method Summary
protected  void addCause(ErrorMessage cause)
           
protected  List<ErrorMessage> getCauses()
           
 ErrorMessage.ErrorLevel getErrorLevel()
          Gets the errors level.
static ErrorMessage getErrorMessageForException(Throwable t)
           
 String getFormattedHtmlMessage()
          Returns the HTML formatted message to show in as the error message on the client.
 String getMessage()
           
protected  AbstractErrorMessage.ContentMode getMode()
           
protected  void setErrorLevel(ErrorMessage.ErrorLevel level)
           
protected  void setMessage(String message)
           
protected  void setMode(AbstractErrorMessage.ContentMode mode)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractErrorMessage

protected AbstractErrorMessage(String message)
Method Detail

getMessage

public String getMessage()

setMessage

protected void setMessage(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 List<ErrorMessage> getCauses()

addCause

protected void addCause(ErrorMessage cause)

getFormattedHtmlMessage

public 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(Throwable t)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.