public interface TemplateFormatter
Different implementation can support different formats for the template.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.String msgTemplate,
java.util.List<java.lang.String> args,
java.util.Locale locale)
Formats a message template for the target locale.
|
java.lang.String |
format(java.lang.String msgTemplate,
java.util.List<java.lang.String> args,
java.util.Locale locale,
java.util.TimeZone tz)
Formats a message template for the target locale.
|
java.lang.String format(java.lang.String msgTemplate, java.util.List<java.lang.String> args, java.util.Locale locale)
msgTemplate
- locale-specific message templateargs
- arguments to substitute in the templatelocale
- target locale; used to localize replaced args
LocalizationException
- if formatting failedjava.lang.String format(java.lang.String msgTemplate, java.util.List<java.lang.String> args, java.util.Locale locale, java.util.TimeZone tz)
msgTemplate
- locale-specific message templateargs
- arguments to substitute in the templatelocale
- target locale; used to localize replaced args
tz
- target time zone for date and time values; if null
default MessageFormat
behavior will be usedLocalizationException
- if formatting failed