public abstract class AbstractMessageInterpolator extends Object implements javax.validation.MessageInterpolator
Modifier and Type | Field and Description |
---|---|
static String |
CONTRIBUTOR_VALIDATION_MESSAGES
Default name of the message bundle defined by a constraint definition contributor.
|
static String |
USER_VALIDATION_MESSAGES
The name of the user-provided message bundle as defined in the specification.
|
Constructor and Description |
---|
AbstractMessageInterpolator() |
AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator) |
AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
ResourceBundleLocator contributorResourceBundleLocator)
MessageInterpolator taking two resource bundle locators. |
AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
ResourceBundleLocator contributorResourceBundleLocator,
boolean cacheMessages)
MessageInterpolator taking two resource bundle locators. |
Modifier and Type | Method and Description |
---|---|
abstract String |
interpolate(javax.validation.MessageInterpolator.Context context,
Locale locale,
String term) |
String |
interpolate(String message,
javax.validation.MessageInterpolator.Context context) |
String |
interpolate(String message,
javax.validation.MessageInterpolator.Context context,
Locale locale) |
public static final String USER_VALIDATION_MESSAGES
public static final String CONTRIBUTOR_VALIDATION_MESSAGES
public AbstractMessageInterpolator()
public AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator)
public AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, ResourceBundleLocator contributorResourceBundleLocator)
MessageInterpolator
taking two resource bundle locators.userResourceBundleLocator
- ResourceBundleLocator
used to load user provided resource bundlecontributorResourceBundleLocator
- ResourceBundleLocator
used to load resource bundle of constraint contributorpublic AbstractMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, ResourceBundleLocator contributorResourceBundleLocator, boolean cacheMessages)
MessageInterpolator
taking two resource bundle locators.userResourceBundleLocator
- ResourceBundleLocator
used to load user provided resource bundlecontributorResourceBundleLocator
- ResourceBundleLocator
used to load resource bundle of constraint contributorcacheMessages
- Whether resolved messages should be cached or not.public String interpolate(String message, javax.validation.MessageInterpolator.Context context)
interpolate
in interface javax.validation.MessageInterpolator
public String interpolate(String message, javax.validation.MessageInterpolator.Context context, Locale locale)
interpolate
in interface javax.validation.MessageInterpolator
Copyright © 2007-2019 Red Hat, Inc. All Rights Reserved