Class ContextMessageSourceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage​(java.lang.String code)
      Returns the message in the locale of the current user.
      java.lang.String getMessage​(java.lang.String code, java.lang.Object[] args)
      Returns the message in the locale of the current user.
      • Methods inherited from class java.lang.Object

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

      • ContextMessageSourceImpl

        public ContextMessageSourceImpl()
    • Method Detail

      • getMessage

        public java.lang.String getMessage​(java.lang.String code)
        Description copied from interface: ContextMessageSource
        Returns the message in the locale of the current user.
        Specified by:
        getMessage in interface ContextMessageSource
        Parameters:
        code - the code to lookup up, such as 'calculator.noRateSet'
        Returns:
        the resolved message, never null
      • getMessage

        public java.lang.String getMessage​(java.lang.String code,
                                           @Nullable @CheckForNull
                                           java.lang.Object[] args)
        Description copied from interface: ContextMessageSource
        Returns the message in the locale of the current user.
        Specified by:
        getMessage in interface ContextMessageSource
        Parameters:
        code - the code to lookup up, such as 'calculator.noRateSet'
        args - an array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), * or null if none.
        Returns:
        the resolved message, never null