Class 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 = 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:
    Serialized Form
    • Field Detail

      • sessionExpiredURL

        protected String sessionExpiredURL
      • sessionExpiredNotificationEnabled

        protected boolean sessionExpiredNotificationEnabled
      • sessionExpiredCaption

        protected String sessionExpiredCaption
      • sessionExpiredMessage

        protected String sessionExpiredMessage
      • 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()
        Gets the URL the user will be redirected to after dismissing a session expired message.
        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 by getSessionExpiredURL().
        Returns:
        true to show the notification to the end user, false to redirect directly
      • getSessionExpiredCaption

        public String getSessionExpiredCaption()
        Gets the caption to show in a "session expired" notification.
        Returns:
        The caption to show or null to show no caption.
      • getSessionExpiredMessage

        public String getSessionExpiredMessage()
        Gets the message to show in a "session expired" notification.
        Returns:
        The message to show or null to show no message.
      • getInternalErrorURL

        public String getInternalErrorURL()
        Gets the URL the user will be redirected to after dismissing an internal error message.
        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 by getInternalErrorURL().
        Returns:
        true to show the notification to the end user, false to redirect directly
      • getInternalErrorCaption

        public String getInternalErrorCaption()
        Gets the caption to show in an "internal error" notification.
        Returns:
        The caption to show or null to show no caption.
      • getInternalErrorMessage

        public String getInternalErrorMessage()
        Gets the message to show in a "internal error" notification.
        Returns:
        The message to show or null to show no message.
      • getCookiesDisabledURL

        public String getCookiesDisabledURL()
        Gets the URL the user will be redirected to after dismissing a "cookies disabled" message.
        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 by getCookiesDisabledURL().
        Returns:
        true to show the notification to the end user, false to redirect directly
      • getCookiesDisabledCaption

        public String getCookiesDisabledCaption()
        Gets the caption to show in a "cookies disabled" notification.
        Returns:
        The caption to show or null to show no caption.
      • getCookiesDisabledMessage

        public String getCookiesDisabledMessage()
        Gets the message to show in a "cookies disabled" notification.
        Returns:
        The message to show or null to show no message.