Interface RuleMessageFormatStrategy

All Known Implementing Classes:
DefaultRuleMessageFormatStrategy

public interface RuleMessageFormatStrategy
Strategy that can be used to construct messages displayed for end users. Messages have the same format as supported by MessageFormat with the following exceptions:
  • arguments are specified by id, not index, e.g.: {operator} or {10a05984-afef-4f8e-a3e1-3ced0783951c}
  • numbers can have a multiplier, e.g.: {value,number}%
  • Method Details

    • format

      String format(String message, Map<String,RuleParameterData> parameters, Locale locale)
      Formats a message with the given parameters and locale.
      Parameters:
      message - - the message
      parameters - - the parameters
      locale - - the locale
      Returns:
      the formatted message
    • format

      String format(String message, Map<String,RuleParameterData> parameters, Locale locale, RuleMessageParameterDecorator parameterDecorator)
      Formats a message with the given parameters and locale. A parameter decorator can be used to change the message parameters after they were formatted.
      Parameters:
      message - - the message
      parameters - - the parameters
      locale - - the locale
      parameterDecorator - - the parameter decorator
      Returns:
      the formatted message