Class SystemMessages

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CustomizedSystemMessages

    public class SystemMessages
    extends java.lang.Object
    implements java.io.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 Detail

      • sessionExpiredURL

        protected java.lang.String sessionExpiredURL
      • sessionExpiredNotificationEnabled

        protected boolean sessionExpiredNotificationEnabled
      • sessionExpiredCaption

        protected java.lang.String sessionExpiredCaption
      • sessionExpiredMessage

        protected java.lang.String sessionExpiredMessage
      • communicationErrorURL

        protected java.lang.String communicationErrorURL
      • communicationErrorNotificationEnabled

        protected boolean communicationErrorNotificationEnabled
      • communicationErrorCaption

        protected java.lang.String communicationErrorCaption
      • communicationErrorMessage

        protected java.lang.String communicationErrorMessage
      • authenticationErrorURL

        protected java.lang.String authenticationErrorURL
      • authenticationErrorNotificationEnabled

        protected boolean authenticationErrorNotificationEnabled
      • authenticationErrorCaption

        protected java.lang.String authenticationErrorCaption
      • authenticationErrorMessage

        protected java.lang.String authenticationErrorMessage
      • internalErrorURL

        protected java.lang.String internalErrorURL
      • internalErrorNotificationEnabled

        protected boolean internalErrorNotificationEnabled
      • internalErrorCaption

        protected java.lang.String internalErrorCaption
      • internalErrorMessage

        protected java.lang.String internalErrorMessage
      • cookiesDisabledURL

        protected java.lang.String cookiesDisabledURL
      • cookiesDisabledNotificationEnabled

        protected boolean cookiesDisabledNotificationEnabled
      • cookiesDisabledCaption

        protected java.lang.String cookiesDisabledCaption
      • cookiesDisabledMessage

        protected java.lang.String cookiesDisabledMessage
    • Method Detail

      • getSessionExpiredURL

        public java.lang.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 java.lang.String getSessionExpiredCaption()
        Returns:
        "" to show no caption.
      • getSessionExpiredMessage

        public java.lang.String getSessionExpiredMessage()
        Returns:
        "Take note of any unsaved data, and click here to continue."
      • getCommunicationErrorURL

        public java.lang.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 java.lang.String getCommunicationErrorCaption()
        Returns:
        "Communication problem"
      • getCommunicationErrorMessage

        public java.lang.String getCommunicationErrorMessage()
        Returns:
        "Take note of any unsaved data, and click here to continue."
      • getAuthenticationErrorURL

        public java.lang.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 java.lang.String getAuthenticationErrorCaption()
        Returns:
        "Authentication problem"
      • getAuthenticationErrorMessage

        public java.lang.String getAuthenticationErrorMessage()
        Returns:
        "Take note of any unsaved data, and click here to continue."
      • getInternalErrorURL

        public java.lang.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 java.lang.String getInternalErrorCaption()
        Returns:
        "Internal error"
      • getInternalErrorMessage

        public java.lang.String getInternalErrorMessage()
        Returns:
        "Please notify the administrator.
        Take note of any unsaved data, and click here to continue."
      • getCookiesDisabledURL

        public java.lang.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 by getCookiesDisabledURL().
        Returns:
        true to show "cookies disabled" messages to the end user, false to redirect to the given URL directly
      • getCookiesDisabledCaption

        public java.lang.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 java.lang.String getCookiesDisabledMessage()
        Returns the message shown to the user when cookies are disabled in the browser.
        Returns:
        The "cookies disabled" message