Package com.vaadin.flow.server
Class SystemMessages
java.lang.Object
com.vaadin.flow.server.SystemMessages
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CustomizedSystemMessages
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 = false
- sessionExpiredCaption = "Session Expired"
- sessionExpiredMessage = "Take note of any unsaved data, and click here or press ESC key to continue."
- internalErrorURL = null
- internalErrorNotificationEnabled = true
- internalErrorCaption = "Internal error"
- internalErrorMessage = "Please notify the administrator. Take note of any unsaved data, and click here or press ESC 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 or press ESC to try again.
- Since:
- 1.0
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the caption to show in a "cookies disabled" notification.Gets the message to show in a "cookies disabled" notification.Gets the URL the user will be redirected to after dismissing a "cookies disabled" message.Gets the caption to show in an "internal error" notification.Gets the message to show in a "internal error" notification.Gets the URL the user will be redirected to after dismissing an internal error message.Gets the caption to show in a "session expired" notification.Gets the message to show in a "session expired" notification.Gets the URL the user will be redirected to after dismissing a session expired message.boolean
Checks if "cookies disabled" notifications should be shown to the end user.boolean
Checks if "internal error" notifications should be shown to the end user.boolean
Checks if "session expired" notifications should be shown to the end user.
-
Field Details
-
sessionExpiredURL
-
sessionExpiredNotificationEnabled
protected boolean sessionExpiredNotificationEnabled -
sessionExpiredCaption
-
sessionExpiredMessage
-
internalErrorURL
-
internalErrorNotificationEnabled
protected boolean internalErrorNotificationEnabled -
internalErrorCaption
-
internalErrorMessage
-
cookiesDisabledURL
-
cookiesDisabledNotificationEnabled
protected boolean cookiesDisabledNotificationEnabled -
cookiesDisabledCaption
-
cookiesDisabledMessage
-
-
Method Details
-
getSessionExpiredURL
Gets the URL the user will be redirected to after dismissing a session expired message. Default value is null.- Returns:
- the URL to redirect to, or null to refresh the page
-
isSessionExpiredNotificationEnabled
public boolean isSessionExpiredNotificationEnabled()Checks if "session expired" notifications should be shown to the end user. If the notification is disabled the user will be immediately redirected to the URL returned bygetSessionExpiredURL()
. By default, the "session expired" notification is disabled.- Returns:
true
to show the notification to the end user,false
to redirect directly
-
getSessionExpiredCaption
Gets the caption to show in a "session expired" notification. Returns null if the "session expired" notification is disabled.- Returns:
- The caption to show or
null
to show no caption.
-
getSessionExpiredMessage
Gets the message to show in a "session expired" notification. Returns null if the "session expired" notification is disabled.- Returns:
- The message to show or
null
to show no message.
-
getInternalErrorURL
Gets the URL the user will be redirected to after dismissing an internal error message. Default value is null.- Returns:
- the URL to redirect to, or null to refresh the page
-
isInternalErrorNotificationEnabled
public boolean isInternalErrorNotificationEnabled()Checks if "internal error" notifications should be shown to the end user. If the notification is disabled the user will be immediately redirected to the URL returned bygetInternalErrorURL()
. By default, the "internal error" notification is enabled.- Returns:
true
to show the notification to the end user,false
to redirect directly
-
getInternalErrorCaption
Gets the caption to show in an "internal error" notification. Returns null if the "internal error" notification is disabled.- Returns:
- The caption to show or
null
to show no caption.
-
getInternalErrorMessage
Gets the message to show in a "internal error" notification. Returns null if the "internal error" notification is disabled.- Returns:
- The message to show or
null
to show no message.
-
getCookiesDisabledURL
Gets the URL the user will be redirected to after dismissing a "cookies disabled" message. Default value is null.- Returns:
- the URL to redirect to, or null to refresh the page
-
isCookiesDisabledNotificationEnabled
public boolean isCookiesDisabledNotificationEnabled()Checks if "cookies disabled" notifications should be shown to the end user. If the notification is disabled the user will be immediately redirected to the URL returned bygetCookiesDisabledURL()
. By default, the "cookies disable" notification is disabled.- Returns:
true
to show the notification to the end user,false
to redirect directly
-
getCookiesDisabledCaption
Gets the caption to show in a "cookies disabled" notification. Returns null if the "cookies disable" notification is disabled.- Returns:
- The caption to show or
null
to show no caption.
-
getCookiesDisabledMessage
Gets the message to show in a "cookies disabled" notification. Returns null if the "cookies disable" notification is disabled.- Returns:
- The message to show or
null
to show no message.
-