org.springframework.binding.validation.support
Class HibernateRulesMessageInterpolator
java.lang.Object
org.springframework.binding.validation.support.HibernateRulesMessageInterpolator
- All Implemented Interfaces:
- org.hibernate.validator.MessageInterpolator
public class HibernateRulesMessageInterpolator
- extends Object
- implements org.hibernate.validator.MessageInterpolator
Custom interpolator which requires a "messageSource" bean, which is a
MessageSource implementation. This way the validation messages from Hibernate
can be overwritten through the i18n facilities of Spring RCP.
The different keys of the validators can be found in the Hibernate Reference,
or you can look in the DefaultValidationMessage.properties file inside the
hibernate-validator jar.
- Author:
- Lieven Doclo
Method Summary |
String |
interpolate(String message,
org.hibernate.validator.Validator validator,
org.hibernate.validator.MessageInterpolator defaultInterpolator)
Retrieve the message for the validator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateRulesMessageInterpolator
public HibernateRulesMessageInterpolator()
- Create a new instance of the interpolator.
interpolate
public String interpolate(String message,
org.hibernate.validator.Validator validator,
org.hibernate.validator.MessageInterpolator defaultInterpolator)
- Retrieve the message for the validator.
- Specified by:
interpolate
in interface org.hibernate.validator.MessageInterpolator
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.