public abstract class AbstractMessageInterpolator
extends java.lang.Object
implements javax.validation.MessageInterpolator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTRIBUTOR_VALIDATION_MESSAGES
Default name of the message bundle defined by a constraint definition contributor.
|
static java.lang.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 java.lang.String |
interpolate(javax.validation.MessageInterpolator.Context context,
java.util.Locale locale,
java.lang.String term) |
java.lang.String |
interpolate(java.lang.String message,
javax.validation.MessageInterpolator.Context context) |
java.lang.String |
interpolate(java.lang.String message,
javax.validation.MessageInterpolator.Context context,
java.util.Locale locale) |
public static final java.lang.String USER_VALIDATION_MESSAGES
public static final java.lang.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 java.lang.String interpolate(java.lang.String message, javax.validation.MessageInterpolator.Context context)
interpolate
in interface javax.validation.MessageInterpolator
public java.lang.String interpolate(java.lang.String message, javax.validation.MessageInterpolator.Context context, java.util.Locale locale)
interpolate
in interface javax.validation.MessageInterpolator
public abstract java.lang.String interpolate(javax.validation.MessageInterpolator.Context context, java.util.Locale locale, java.lang.String term)
Copyright © 2007-2022 Red Hat, Inc. All Rights Reserved