Class StaticMessageLookup

  • All Implemented Interfaces:
    MessageLookup

    public class StaticMessageLookup
    extends java.lang.Object
    implements MessageLookup
    A MessageLookup that retrieves messages from a resource bundle in the classpath.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage​(java.lang.String messageKey)
      Get message from registered resource bundle.
      java.lang.String getMessage​(java.lang.String messageKey, java.lang.Object... params)
      Get a localised message string, parameterized using standard MessageFormatter.
      java.lang.String getMessage​(java.lang.String messageKey, java.util.Locale locale)
      Get a localised message string
      java.lang.String getMessage​(java.lang.String messageKey, java.util.Locale locale, java.lang.Object... params)
      Get a localised message string, parameterized using standard MessageFormatter.
      • Methods inherited from class java.lang.Object

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

      • StaticMessageLookup

        public StaticMessageLookup()
    • Method Detail

      • getMessage

        @NotAuditable
        public java.lang.String getMessage​(java.lang.String messageKey)
        Description copied from interface: MessageLookup
        Get message from registered resource bundle.
        Specified by:
        getMessage in interface MessageLookup
        Parameters:
        messageKey - message key
        Returns:
        localised message string, null if not found
      • getMessage

        @NotAuditable
        public java.lang.String getMessage​(java.lang.String messageKey,
                                           java.util.Locale locale)
        Description copied from interface: MessageLookup
        Get a localised message string
        Specified by:
        getMessage in interface MessageLookup
        Parameters:
        messageKey - the message key
        locale - override the current locale
        Returns:
        the localised message string, null if not found
      • getMessage

        @NotAuditable
        public java.lang.String getMessage​(java.lang.String messageKey,
                                           java.lang.Object... params)
        Description copied from interface: MessageLookup
        Get a localised message string, parameterized using standard MessageFormatter.
        Specified by:
        getMessage in interface MessageLookup
        Parameters:
        messageKey - message key
        params - format parameters
        Returns:
        the localised string, null if not found
      • getMessage

        @NotAuditable
        public java.lang.String getMessage​(java.lang.String messageKey,
                                           java.util.Locale locale,
                                           java.lang.Object... params)
        Description copied from interface: MessageLookup
        Get a localised message string, parameterized using standard MessageFormatter.
        Specified by:
        getMessage in interface MessageLookup
        Parameters:
        messageKey - the message key
        locale - override current locale
        params - the localised message string
        Returns:
        the localised string, null if not found