Class LocalizedInterceptorException

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected LocalizedInterceptorException​(java.lang.String message, java.lang.String... parameters)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.String getBundleKey()
      For each exception that extends this exception, it has to specify the bundle key with which the localized error message could be retrieved from the bundle resource.
      protected L10NService getL10nService()
      It returns a localization service that offers localized error messages for this exception.
      java.lang.String getLocalizedMessage()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LocalizedInterceptorException

        protected LocalizedInterceptorException​(java.lang.String message,
                                                java.lang.String... parameters)
        Parameters:
        message - The error message of this exception. This message is assigned in exceptions that extend this one and is used to clarify its meaning.
        parameters - The parameters that are used for interpolation. The localized error messages returned by localization service may contain one or more placeholders and need to be evaluated with given parameters.
    • Method Detail

      • getLocalizedMessage

        public java.lang.String getLocalizedMessage()
        Overrides:
        getLocalizedMessage in class java.lang.Throwable
      • getL10nService

        protected L10NService getL10nService()
        It returns a localization service that offers localized error messages for this exception.
        Returns:
        a localization service or null if the service is not available.
      • getBundleKey

        protected abstract java.lang.String getBundleKey()
        For each exception that extends this exception, it has to specify the bundle key with which the localized error message could be retrieved from the bundle resource.
        Returns:
        bundle key.