public interface MessageInterpolator
Implementations should be as tolerant as possible on syntax errors. Implementations must be thread-safe.
Modifier and Type | Interface and Description |
---|---|
static interface |
MessageInterpolator.Context
Information related to the interpolation context.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
interpolate(java.lang.String messageTemplate,
MessageInterpolator.Context context)
Interpolates the message template based on the constraint validation context.
|
java.lang.String |
interpolate(java.lang.String messageTemplate,
MessageInterpolator.Context context,
java.util.Locale locale)
Interpolates the message template based on the constraint validation context.
|
java.lang.String interpolate(java.lang.String messageTemplate, MessageInterpolator.Context context)
The locale is defaulted according to the MessageInterpolator
implementation. See the implementation documentation for more detail.
messageTemplate
- the message to interpolatecontext
- contextual information related to the interpolationjava.lang.String interpolate(java.lang.String messageTemplate, MessageInterpolator.Context context, java.util.Locale locale)
Locale
used is provided as a parameter.messageTemplate
- the message to interpolatecontext
- contextual information related to the interpolationlocale
- the locale targeted for the message