Class ContextMessageSourceImpl

    • Constructor Detail

      • ContextMessageSourceImpl

        public ContextMessageSourceImpl()
    • Method Detail

      • getMessage

        public String getMessage​(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 String getMessage​(String code,
                                 @Nullable @CheckForNull
                                 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