geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r792549 [1/2] - in /geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation: ./ bootstrap/ constraints/ spi/
Date Thu, 09 Jul 2009 13:25:03 GMT
Author: dwoods
Date: Thu Jul  9 13:25:02 2009
New Revision: 792549

URL: http://svn.apache.org/viewvc?rev=792549&view=rev
Log:
GERONIMO-4619 Upgrade to the public Bean Validation JSR-303 1.0 CR2 API

Modified:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/BeanDescriptor.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Constraint.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDeclarationException.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDefinitionException.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDescriptor.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidator.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorContext.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorFactory.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolation.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolationException.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ElementDescriptor.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupDefinitionException.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupSequence.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/MessageInterpolator.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/OverridesAttribute.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/PropertyDescriptor.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ReportAsSingleViolation.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/TraversableResolver.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/UnexpectedTypeException.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Valid.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationProviderResolver.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validator.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorContext.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorFactory.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/GenericBootstrap.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertFalse.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertTrue.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMax.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMin.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Digits.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Future.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Max.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Min.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/NotNull.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Null.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Past.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Pattern.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Size.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/BootstrapState.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ConfigurationState.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ValidationProvider.java

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/BeanDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/BeanDescriptor.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/BeanDescriptor.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/BeanDescriptor.java Thu Jul  9 13:25:02 2009
@@ -22,7 +22,6 @@
  * @version $Rev$ $Date$
  */
 public interface BeanDescriptor extends ElementDescriptor {
-
     /**
      * @return boolean
      */

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java Thu Jul  9 13:25:02 2009
@@ -18,58 +18,55 @@
 
 import java.io.InputStream;
 
-/**
- * @version $Rev$ $Date$
- */
+
 public interface Configuration<T extends Configuration<T>> {
 
-    /**
-     * @param stream
-     * @return this
-     * @throws IllegalArgumentException
-     */
-    T addMapping(InputStream stream);
-
-    /**
-     * @param name
-     * @param value
-     * @return this
-     * @throws IllegalArgumentException
-     */
-    T addProperty(String name, String value);
-
-    /**
-     * @return ValidatorFactory
-     * @throws ValidationException
-     */
-    ValidatorFactory buildValidatorFactory();
-
-    /**
-     * @param constraintValidatorFactory
-     * @return this
-     */
-    T constraintValidatorFactory(
-        ConstraintValidatorFactory constraintValidatorFactory);
-
-    /**
-     * @return MessageInterpolator
-     */
-    MessageInterpolator getDefaultMessageInterpolator();
-
-    /**
-     * @return this
-     */
-    T ignoreXmlConfiguration();
-
-    /**
-     * @param interpolator
-     * @return this
-     */
-    T messageInterpolator(MessageInterpolator interpolator);
-
-    /**
-     * @param resolver
-     * @return this
-     */
-    T traversableResolver(TraversableResolver resolver);
+	/**
+	 * @return this
+	 */
+	T ignoreXmlConfiguration();
+
+	/**
+	 * @param interpolator
+	 * @return this
+	 */
+	T messageInterpolator(MessageInterpolator interpolator);
+
+	/**
+	 * @param resolver
+	 * @return this
+	 */
+	T traversableResolver(TraversableResolver resolver);
+
+	/**
+	 * @param constraintValidatorFactory
+	 * @return this
+	 */
+	T constraintValidatorFactory(ConstraintValidatorFactory constraintValidatorFactory);
+
+	/**
+	 * @param stream
+	 * @return this
+	 * @throws IllegalArgumentException
+	 */
+	T addMapping(InputStream stream);
+
+	/**
+	 * @param name
+	 * @param value
+	 * @return this
+	 * @throws IllegalArgumentException
+	 */
+	T addProperty(String name, String value);
+
+	/**
+	 * @return MessageInterpolator
+	 */
+	MessageInterpolator getDefaultMessageInterpolator();
+
+	/**
+	 * @return ValidatorFactory
+	 * @throws ValidationException
+	 */
+	ValidatorFactory buildValidatorFactory();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Constraint.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Constraint.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Constraint.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Constraint.java Thu Jul  9 13:25:02 2009
@@ -16,23 +16,23 @@
  */
 package javax.validation;
 
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
 import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import java.lang.annotation.Annotation;
+
 
 /**
  * @version $Rev$ $Date$
  */
 @Documented
-@Target( { ANNOTATION_TYPE })
+@Target({ ANNOTATION_TYPE })
 @Retention(RUNTIME)
 public @interface Constraint {
-
     /**
      * @return ConstraintValidator[]
      */
-    public Class<? extends ConstraintValidator<?, ?>>[] validatedBy();
+    public Class<? extends ConstraintValidator<?,?>>[] validatedBy();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDeclarationException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDeclarationException.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDeclarationException.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDeclarationException.java Thu Jul  9 13:25:02 2009
@@ -21,34 +21,19 @@
  * 
  * @version $Rev$ $Date$
  */
-@SuppressWarnings("serial")
 public class ConstraintDeclarationException extends ValidationException {
+    public ConstraintDeclarationException(String message) {
+        super(message);
+    }
 
-    /**
-     * Default no-arg constructor
-     */
     public ConstraintDeclarationException() {
         super();
     }
 
-    /**
-     * @param message
-     */
-    public ConstraintDeclarationException(String message) {
-        super(message);
-    }
-
-    /**
-     * @param message
-     * @param cause
-     */
     public ConstraintDeclarationException(String message, Throwable cause) {
         super(message, cause);
     }
 
-    /**
-     * @param cause
-     */
     public ConstraintDeclarationException(Throwable cause) {
         super(cause);
     }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDefinitionException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDefinitionException.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDefinitionException.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDefinitionException.java Thu Jul  9 13:25:02 2009
@@ -21,34 +21,19 @@
  * 
  * @version $Rev$ $Date$
  */
-@SuppressWarnings("serial")
 public class ConstraintDefinitionException extends ValidationException {
+    public ConstraintDefinitionException(String message) {
+        super(message);
+    }
 
-    /**
-     * Default no-arg constructor
-     */
     public ConstraintDefinitionException() {
         super();
     }
 
-    /**
-     * @param message
-     */
-    public ConstraintDefinitionException(String message) {
-        super(message);
-    }
-
-    /**
-     * @param message
-     * @param cause
-     */
     public ConstraintDefinitionException(String message, Throwable cause) {
         super(message, cause);
     }
 
-    /**
-     * @param cause
-     */
     public ConstraintDefinitionException(Throwable cause) {
         super(cause);
     }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDescriptor.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDescriptor.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintDescriptor.java Thu Jul  9 13:25:02 2009
@@ -25,31 +25,34 @@
  * @version $Rev$ $Date$
  */
 public interface ConstraintDescriptor<T extends Annotation> {
-
-    T getAnnotation();
-
-    /**
-     * @return Map
-     */
-    Map<String, Object> getAttributes();
-
-    /**
-     * @return Set
-     */
-    Set<ConstraintDescriptor<?>> getComposingConstraints();
-
-    /**
-     * @return List
-     */
-    List<Class<? extends ConstraintValidator<T, ?>>> getConstraintValidatorClasses();
-
-    /**
-     * @return Set
-     */
-    Set<Class<?>> getGroups();
-
-    /**
-     * @return boolean
-     */
-    boolean isReportAsSingleViolation();
+	/**
+	 * @return constraint annotation
+	 */
+	T getAnnotation();
+
+	/**
+	 * @return Set of groups
+	 */
+	Set<Class<?>> getGroups();
+
+	/**
+	 * @return List of classes
+	 */
+	List<Class<? extends ConstraintValidator<T, ?>>>
+	getConstraintValidatorClasses();
+
+	/**
+	 * @return Map of the annotation attribute/value pairs
+	 */
+	Map<String, Object> getAttributes();
+
+	/**
+	 * @return Set of ConstraintDescriptor
+	 */
+	Set<ConstraintDescriptor<?>> getComposingConstraints();
+
+	/**
+	 * @return boolean
+	 */
+	boolean isReportAsSingleViolation();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidator.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidator.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidator.java Thu Jul  9 13:25:02 2009
@@ -22,7 +22,6 @@
  * @version $Rev$ $Date$
  */
 public interface ConstraintValidator<A extends Annotation, T> {
-
     /**
      * @param constraintAnnotation
      */
@@ -33,6 +32,6 @@
      * @param constraintValidatorContext
      * @return boolean
      */
-    boolean isValid(T value,
-        ConstraintValidatorContext constraintValidatorContext);
+    boolean isValid(T value, ConstraintValidatorContext constraintValidatorContext);
 }
+ 

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorContext.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorContext.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorContext.java Thu Jul  9 13:25:02 2009
@@ -20,25 +20,25 @@
  * @version $Rev$ $Date$
  */
 public interface ConstraintValidatorContext {
-
 	/**
-	 * @param message
+	 * @see #addError(String)
+	 * @see #addError(String, String)
 	 */
-	void addError(String message);
+	void disableDefaultError();
 
 	/**
-     * @param message
-     * @param property
-     */
-    void addError(String message, String property);
+	 * @return String
+	 */
+	String getDefaultErrorMessage();
 
 	/**
-	 * 
+	 * @param message
 	 */
-	void disableDefaultError();
+	void addError(String message);
 
 	/**
-	 * @return String
+	 * @param message
+	 * @param property
 	 */
-	String getDefaultErrorMessage();
+	void addError(String message, String property);
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorFactory.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorFactory.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintValidatorFactory.java Thu Jul  9 13:25:02 2009
@@ -22,5 +22,5 @@
      * @param key
      * @return Class<T extends ConstraintValidator>
      */
-    <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key);
+    <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key);
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolation.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolation.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolation.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolation.java Thu Jul  9 13:25:02 2009
@@ -17,42 +17,46 @@
 package javax.validation;
 
 /**
- * @version $Rev$ $Date$
  */
 public interface ConstraintViolation<T> {
 
-	/**
+    /**
+     * @return The interpolated error message for this constraint violation.
+     */
+    String getMessage();
+
+    /**
+     * @return String
+     */
+    String getMessageTemplate();
+
+    /**
+     * @return root bean
+     */
+    T getRootBean();
+
+    /**
+     * @return Class
+     */
+    Class<T> getRootBeanClass();
+
+    /**
+     * @return Object
+     */
+    Object getLeafBean();
+
+    /**
+     * @return String
+     */
+    String getPropertyPath();
+
+    /**
+     * @return Object
+     */
+    Object getInvalidValue();
+
+    /**
      * @return ConstraintDescriptor
      */
     ConstraintDescriptor<?> getConstraintDescriptor();
-
-	/**
-	 * @return Object
-	 */
-	Object getInvalidValue();
-
-	/**
-	 * @return Object
-	 */
-	Object getLeafBean();
-
-	/**
-	 * @return String
-	 */
-	String getMessage();
-
-	/**
-	 * @return String
-	 */
-	String getMessageTemplate();
-
-	/**
-	 * @return String
-	 */
-	String getPropertyPath();
-
-	/**
-	 * @return Class<T>
-	 */
-	T getRootBean();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolationException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolationException.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolationException.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintViolationException.java Thu Jul  9 13:25:02 2009
@@ -23,34 +23,31 @@
  * 
  * @version $Rev$ $Date$
  */
-@SuppressWarnings("serial")
 public class ConstraintViolationException extends ValidationException {
-
-    private final Set<ConstraintViolation<?>> constraintViolations;
+    private final Set<ConstraintViolation> constraintViolations;
 
     /**
+     * @param message
      * @param constraintViolations
      */
-    public ConstraintViolationException(
-        Set<ConstraintViolation<?>> constraintViolations) {
-        super();
+    public ConstraintViolationException(String message,
+        Set<ConstraintViolation> constraintViolations) {
+        super(message);
         this.constraintViolations = constraintViolations;
     }
 
     /**
-     * @param message
      * @param constraintViolations
      */
-    public ConstraintViolationException(String message,
-        Set<ConstraintViolation<?>> constraintViolations) {
-        super(message);
+    public ConstraintViolationException(Set<ConstraintViolation> constraintViolations) {
+        super();
         this.constraintViolations = constraintViolations;
     }
 
     /**
-     * @return Set<ConstraintViolation>
+     * @return Set<CosntraintViolation>
      */
-    public Set<ConstraintViolation<?>> getConstraintViolations() {
+    public Set<ConstraintViolation> getConstraintViolations() {
         return constraintViolations;
     }
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ElementDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ElementDescriptor.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ElementDescriptor.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ElementDescriptor.java Thu Jul  9 13:25:02 2009
@@ -23,18 +23,18 @@
  */
 public interface ElementDescriptor {
 
-	/**
-	 * @return Set
-	 */
-	Set<ConstraintDescriptor<?>> getConstraintDescriptors();
-
-	/**
-	 * @return Class
-	 */
-	Class<?> getType();
-
-	/**
+    /**
      * @return boolean
      */
     boolean hasConstraints();
+
+    /**
+     * @return Class
+     */
+    Class<?> getType();
+
+    /**
+     * @return Set<ConstraintDescriptors>
+     */
+    Set<ConstraintDescriptor<?>> getConstraintDescriptors();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupDefinitionException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupDefinitionException.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupDefinitionException.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupDefinitionException.java Thu Jul  9 13:25:02 2009
@@ -21,34 +21,19 @@
  * 
  * @version $Rev$ $Date$
  */
-@SuppressWarnings("serial")
 public class GroupDefinitionException extends ValidationException {
+    public GroupDefinitionException(String message) {
+        super(message);
+    }
 
-    /**
-     * Default no-arg constructor
-     */
     public GroupDefinitionException() {
         super();
     }
 
-    /**
-     * @param message
-     */
-    public GroupDefinitionException(String message) {
-        super(message);
-    }
-
-    /**
-     * @param message
-     * @param cause
-     */
     public GroupDefinitionException(String message, Throwable cause) {
         super(message, cause);
     }
 
-    /**
-     * @param cause
-     */
     public GroupDefinitionException(Throwable cause) {
         super(cause);
     }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupSequence.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupSequence.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupSequence.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupSequence.java Thu Jul  9 13:25:02 2009
@@ -17,20 +17,15 @@
 package javax.validation;
 
 import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { TYPE })
+@Target({ TYPE })
 @Retention(RUNTIME)
 public @interface GroupSequence {
-
-    /**
-     * @return Class[]
-     */
     Class<?>[] value();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/MessageInterpolator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/MessageInterpolator.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/MessageInterpolator.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/MessageInterpolator.java Thu Jul  9 13:25:02 2009
@@ -19,35 +19,30 @@
 import java.util.Locale;
 
 public interface MessageInterpolator {
-
-	/**
-	 * Context
-	 */
-	static interface Context {
-
-		/**
-		 * @return ConstraintDescriptor
-		 */
-		ConstraintDescriptor<?> getConstraintDescriptor();
-
-		/**
-		 * @return Object
-		 */
-		Object getValidatedValue();
-	}
-
-	/**
+    /**
      * @param messageTemplate
      * @param context
      * @return String
      */
     String interpolate(String messageTemplate, Context context);
 
-	/**
-	 * @param messageTemplate
-	 * @param context
-	 * @param locale
-	 * @return String
-	 */
-	String interpolate(String messageTemplate, Context context,  Locale locale);
+    /**
+     * @param messageTemplate
+     * @param context
+     * @param locale
+     * @return String
+     */
+    String interpolate(String messageTemplate, Context context, Locale locale);
+
+    static interface Context {
+        /**
+         * @return ConstraintDescriptor
+         */
+        ConstraintDescriptor<?> getConstraintDescriptor();
+
+        /**
+         * @return Object
+         */
+        Object getValidatedValue();
+    }
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/OverridesAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/OverridesAttribute.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/OverridesAttribute.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/OverridesAttribute.java Thu Jul  9 13:25:02 2009
@@ -16,35 +16,28 @@
  */
 package javax.validation;
 
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
 import java.lang.annotation.Annotation;
-import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.METHOD;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
 
 /**
  * @version $Rev$ $Date$
  */
 @Retention(RUNTIME)
-@Target( { METHOD })
+@Target({ METHOD })
 public @interface OverridesAttribute {
-
     /**
-     * overrides
+     * @return Class
      */
-    @Documented
-    @Target( { METHOD })
-    @Retention(RUNTIME)
-    public @interface List {
-        OverridesAttribute[] value();
-    }
+    Class<? extends Annotation> constraint();
 
     /**
-     * @return Annotation
+     * @return String
      */
-    Class<? extends Annotation> constraint();
+    String name();
 
     /**
      * @return int
@@ -52,7 +45,12 @@
     int constraintIndex() default -1;
 
     /**
-     * @return String
+     * @see {@link OverridesAttribute}
      */
-    String name();
+    @Documented
+    @Target({ METHOD })
+    @Retention(RUNTIME)
+    public @interface List {
+        OverridesAttribute[] value();
+    }
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/PropertyDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/PropertyDescriptor.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/PropertyDescriptor.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/PropertyDescriptor.java Thu Jul  9 13:25:02 2009
@@ -20,14 +20,13 @@
  * @version $Rev$ $Date$
  */
 public interface PropertyDescriptor extends ElementDescriptor {
+    /**
+     * @return boolean
+     */
+    boolean isCascaded();
 
-	/**
-	 * @return boolean
-	 */
-	boolean isCascaded();
-
-	/**
-	 * @return String
-	 */
-	String getPropertyName();
+    /**
+     * @return String
+     */
+    String getPropertyName();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ReportAsSingleViolation.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ReportAsSingleViolation.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ReportAsSingleViolation.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ReportAsSingleViolation.java Thu Jul  9 13:25:02 2009
@@ -16,16 +16,15 @@
  */
 package javax.validation;
 
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { ANNOTATION_TYPE })
+@Target({ ANNOTATION_TYPE })
 @Retention(RUNTIME)
 public @interface ReportAsSingleViolation {
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/TraversableResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/TraversableResolver.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/TraversableResolver.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/TraversableResolver.java Thu Jul  9 13:25:02 2009
@@ -22,7 +22,6 @@
  * @version $Rev$ $Date$
  */
 public interface TraversableResolver {
-
     /**
      * @param traversableObject
      * @param traversableProperty
@@ -31,7 +30,9 @@
      * @param elementType
      * @return boolean
      */
-    boolean isTraversable(Object traversableObject, String traversableProperty,
-        Class<?> rootBeanType, String pathToTraversableObject,
+    boolean isTraversable(Object traversableObject,
+        String traversableProperty,
+        Class<?> rootBeanType,
+        String pathToTraversableObject,
         ElementType elementType);
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/UnexpectedTypeException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/UnexpectedTypeException.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/UnexpectedTypeException.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/UnexpectedTypeException.java Thu Jul  9 13:25:02 2009
@@ -21,34 +21,19 @@
  * 
  * @version $Rev$ $Date$
  */
-@SuppressWarnings("serial")
 public class UnexpectedTypeException extends ConstraintDeclarationException {
+    public UnexpectedTypeException(String message) {
+        super(message);
+    }
 
-    /**
-     * Default no-arg constructor
-     */
     public UnexpectedTypeException() {
         super();
     }
 
-    /**
-     * @param message
-     */
-    public UnexpectedTypeException(String message) {
-        super(message);
-    }
-
-    /**
-     * @param message
-     * @param cause
-     */
     public UnexpectedTypeException(String message, Throwable cause) {
         super(message, cause);
     }
 
-    /**
-     * @param cause
-     */
     public UnexpectedTypeException(Throwable cause) {
         super(cause);
     }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Valid.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Valid.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Valid.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Valid.java Thu Jul  9 13:25:02 2009
@@ -18,15 +18,14 @@
 
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD })
+@Target({ METHOD, FIELD })
 @Retention(RUNTIME)
 public @interface Valid {
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java Thu Jul  9 13:25:02 2009
@@ -57,125 +57,77 @@
      * @param configurationType
      * @return ProviderSpecificBootstrap<T>
      */
-    public static <T extends Configuration<T>> ProviderSpecificBootstrap<T>
-        byProvider(Class<T> configurationType) {
+    public static <T extends Configuration<T>>
+        ProviderSpecificBootstrap<T> byProvider(Class<T> configurationType) {
         return new ProviderSpecificBootstrapImpl<T>(configurationType);
     }
 
     /*
      * (non-Javadoc) See Section 4.4.5 Validation - Must be private
      */
-    private static class DefaultValidationProviderResolver implements
-        ValidationProviderResolver {
+    private static class ProviderSpecificBootstrapImpl<T extends Configuration<T>>
+        implements ProviderSpecificBootstrap<T> {
 
-        private static final String SPI_CFG =
-            "META-INF/services/javax.validation.spi.ValidationProvider";
+        private Class<T> cfgType = null;
+        private ValidationProviderResolver vpResolver = null;
 
         /*
          * (non-Javadoc)
          * 
-         * @see
-         * javax.validation.ValidationProviderResolver#getValidationProviders()
+         * @seejavax.validation.bootstrap.ProviderSpecificBootstrap#
+         * ProviderSpecificBootstrap(Class<T>)
          */
-        public List<ValidationProvider> getValidationProviders() {
-            List<ValidationProvider> providers =
-                new ArrayList<ValidationProvider>();
-            try {
-                // get our classloader
-                ClassLoader cl = Thread.currentThread().getContextClassLoader();
-                if (cl == null)
-                    cl = DefaultValidationProviderResolver.class.
-                        getClassLoader();
-                // find all service provider cfgs
-                Enumeration<URL> cfgs = cl.getResources(SPI_CFG);
-                while (cfgs.hasMoreElements()) {
-                    URL url = cfgs.nextElement();
-                    BufferedReader br = null;
-                    try {
-                        br = new BufferedReader(new InputStreamReader(
-                            url.openStream()), 256);
-                        String line = br.readLine();
-                        // cfgs may contain multiple providers and/or comments
-                        while (line != null) {
-                            line = line.trim();
-                            if (!line.startsWith("#")) {
-                                try {
-                                    // try loading the specified class
-                                    final Class<?> provider =
-                                        cl.loadClass(line);
-                                    // create an instance to return
-                                    providers.add((ValidationProvider) provider
-                                        .newInstance());
-                                } catch (ClassNotFoundException e) {
-                                    throw new ValidationException(
-                                        "Failed to load provider " + line +
-                                            " configured in file " + url, e);
-                                } catch (InstantiationException e) {
-                                    throw new ValidationException(
-                                        "Failed to instantiate provider " +
-                                            line + " configured in file " + url,
-                                        e);
-                                } catch (IllegalAccessException e) {
-                                    throw new ValidationException(
-                                        "Failed to load provider " + line +
-                                            " configured in file " + url, e);
-                                }
-                            }
-                            line = br.readLine();
-                        }
-                        br.close();
-                    } catch (IOException e) {
-                        throw new ValidationException("Error trying to read " +
-                            url, e);
-                    } finally {
-                        if (br != null)
-                            br.close();
-                    }
-                }
-            } catch (IOException e) {
-                throw new ValidationException("Error trying to read a " +
-                    SPI_CFG, e);
-            }
-            // caller must handle the case of no providers found
-            return providers;
+        public ProviderSpecificBootstrapImpl(Class<T> configurationType) {
+            cfgType = configurationType;
         }
-    }
-
-    /*
-     * (non-Javadoc) See Section 4.4.5 Validation - Must be private
-     */
-    private static class GenericBootstrapImpl implements GenericBootstrap,
-        BootstrapState {
-
-        private ValidationProviderResolver vpResolver;
 
         /*
          * (non-Javadoc)
          * 
-         * @see javax.validation.bootstrap.GenericBootstrap#configure()
+         * @see javax.validation.bootstrap.ProviderSpecificBootstrap#providerResolver(javax.validation.ValidationProviderResolver)
          */
-        public Configuration<?> configure() {
-            ValidationProviderResolver resolv = vpResolver;
-            try {
-                if (resolv == null)
-                    resolv = new DefaultValidationProviderResolver();
-                return resolv.getValidationProviders().get(0)
-                    .createGenericConfiguration(this);
-            } catch (Exception e) {
-                throw new ValidationException("Could not create configuration",
-                    e);
-            }
+        public ProviderSpecificBootstrap<T> providerResolver(ValidationProviderResolver resolver) {
+            vpResolver = resolver;
+            return this;
         }
 
         /*
          * (non-Javadoc)
          * 
-         * @see
-         * javax.validation.spi.BootstrapState#getValidationProviderResolver()
+         * @see javax.validation.bootstrap.ProviderSpecificBootstrap#configure()
          */
-        public ValidationProviderResolver getValidationProviderResolver() {
-            return vpResolver;
+        public T configure() {
+            if (cfgType == null)
+                throw new ValidationException("No configuration builder provided");
+
+            // create a default resolver if not supplied by providerResolver()
+            GenericBootstrapImpl state = new GenericBootstrapImpl();
+            if ( vpResolver == null )
+                vpResolver = state.getDefaultValidationProviderResolver();
+            else
+                state.providerResolver(vpResolver);
+
+            // check each provider discovered by the resolver
+            for (ValidationProvider vProvider : vpResolver.getValidationProviders()) {
+                if (vProvider.isSuitable(cfgType)) {
+                    // Create a Configuration<T> from the above bootstrap state
+                    // and configurationType
+                    return vProvider.createSpecializedConfiguration(state, cfgType);
+                }
+            }
+
+            // throw a Spec required exception
+            throw new ValidationException("No provider found for configuration type " + cfgType);
         }
+    }
+
+    /*
+     * (non-Javadoc) See Section 4.4.5 Validation - Must be private
+     */
+    private static class GenericBootstrapImpl implements GenericBootstrap, BootstrapState {
+
+        private ValidationProviderResolver vpDefaultResolver;
+        private ValidationProviderResolver vpResolver;
 
         /*
          * (non-Javadoc)
@@ -184,77 +136,109 @@
          * javax.validation.bootstrap.GenericBootstrap#providerResolver(javax
          * .validation.ValidationProviderResolver)
          */
-        public GenericBootstrap providerResolver(
-            ValidationProviderResolver resolver) {
+        public GenericBootstrap providerResolver(ValidationProviderResolver resolver) {
             vpResolver = resolver;
             return this;
         }
-    }
-
-    /*
-     * (non-Javadoc) See Section 4.4.5 Validation - Must be private
-     */
-    private static class ProviderSpecificBootstrapImpl<T extends Configuration<T>>
-        implements ProviderSpecificBootstrap<T> {
-
-        private Class<T> cfgType = null;
-        private ValidationProviderResolver vpResolver = null;
 
         /*
          * (non-Javadoc)
          * 
-         * @seejavax.validation.bootstrap.ProviderSpecificBootstrap#
-         * ProviderSpecificBootstrap(Class<T>)
+         * @see javax.validation.spi.BootstrapState#getValidationProviderResolver()
          */
-        public ProviderSpecificBootstrapImpl(Class<T> configurationType) {
-            cfgType = configurationType;
+        public ValidationProviderResolver getValidationProviderResolver() {
+            return vpResolver;
         }
 
         /*
          * (non-Javadoc)
          * 
-         * @see javax.validation.bootstrap.ProviderSpecificBootstrap#configure()
+         * @see javax.validation.spi.BootstrapState#getDefaultValidationProviderResolver()
          */
-        public T configure() {
-            T cfg = null;
-
-            // create a default resolver if not supplied by providerResolver()
-            if (vpResolver == null)
-                vpResolver = new DefaultValidationProviderResolver();
+        public ValidationProviderResolver getDefaultValidationProviderResolver() {
+            if (vpDefaultResolver == null)
+                vpDefaultResolver = new DefaultValidationProviderResolver();
+            return vpDefaultResolver;
+        }
 
-            // check each provider discovered by the resolver
-            for (ValidationProvider vProvider : vpResolver
-                .getValidationProviders()) {
-                if (vProvider.isSuitable(cfgType)) {
-                    GenericBootstrapImpl bootstrap = new GenericBootstrapImpl();
-                    // set the resolver
-                    bootstrap.providerResolver(vpResolver);
-                    // Create a Configuration<T> from the above bootstrap state
-                    // and configurationType
-                    cfg = vProvider.createSpecializedConfiguration(bootstrap,
-                        cfgType);
-                }
+        /*
+         * (non-Javadoc)
+         * 
+         * @see javax.validation.bootstrap.GenericBootstrap#configure()
+         */
+        public Configuration<?> configure() {
+            ValidationProviderResolver resolv = vpResolver;
+            try {
+                if (resolv == null)
+                    resolv = getDefaultValidationProviderResolver();
+                return resolv.getValidationProviders().get(0).createGenericConfiguration(this);
+            } catch (Exception e) {
+                throw new ValidationException("Could not create configuration", e);
             }
-
-            // return the Configuration<T> or throw a Spec required exception
-            if (cfg != null)
-                return cfg;
-            else
-                throw new ValidationException("No provider found for " +
-                    "configuration type " + cfgType);
         }
+    }
+
+    /*
+     * (non-Javadoc) See Section 4.4.5 Validation - Must be private
+     */
+    private static class DefaultValidationProviderResolver implements ValidationProviderResolver {
+
+        private static final String SPI_CFG =
+            "META-INF/services/javax.validation.spi.ValidationProvider";
 
         /*
          * (non-Javadoc)
          * 
          * @see
-         * javax.validation.bootstrap.ProviderSpecificBootstrap#providerResolver
-         * (javax.validation.ValidationProviderResolver)
+         * javax.validation.ValidationProviderResolver#getValidationProviders()
          */
-        public ProviderSpecificBootstrap<T> providerResolver(
-            ValidationProviderResolver resolver) {
-            vpResolver = resolver;
-            return this;
+        public List<ValidationProvider> getValidationProviders() {
+            List<ValidationProvider> providers = new ArrayList<ValidationProvider>();
+            try {
+                // get our classloader
+                ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                if (cl == null)
+                    cl = DefaultValidationProviderResolver.class.getClassLoader();
+                // find all service provider cfgs
+                Enumeration<URL> cfgs = cl.getResources(SPI_CFG);
+                while (cfgs.hasMoreElements()) {
+                    URL url = cfgs.nextElement();
+                    BufferedReader br = null;
+                    try {
+                        br = new BufferedReader(new InputStreamReader(url.openStream()), 256);
+                        String line = br.readLine();
+                        // cfgs may contain multiple providers and/or comments
+                        while (line != null) {
+                            line = line.trim();
+                            if (!line.startsWith("#")) {
+                                try {
+                                    // try loading the specified class
+                                    final Class<?> provider = cl.loadClass(line);
+                                    // create an instance to return
+                                    providers.add((ValidationProvider) provider.newInstance());
+                                } catch (ClassNotFoundException e) {
+                                    throw new ValidationException("Failed to load provider " + line + " configured in file " + url, e);
+                                } catch (InstantiationException e) {
+                                    throw new ValidationException("Failed to instantiate provider " + line + " configured in file " + url, e);
+                                } catch (IllegalAccessException e) {
+                                    throw new ValidationException("Failed to access provider " + line + " configured in file " + url, e);
+                                }
+                            }
+                            line = br.readLine();
+                        }
+                        br.close();
+                    } catch (IOException e) {
+                        throw new ValidationException("Error trying to read " + url, e);
+                    } finally {
+                        if (br != null)
+                            br.close();
+                    }
+                }
+            } catch (IOException e) {
+                throw new ValidationException("Error trying to read a " + SPI_CFG, e);
+            }
+            // caller must handle the case of no providers found
+            return providers;
         }
     }
-}
+ }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java Thu Jul  9 13:25:02 2009
@@ -21,34 +21,19 @@
  * 
  * @version $Rev$ $Date$
  */
-@SuppressWarnings("serial")
 public class ValidationException extends RuntimeException {
+    public ValidationException(String message) {
+        super(message);
+    }
 
-    /**
-     * Default no-arg constructor
-     */
     public ValidationException() {
         super();
     }
 
-    /**
-     * @param message
-     */
-    public ValidationException(String message) {
-        super(message);
-    }
-
-    /**
-     * @param message
-     * @param cause
-     */
     public ValidationException(String message, Throwable cause) {
         super(message, cause);
     }
 
-    /**
-     * @param cause
-     */
     public ValidationException(Throwable cause) {
         super(cause);
     }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationProviderResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationProviderResolver.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationProviderResolver.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationProviderResolver.java Thu Jul  9 13:25:02 2009
@@ -17,14 +17,12 @@
 package javax.validation;
 
 import java.util.List;
-
 import javax.validation.spi.ValidationProvider;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface ValidationProviderResolver {
-
     /**
      * @return List<ValidationProvider>
      */

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validator.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validator.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validator.java Thu Jul  9 13:25:02 2009
@@ -22,43 +22,46 @@
  * @version $Rev$ $Date$
  */
 public interface Validator {
-
-    /**
-     * @param clazz
-     * @return BeanDescriptor
-     * @throws ValidationException
-     */
-    BeanDescriptor getConstraintsForClass(Class<?> clazz);
-
     /**
-     * @param object
-     * @param groups
-     * @return Set<ConstraintViolation>
-     * @throws IllegalArgumentException
-     * @throws ValidationException
+	 * @param object
+	 * @param groups
+	 * @return Set<ConstraintViolation>
+	 * @throws IllegalArgumentException
+	 * @throws ValidationException
      */
     <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups);
 
     /**
-     * @param object
-     * @param propertyName
-     * @param groups
-     * @return Set<ConstraintViolation>
-     * @throws IllegalArgumentException
-     * @throws ValidationException
+
+	 * @param object
+	 * @param propertyName
+	 * @param groups
+	 * @return Set<ConstraintViolation>
+	 * @throws IllegalArgumentException
+	 * @throws ValidationException
      */
     <T> Set<ConstraintViolation<T>> validateProperty(T object,
-        String propertyName, Class<?>... groups);
+        String propertyName,
+        Class<?>... groups);
 
     /**
-     * @param beanType
-     * @param propertyName
-     * @param value
-     * @param groups
-     * @return Set<ConstraintViolation>
-     * @throws IllegalArgumentException
-     * @throws ValidationException
+	 * @param beanType
+	 * @param propertyName
+	 * @param value
+	 * @param groups
+	 * @return Set<ConstraintViolation>
+	 * @throws IllegalArgumentException
+	 * @throws ValidationException
      */
     <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType,
-        String propertyName, Object value, Class<?>... groups);
+        String propertyName,
+        Object value,
+        Class<?>... groups);
+
+	/**
+	 * @param clazz
+	 * @return BeanDescriptor
+	 * @throws ValidationException
+	 */
+	BeanDescriptor getConstraintsForClass(Class<?> clazz);
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorContext.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorContext.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorContext.java Thu Jul  9 13:25:02 2009
@@ -20,12 +20,6 @@
  * @version $Rev$ $Date$
  */
 public interface ValidatorContext {
-
-    /**
-     * @return Validator
-     */
-    Validator getValidator();
-
     /**
      * @param messageInterpolator
      * @return ValidatorContext
@@ -37,4 +31,9 @@
      * @return ValidatorContext
      */
     ValidatorContext traversableResolver(TraversableResolver traversableResolver);
+
+    /**
+     * @return Validator
+     */
+    Validator getValidator();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorFactory.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorFactory.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorFactory.java Thu Jul  9 13:25:02 2009
@@ -20,12 +20,6 @@
  * @version $Rev$ $Date$
  */
 public interface ValidatorFactory {
-
-    /**
-     * @return MessageInterpolator
-     */
-    MessageInterpolator getMessageInterpolator();
-
     /**
      * @return Validator
      */
@@ -35,4 +29,9 @@
      * @return ValidatorContext
      */
     ValidatorContext usingContext();
+
+    /**
+     * @return MessageInterpolator
+     */
+    MessageInterpolator getMessageInterpolator();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/GenericBootstrap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/GenericBootstrap.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/GenericBootstrap.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/GenericBootstrap.java Thu Jul  9 13:25:02 2009
@@ -16,24 +16,22 @@
  */
 package javax.validation.bootstrap;
 
-import javax.validation.Configuration;
-import javax.validation.ValidationException;
 import javax.validation.ValidationProviderResolver;
+import javax.validation.Configuration;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface GenericBootstrap {
-
-    /**
-     * @return Configuration
-     * @throws ValidationException
-     */
-    Configuration<?> configure() throws ValidationException;
-
     /**
      * @param resolver
      * @return GenericBootstrap
      */
     GenericBootstrap providerResolver(ValidationProviderResolver resolver);
+
+    /**
+     * @return Configuration
+     * @throws javax.validation.ValidationException
+     */
+    Configuration<?> configure();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/bootstrap/ProviderSpecificBootstrap.java Thu Jul  9 13:25:02 2009
@@ -16,22 +16,20 @@
  */
 package javax.validation.bootstrap;
 
-import javax.validation.Configuration;
-import javax.validation.ValidationException;
 import javax.validation.ValidationProviderResolver;
+import javax.validation.Configuration;
 
 public interface ProviderSpecificBootstrap<T extends Configuration<T>> {
 
     /**
-     * @return T
-     * @throws ValidationException
+     * @param resolver
+     * @return ProviderSpecificBootstrap<T>
      */
-    public T configure() throws ValidationException;
+    public ProviderSpecificBootstrap<T> providerResolver(ValidationProviderResolver resolver);
 
     /**
-     * @param resolver
-     * @return ProviderSpecificBootstrap<T>
+     * @return T
+     * @throws javax.validation.ValidationException
      */
-    public ProviderSpecificBootstrap<T> providerResolver(
-        ValidationProviderResolver resolver);
+    public T configure();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertFalse.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertFalse.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertFalse.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertFalse.java Thu Jul  9 13:25:02 2009
@@ -16,42 +16,31 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface AssertFalse {
+    String message() default "{constraint.assertFalse}";
 
-    /**
-     * AssertFalse[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    Class<?>[] groups() default {};
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         AssertFalse[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.assertFalse}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertTrue.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertTrue.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertTrue.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/AssertTrue.java Thu Jul  9 13:25:02 2009
@@ -16,42 +16,31 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface AssertTrue {
+    String message() default "{constraint.assertTrue}";
 
-    /**
-     * AssertTrue[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    Class<?>[] groups() default {};
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         AssertTrue[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraints.assertTrue}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMax.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMax.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMax.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMax.java Thu Jul  9 13:25:02 2009
@@ -16,47 +16,33 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface DecimalMax {
+    String message() default "{constraint.decimalmax}";
+
+    Class<?>[] groups() default {};
 
-    /**
-     * DecimalMax[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    String value();
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         DecimalMax[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.decimalmax}";
-
-    /**
-     * @return String
-     */
-    String value();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMin.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMin.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/DecimalMin.java Thu Jul  9 13:25:02 2009
@@ -16,47 +16,33 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface DecimalMin {
+    String message() default "{constraint.decimalmin}";
+
+    Class<?>[] groups() default {};
 
-    /**
-     * DecimalMin[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    String value();
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         DecimalMin[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.decimalmin}";
-
-    /**
-     * @return String
-     */
-    String value();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Digits.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Digits.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Digits.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Digits.java Thu Jul  9 13:25:02 2009
@@ -16,52 +16,35 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Digits {
+    String message() default "{constraint.digits}";
+
+    Class<?>[] groups() default {};
+
+    int integer();
 
-    /**
-     * Digits[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    int fraction();
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Digits[] value();
     }
-
-    /**
-     * @return int
-     */
-    int fraction();
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * @return int
-     */
-    int integer();
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.digits}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Future.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Future.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Future.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Future.java Thu Jul  9 13:25:02 2009
@@ -16,42 +16,31 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Future {
+    String message() default "{constraint.future}";
 
-    /**
-     * Future[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    Class<?>[] groups() default {};
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Future[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.future}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Max.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Max.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Max.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Max.java Thu Jul  9 13:25:02 2009
@@ -16,47 +16,33 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Max {
+    String message() default "{constraint.max}";
+
+    Class<?>[] groups() default {};
 
-    /**
-     * Max[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    long value();
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Max[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.max}";
-
-    /**
-     * @return long
-     */
-    long value();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Min.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Min.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Min.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Min.java Thu Jul  9 13:25:02 2009
@@ -16,47 +16,33 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Min {
+    String message() default "{constraint.min}";
+
+    Class<?>[] groups() default {};
 
-    /**
-     * Min[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    long value();
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Min[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.min}";
-
-    /**
-     * @return long
-     */
-    long value();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/NotNull.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/NotNull.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/NotNull.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/NotNull.java Thu Jul  9 13:25:02 2009
@@ -16,42 +16,31 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface NotNull {
+    String message() default "{constraint.notNull}";
 
-    /**
-     * NotNull[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    Class<?>[] groups() default {};
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         NotNull[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.notNull}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Null.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Null.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Null.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Null.java Thu Jul  9 13:25:02 2009
@@ -16,42 +16,31 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Null {
+    String message() default "{constraint.null}";
 
-    /**
-     * Null[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    Class<?>[] groups() default {};
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Null[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.null}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Past.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Past.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Past.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Past.java Thu Jul  9 13:25:02 2009
@@ -16,42 +16,31 @@
  */
 package javax.validation.constraints;
 
+import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Past {
+    String message() default "{constraint.past}";
 
-    /**
-     * Past[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    Class<?>[] groups() default {};
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Past[] value();
     }
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.past}";
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Pattern.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Pattern.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Pattern.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Pattern.java Thu Jul  9 13:25:02 2009
@@ -16,22 +16,30 @@
  */
 package javax.validation.constraints;
 
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Pattern {
+    String regexp();
+
+    Flag[] flags() default {};
+
+    String message() default "{constraint.pattern}";
+
+    Class<?>[] groups() default {};
 
     public static enum Flag {
         /**
@@ -70,35 +78,10 @@
         CANON_EQ
     }
 
-    /**
-     * Pattern[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
     @Retention(RUNTIME)
     @Documented
     @interface List {
         Pattern[] value();
     }
-
-    /**
-     * @return Flag[]
-     */
-    Flag[] flags() default {};
-
-    /**
-     * @return Class[]
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.pattern}";
-
-    /**
-     * @return String
-     */
-    String regexp();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Size.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Size.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Size.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/constraints/Size.java Thu Jul  9 13:25:02 2009
@@ -16,52 +16,41 @@
  */
 package javax.validation.constraints;
 
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import javax.validation.Constraint;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { FIELD, METHOD, ANNOTATION_TYPE })
+@Target( { METHOD, FIELD, ANNOTATION_TYPE })
 @Retention(RUNTIME)
 @Documented
+@Constraint(validatedBy = {})
 public @interface Size {
+    String message() default "{constraint.size}";
 
-    /**
-     * Size[]
-     */
-    @Target( { FIELD, METHOD, ANNOTATION_TYPE })
-    @Retention(RUNTIME)
-    @Documented
-    @interface List {
-        Size[] value();
-    }
-
-    /**
-     * @return Class[]
-     */
     Class<?>[] groups() default {};
 
     /**
      * @return int
      */
-    int max() default Integer.MAX_VALUE;
-
-    /**
-     * Default message interpolation
-     * 
-     * @return String
-     */
-    String message() default "{constraint.size}";
+    int min() default 0;
 
     /**
      * @return int
      */
-    int min() default 0;
+    int max() default Integer.MAX_VALUE;
+
+    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Retention(RUNTIME)
+    @Documented
+    @interface List {
+        Size[] value();
+    }
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/BootstrapState.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/BootstrapState.java?rev=792549&r1=792548&r2=792549&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/BootstrapState.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/BootstrapState.java Thu Jul  9 13:25:02 2009
@@ -22,9 +22,13 @@
  * @version $Rev$ $Date$
  */
 public interface BootstrapState {
-
     /**
      * @return ValidationProviderResolver
      */
     ValidationProviderResolver getValidationProviderResolver();
+
+    /**
+     * @return ValidationProviderResolver
+     */
+    ValidationProviderResolver getDefaultValidationProviderResolver();
 }



Mime
View raw message