[
http://opensource.atlassian.com/projects/hibernate/browse/BVAL-136?page=c...
]
Emmanuel Bernard commented on BVAL-136:
---------------------------------------
/**
* Interpolate a given constraint error message.
* Implementations should be as tolerant as possible on syntax errors.
*
* @author Emmanuel Bernard
* @author Hardy Ferentschik
*/
public interface MessageInterpolator {
/**
* Interpolate the message from the constraint parameters and the actual validated
object.
* The locale is defaulted according to the <code>MessageInterpolator</code>
implementation
* See the implementation documentation for more detail.
*
* @param messageTemplate The message to interpolate.
* @param context contextual information related to the interpolation
*
* @return Interpolated error message.
*/
String interpolate(String messageTemplate,
Context context);
/**
* Interpolate the message from the constraint parameters and the actual validated
object.
* The Locale used is provided as a parameter
*
* @param messageTemplate The message to interpolate.
* @param context contextual information related to the interpolation
* @param locale the locale targeted for the message
*
* @return Interpolated error message.
*/
String interpolate(String messageTemplate,
Context context,
Locale locale);
/**
* Informations related to the interpolation context
*/
static interface Context {
/**
* @return ConstraintDescriptor corresponding to the constraint being validated
*/
ConstraintDescriptor<?> getConstraintDescriptor();
/**
* @return value being validated
*/
Object getValidatedValue();
}
}
Add Context object for MessageInterpolator
------------------------------------------
Key: BVAL-136
URL:
http://opensource.atlassian.com/projects/hibernate/browse/BVAL-136
Project: Bean Validation
Issue Type: Improvement
Components: spec-general
Affects Versions: 1.0 public draft
Reporter: Emmanuel Bernard
Fix For: 1.0 proposed final draft
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira