[hibernate-commits] Hibernate SVN: r15788 - validator/trunk/validation-api/src/main/java/javax/validation.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed Jan 14 14:54:17 EST 2009
Author: epbernard
Date: 2009-01-14 14:54:17 -0500 (Wed, 14 Jan 2009)
New Revision: 15788
Modified:
validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java
Log:
Clarify JavaDoc
Modified: validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java
===================================================================
--- validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java 2009-01-14 17:13:55 UTC (rev 15787)
+++ validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java 2009-01-14 19:54:17 UTC (rev 15788)
@@ -23,7 +23,7 @@
String getDefaultErrorMessage();
/**
- * Add a new unexpanded error message.
+ * Add a new error message. This error message will be interpolated.
* <p/>
* If isValid returns false, a ConstraintViolation object will be built per error message
* including the default one unless #disableDefaultErrorMEssage() has been called.
@@ -39,19 +39,21 @@
void addError(String message);
/**
- * Add a new unexpanded error message to a given sub property.
+ * Add a new error message to a given sub property <code>property</code>.
+ * This error message will be interpolated.
* <p/>
* If isValid returns false, a ConstraintViolation object will be built
- * per error message including the default one
- * if null apply to the current property or the bean the constraint is applied on,
- * otherwise apply to the <code>property</code> named
+ * per error message including the default one unless #disableDefaultErrorMEssage()
+ * has been called.
+ * If the constraint being validated is not a class-level constraint,
+ * a ValidationException is raised.
+ *
* <p/>
- * TODO exception or swallowed when bean level instance is not present?
*
* @param message new unexpanded error message
* @param property property name the ConstraintViolation is targeting
*
- * @throws ValidationException when the property is not present on the bean level object
+ * @throws ValidationException if the constraint is not set on a class-level
*/
void addError(String message, String property);
More information about the hibernate-commits
mailing list