[hibernate-commits] Hibernate SVN: r15982 - in beanvalidation/trunk/validation-api/src/main/java/javax/validation: bootstrap and 1 other directories.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Tue Feb 17 05:14:09 EST 2009
Author: epbernard
Date: 2009-02-17 05:14:09 -0500 (Tue, 17 Feb 2009)
New Revision: 15982
Modified:
beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/Configuration.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintDescriptor.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidator.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/ElementDescriptor.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/ValidatorContext.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java
beanvalidation/trunk/validation-api/src/main/java/javax/validation/spi/ConfigurationState.java
Log:
BVAL-118 getGroups return Default and javadoc enhancements + typos
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -20,8 +20,10 @@
boolean isBeanConstrained();
/**
- * Return the property level constraints for a given propertyName
- * or null if either the property does not exist or has no constraint
+ * Return the property descriptor for a given property.
+ * Return null if the property does not exist or has no
+ * constraint nor is marked as cascaded (see {@link #getConstrainedProperties()} )
+ *
* The returned object (and associated objects including ConstraintDescriptors)
* are immutable.
*
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/Configuration.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/Configuration.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/Configuration.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -69,6 +69,9 @@
/**
* Defines the message interpolator used. Has priority over the configuration
* based message interpolator.
+ * If null is passed, the default message interpolator
+ * (defined in XML or the specification default)
+ * is used.
*
* @param interpolator message interpolator implementation.
*
@@ -79,6 +82,9 @@
/**
* Defines the traversable resolver used. Has priority over the configuration
* based traversable resolver.
+ * If null is passed, the default traversable resolver
+ * (defined in XML or the specification default)
+ * is used.
*
* @param resolver traversable resolver implementation.
*
@@ -89,6 +95,9 @@
/**
* Defines the constraint validator factory. Has priority over the configuration
* based constraint factory.
+ * If null is passed, the default constraint validator factory
+ * (defined in XML or the specification default)
+ * is used.
*
* @param constraintValidatorFactory constraint factory inmplementation.
*
@@ -107,6 +116,7 @@
* @param stream XML mapping stream.
*
* @return <code>this</code> following the chaining method pattern.
+ * @throws IllegalArgumentException if <code>stream</code> is null
*/
T addMapping(InputStream stream);
@@ -131,9 +141,14 @@
* If a property with a given name is defined both via this method and in the
* XML configuration, the value set programmatically has priority.
*
+ * If null is passed as a value, the value defined in XML is used. If no value
+ * is defined in XML, the property is considered unset.
+ *
* @param name property name.
* @param value property value.
* @return <code>this</code> following the chaining method pattern.
+ *
+ * @throws IllegalArgumentException if <code>name</code> is null
*/
T addProperty(String name, String value);
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintDescriptor.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintDescriptor.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintDescriptor.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -39,6 +39,10 @@
Annotation getAnnotation();
/**
+ * The Set of groups the constraint is applied on.
+ * If the constraint declares no group, the <code>Default</code>
+ * group is returned.
+ *
* @return The groups the constraint is applied on.
*/
Set<Class<?>> getGroups();
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidator.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidator.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidator.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -42,13 +42,13 @@
/**
* Implement the validation logic.
- * <code>object</code> state must not be changed by a Constraint implementation
+ * <code>value</code> state must not be changed by a Constraint implementation
*
- * @param object object to validate
+ * @param value object to validate
* @param constraintValidatorContext context in which the constraint is evaluated
*
- * @return false if <code>object</code> does not pass the constraint
+ * @return false if <code>value</code> does not pass the constraint
*/
- boolean isValid(T object, ConstraintValidatorContext constraintValidatorContext);
+ boolean isValid(T value, ConstraintValidatorContext constraintValidatorContext);
}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/ElementDescriptor.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/ElementDescriptor.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/ElementDescriptor.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -40,7 +40,10 @@
Class<?> getType();
/**
- * @return All the constraint descriptors for this element.
+ * Return all constraint descriptors for this element or an
+ * empty Set if none are present.
+ *
+ * @return Set of constraint descriptors for this element
*/
Set<ConstraintDescriptor> getConstraintDescriptors();
}
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/ValidatorContext.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/ValidatorContext.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/ValidatorContext.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -8,7 +8,8 @@
public interface ValidatorContext {
/**
* Defines the message interpolator implementation used by the Validator.
- * If unset, the message interpolator of the ValidatorFactory is used.
+ * If not set or if null is passed as a parameter,
+ * the message interpolator of the ValidatorFactory is used.
*
* @return self following the chaining method pattern
*/
@@ -16,7 +17,8 @@
/**
* Defines the traversable resolver implementation used by the Validator.
- * If unset, the traversable resolver of the ValidatorFactory is used.
+ * If not set or if null is passed as a parameter,
+ * the traversable resolver of the ValidatorFactory is used.
*
* @return self following the chaining method pattern
*/
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -29,7 +29,7 @@
public ProviderSpecificBootstrap<T> providerResolver(ValidationProviderResolver resolver);
/**
- * Determine the provider implementation suitable for configurationType and delegate
+ * Determine the provider implementation suitable for T and delegate
* the creation of this specific Configuration subclass to the provider.
*
* @return a Configuration sub interface implementation
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/spi/ConfigurationState.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/spi/ConfigurationState.java 2009-02-17 07:55:44 UTC (rev 15981)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/spi/ConfigurationState.java 2009-02-17 10:14:09 UTC (rev 15982)
@@ -43,7 +43,7 @@
boolean isIgnoreXmlConfiguration();
/**
- * Message interpolator as defined in the following decresing priority:
+ * Message interpolator as defined in the following decreasing priority:
* - set via the Configuration programmatic API
* - defined in META-INF/validation.xml provided that ignoredXmlConfiguration
* is false. In this case the instance is created via its no-arg constructor.
@@ -81,7 +81,7 @@
ConstraintValidatorFactory getConstraintValidatorFactory();
/**
- * TraversableResolver as defined in the following decresing priority:
+ * TraversableResolver as defined in the following decreasing priority:
* - set via the Configuration programmatic API
* - defined in META-INF/validation.xml provided that ignoredXmlConfiguration
* is false. In this case the instance is created via its no-arg constructor.
More information about the hibernate-commits
mailing list