Package com.vaadin.server
Class SystemMessages
- java.lang.Object
-
- com.vaadin.server.SystemMessages
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CustomizedSystemMessages
public class SystemMessages extends Object implements Serializable
Contains the system messages used to notify the user about various critical situations that can occur.Use
VaadinService.setSystemMessagesProvider(SystemMessagesProvider)
to customize.The defaults defined in this class are:
- sessionExpiredURL = null
- sessionExpiredNotificationEnabled = true
- sessionExpiredCaption = ""
- sessionExpiredMessage = "Take note of any unsaved data, and click here to continue."
- communicationErrorURL = null
- communicationErrorNotificationEnabled = true
- communicationErrorCaption = "Communication problem"
- communicationErrorMessage = "Take note of any unsaved data, and click here to continue."
- internalErrorURL = null
- internalErrorNotificationEnabled = true
- internalErrorCaption = "Internal error"
- internalErrorMessage = "Please notify the administrator.
Take note of any unsaved data, and click here to continue." - cookiesDisabledURL = null
- cookiesDisabledNotificationEnabled = true
- cookiesDisabledCaption = "Cookies disabled"
- cookiesDisabledMessage = "This application requires cookies to
function.
Please enable cookies in your browser and click here to try again.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
authenticationErrorCaption
protected String
authenticationErrorMessage
protected boolean
authenticationErrorNotificationEnabled
protected String
authenticationErrorURL
protected String
communicationErrorCaption
protected String
communicationErrorMessage
protected boolean
communicationErrorNotificationEnabled
protected String
communicationErrorURL
protected String
cookiesDisabledCaption
protected String
cookiesDisabledMessage
protected boolean
cookiesDisabledNotificationEnabled
protected String
cookiesDisabledURL
protected String
internalErrorCaption
protected String
internalErrorMessage
protected boolean
internalErrorNotificationEnabled
protected String
internalErrorURL
protected String
sessionExpiredCaption
protected String
sessionExpiredMessage
protected boolean
sessionExpiredNotificationEnabled
protected String
sessionExpiredURL
-
Method Summary
-
-
-
Field Detail
-
sessionExpiredURL
protected String sessionExpiredURL
-
sessionExpiredNotificationEnabled
protected boolean sessionExpiredNotificationEnabled
-
sessionExpiredCaption
protected String sessionExpiredCaption
-
sessionExpiredMessage
protected String sessionExpiredMessage
-
communicationErrorURL
protected String communicationErrorURL
-
communicationErrorNotificationEnabled
protected boolean communicationErrorNotificationEnabled
-
communicationErrorCaption
protected String communicationErrorCaption
-
communicationErrorMessage
protected String communicationErrorMessage
-
authenticationErrorURL
protected String authenticationErrorURL
-
authenticationErrorNotificationEnabled
protected boolean authenticationErrorNotificationEnabled
-
authenticationErrorCaption
protected String authenticationErrorCaption
-
authenticationErrorMessage
protected String authenticationErrorMessage
-
internalErrorURL
protected String internalErrorURL
-
internalErrorNotificationEnabled
protected boolean internalErrorNotificationEnabled
-
internalErrorCaption
protected String internalErrorCaption
-
internalErrorMessage
protected String internalErrorMessage
-
cookiesDisabledURL
protected String cookiesDisabledURL
-
cookiesDisabledNotificationEnabled
protected boolean cookiesDisabledNotificationEnabled
-
cookiesDisabledCaption
protected String cookiesDisabledCaption
-
cookiesDisabledMessage
protected String cookiesDisabledMessage
-
-
Method Detail
-
getSessionExpiredURL
public String getSessionExpiredURL()
- Returns:
- null to indicate that the application will be restarted after session expired message has been shown.
-
isSessionExpiredNotificationEnabled
public boolean isSessionExpiredNotificationEnabled()
- Returns:
- true to show session expiration message.
-
getSessionExpiredCaption
public String getSessionExpiredCaption()
- Returns:
- "" to show no caption.
-
getSessionExpiredMessage
public String getSessionExpiredMessage()
- Returns:
- "Take note of any unsaved data, and click here to continue."
-
getCommunicationErrorURL
public String getCommunicationErrorURL()
- Returns:
- null to reload the application after communication error message.
-
isCommunicationErrorNotificationEnabled
public boolean isCommunicationErrorNotificationEnabled()
- Returns:
- true to show the communication error message.
-
getCommunicationErrorCaption
public String getCommunicationErrorCaption()
- Returns:
- "Communication problem"
-
getCommunicationErrorMessage
public String getCommunicationErrorMessage()
- Returns:
- "Take note of any unsaved data, and click here to continue."
-
getAuthenticationErrorURL
public String getAuthenticationErrorURL()
- Returns:
- null to reload the application after authentication error message.
-
isAuthenticationErrorNotificationEnabled
public boolean isAuthenticationErrorNotificationEnabled()
- Returns:
- true to show the authentication error message.
-
getAuthenticationErrorCaption
public String getAuthenticationErrorCaption()
- Returns:
- "Authentication problem"
-
getAuthenticationErrorMessage
public String getAuthenticationErrorMessage()
- Returns:
- "Take note of any unsaved data, and click here to continue."
-
getInternalErrorURL
public String getInternalErrorURL()
- Returns:
- null to reload the current URL after internal error message has been shown.
-
isInternalErrorNotificationEnabled
public boolean isInternalErrorNotificationEnabled()
- Returns:
- true to enable showing of internal error message.
-
getInternalErrorCaption
public String getInternalErrorCaption()
- Returns:
- "Internal error"
-
getInternalErrorMessage
public String getInternalErrorMessage()
- Returns:
- "Please notify the administrator.
Take note of any unsaved data, and click here to continue."
-
getCookiesDisabledURL
public String getCookiesDisabledURL()
Returns the URL the user should be redirected to after dismissing the "you have to enable your cookies" message. Typically null.- Returns:
- A URL the user should be redirected to after dismissing the message or null to reload the current URL.
-
isCookiesDisabledNotificationEnabled
public boolean isCookiesDisabledNotificationEnabled()
Determines if "cookies disabled" messages should be shown to the end user or not. If the notification is disabled the user will be immediately redirected to the URL returned bygetCookiesDisabledURL()
.- Returns:
- true to show "cookies disabled" messages to the end user, false to redirect to the given URL directly
-
getCookiesDisabledCaption
public String getCookiesDisabledCaption()
Returns the caption of the message shown to the user when cookies are disabled in the browser.- Returns:
- The caption of the "cookies disabled" message
-
getCookiesDisabledMessage
public String getCookiesDisabledMessage()
Returns the message shown to the user when cookies are disabled in the browser.- Returns:
- The "cookies disabled" message
-
-