geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r794769 - in /geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation: ./ bootstrap/ constraints/ metadata/ spi/
Date Thu, 16 Jul 2009 17:58:09 GMT
Author: dwoods
Date: Thu Jul 16 17:58:07 2009
New Revision: 794769

URL: http://svn.apache.org/viewvc?rev=794769&view=rev
Log:
GERONIMO-4619 Upgrade to the 1.0 CR3 level of the spec API

Added:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintPayload.java   (with props)
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Path.java   (with props)
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/BeanDescriptor.java   (with props)
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ConstraintDescriptor.java   (with props)
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java   (with props)
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/PropertyDescriptor.java   (with props)
Removed:
    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/ConstraintDescriptor.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/PropertyDescriptor.java
Modified:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java   (contents, props changed)
    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/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/GroupDefinitionException.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/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/Valid.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java   (contents, props changed)
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java   (contents, props changed)
    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   (contents, props changed)
    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   (contents, props changed)
    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/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java?rev=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,55 +18,24 @@
 
 import java.io.InputStream;
 
-
+/**
+ * @version $Rev$ $Date$
+ */
 public interface Configuration<T extends Configuration<T>> {
 
-	/**
-	 * @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();
 }

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Configuration.java
            ('svn:executable' removed)

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -21,8 +21,6 @@
 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$
@@ -31,8 +29,5 @@
 @Target({ ANNOTATION_TYPE })
 @Retention(RUNTIME)
 public @interface Constraint {
-    /**
-     * @return ConstraintValidator[]
-     */
     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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,8 +17,6 @@
 package javax.validation;
 
 /**
- * @see javax.validation.ValidationException
- * 
  * @version $Rev$ $Date$
  */
 public class ConstraintDeclarationException extends ValidationException {
@@ -38,3 +36,4 @@
         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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,8 +17,6 @@
 package javax.validation;
 
 /**
- * @see javax.validation.ValidationException
- * 
  * @version $Rev$ $Date$
  */
 public class ConstraintDefinitionException extends ValidationException {

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintPayload.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintPayload.java?rev=794769&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintPayload.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintPayload.java Thu Jul 16 17:58:07 2009
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package javax.validation;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface ConstraintPayload {
+}

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ConstraintPayload.java
------------------------------------------------------------------------------
    svn:eol-style = native

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -22,16 +22,7 @@
  * @version $Rev$ $Date$
  */
 public interface ConstraintValidator<A extends Annotation, T> {
-    /**
-     * @param constraintAnnotation
-     */
     void initialize(A constraintAnnotation);
 
-    /**
-     * @param value
-     * @param constraintValidatorContext
-     * @return boolean
-     */
     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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -20,25 +20,42 @@
  * @version $Rev$ $Date$
  */
 public interface ConstraintValidatorContext {
-	/**
-	 * @see #addError(String)
-	 * @see #addError(String, String)
-	 */
-	void disableDefaultError();
-
-	/**
-	 * @return String
-	 */
-	String getDefaultErrorMessage();
-
-	/**
-	 * @param message
-	 */
-	void addError(String message);
-
-	/**
-	 * @param message
-	 * @param property
-	 */
-	void addError(String message, String property);
+    void disableDefaultError();
+
+    String getDefaultErrorMessageTemplate();
+
+    ErrorBuilder buildErrorWithMessageTemplate(String messageTemplate);
+
+    interface ErrorBuilder {
+        NodeBuilderDefinedContext addSubNode(String name);
+
+        ConstraintValidatorContext addError();
+
+        interface NodeBuilderDefinedContext {
+
+            NodeBuilderCustomizableContext addSubNode(String name);
+
+            ConstraintValidatorContext addError();
+        }
+
+        interface NodeBuilderCustomizableContext {
+
+            NodeContextBuilder inIterable();
+
+            NodeBuilderCustomizableContext addSubNode(String name);
+
+            ConstraintValidatorContext addError();
+        }
+
+        interface NodeContextBuilder {
+
+            NodeBuilderDefinedContext atKey(Object key);
+
+            NodeBuilderDefinedContext atIndex(Integer index);
+
+            NodeBuilderCustomizableContext addSubNode(String name);
+
+            ConstraintValidatorContext addError();
+        }
+    }
 }

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,11 +16,10 @@
  */
 package javax.validation;
 
+/**
+ * @version $Rev$ $Date$
+ */
 public interface ConstraintValidatorFactory {
 
-    /**
-     * @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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,47 +16,26 @@
  */
 package javax.validation;
 
+import javax.validation.metadata.ConstraintDescriptor;
+
 /**
+ * @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
-     */
+    Path getPropertyPath();
+
     Object getInvalidValue();
 
-    /**
-     * @return ConstraintDescriptor
-     */
     ConstraintDescriptor<?> getConstraintDescriptor();
 }

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -19,35 +19,23 @@
 import java.util.Set;
 
 /**
- * @see javax.validation.ValidationException
- * 
  * @version $Rev$ $Date$
  */
 public class ConstraintViolationException extends ValidationException {
-    private final Set<ConstraintViolation> constraintViolations;
+    private final Set<ConstraintViolation<?>> constraintViolations;
 
-    /**
-     * @param message
-     * @param constraintViolations
-     */
-    public ConstraintViolationException(String message,
-        Set<ConstraintViolation> constraintViolations) {
+    public <T> ConstraintViolationException(String message,
+            Set<ConstraintViolation<?>> constraintViolations) {
         super(message);
         this.constraintViolations = constraintViolations;
     }
 
-    /**
-     * @param constraintViolations
-     */
-    public ConstraintViolationException(Set<ConstraintViolation> constraintViolations) {
+    public <T> ConstraintViolationException(Set<ConstraintViolation<?>> constraintViolations) {
         super();
         this.constraintViolations = constraintViolations;
     }
 
-    /**
-     * @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/GroupDefinitionException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/GroupDefinitionException.java?rev=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,8 +17,6 @@
 package javax.validation;
 
 /**
- * @see javax.validation.ValidationException
- * 
  * @version $Rev$ $Date$
  */
 public class GroupDefinitionException extends ValidationException {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,32 +17,19 @@
 package javax.validation;
 
 import java.util.Locale;
+import javax.validation.metadata.ConstraintDescriptor;
 
+/**
+ * @version $Rev$ $Date$
+ */
 public interface MessageInterpolator {
-    /**
-     * @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);
 
-    static interface Context {
-        /**
-         * @return ConstraintDescriptor
-         */
+    interface Context {
         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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,11 +17,11 @@
 package javax.validation;
 
 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$
@@ -29,24 +29,12 @@
 @Retention(RUNTIME)
 @Target({ METHOD })
 public @interface OverridesAttribute {
-    /**
-     * @return Class
-     */
     Class<? extends Annotation> constraint();
 
-    /**
-     * @return String
-     */
     String name();
 
-    /**
-     * @return int
-     */
     int constraintIndex() default -1;
 
-    /**
-     * @see {@link OverridesAttribute}
-     */
     @Documented
     @Target({ METHOD })
     @Retention(RUNTIME)

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Path.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Path.java?rev=794769&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Path.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Path.java Thu Jul 16 17:58:07 2009
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package javax.validation;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface Path extends Iterable<Path.Node> {
+
+    interface Node {
+        String getName();
+
+        boolean isInIterable();
+
+        Integer getIndex();
+
+        Object getKey();
+    }
+}

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Path.java
------------------------------------------------------------------------------
    svn:eol-style = native

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,10 +16,10 @@
  */
 package javax.validation;
 
-import java.lang.annotation.Target;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import java.lang.annotation.Target;
 
 /**
  * @version $Rev$ $Date$

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,22 +17,21 @@
 package javax.validation;
 
 import java.lang.annotation.ElementType;
+import javax.validation.Path;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface TraversableResolver {
-    /**
-     * @param traversableObject
-     * @param traversableProperty
-     * @param rootBeanType
-     * @param pathToTraversableObject
-     * @param elementType
-     * @return boolean
-     */
-    boolean isTraversable(Object traversableObject,
-        String traversableProperty,
+    boolean isReachable(Object traversableObject,
+        Path.Node traversableProperty,
         Class<?> rootBeanType,
-        String pathToTraversableObject,
+        Path pathToTraversableObject,
+        ElementType elementType);
+
+    boolean isCascadable(Object traversableObject,
+        Path.Node traversableProperty,
+        Class<?> rootBeanType,
+        Path pathToTraversableObject,
         ElementType elementType);
 }

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,8 +16,10 @@
  */
 package javax.validation;
 
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
@@ -25,7 +27,7 @@
 /**
  * @version $Rev$ $Date$
  */
-@Target({ METHOD, FIELD })
+@Target({ METHOD, FIELD, CONSTRUCTOR, PARAMETER })
 @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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -38,38 +38,27 @@
  */
 public class Validation {
 
-    /**
-     * @return ValidatorFactory
-     * @throws ValidationException
-     */
     public static ValidatorFactory buildDefaultValidatorFactory() {
         return byDefaultProvider().configure().buildValidatorFactory();
     }
 
-    /**
-     * @return GenericBootstrap
-     */
     public static GenericBootstrap byDefaultProvider() {
         return new GenericBootstrapImpl();
     }
 
-    /**
-     * @param configurationType
-     * @return ProviderSpecificBootstrap<T>
-     */
-    public static <T extends Configuration<T>>
-        ProviderSpecificBootstrap<T> byProvider(Class<T> configurationType) {
-        return new ProviderSpecificBootstrapImpl<T>(configurationType);
+    public static <T extends Configuration<T>, U extends ValidationProvider<T>>
+            ProviderSpecificBootstrap<T> byProvider(Class<U> providerType) {
+        return new ProviderSpecificBootstrapImpl<T, U>(providerType);
     }
 
     /*
      * (non-Javadoc) See Section 4.4.5 Validation - Must be private
      */
-    private static class ProviderSpecificBootstrapImpl<T extends Configuration<T>>
+	private static class ProviderSpecificBootstrapImpl<T extends Configuration<T>, U extends ValidationProvider<T>>
         implements ProviderSpecificBootstrap<T> {
 
-        private Class<T> cfgType = null;
-        private ValidationProviderResolver vpResolver = null;
+		private final Class<U> providerClass;
+		private ValidationProviderResolver vpResolver;
 
         /*
          * (non-Javadoc)
@@ -77,8 +66,9 @@
          * @seejavax.validation.bootstrap.ProviderSpecificBootstrap#
          * ProviderSpecificBootstrap(Class<T>)
          */
-        public ProviderSpecificBootstrapImpl(Class<T> configurationType) {
-            cfgType = configurationType;
+		
+		public ProviderSpecificBootstrapImpl(Class<U> validationProviderClass) {
+			providerClass = validationProviderClass;
         }
 
         /*
@@ -97,8 +87,8 @@
          * @see javax.validation.bootstrap.ProviderSpecificBootstrap#configure()
          */
         public T configure() {
-            if (cfgType == null)
-                throw new ValidationException("No configuration builder provided");
+            if (providerClass == null)
+                throw new ValidationException("No resolver provided");
 
             // create a default resolver if not supplied by providerResolver()
             GenericBootstrapImpl state = new GenericBootstrapImpl();
@@ -108,16 +98,16 @@
                 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
+            for (ValidationProvider<?> vProvider : vpResolver.getValidationProviders()) {
+                if (providerClass.isAssignableFrom(vProvider.getClass())) {
+                    // Create a ValidationProvider<T> from the above bootstrap state
                     // and configurationType
-                    return vProvider.createSpecializedConfiguration(state, cfgType);
+                    return providerClass.cast(vProvider).createSpecializedConfiguration(state);
                 }
             }
 
             // throw a Spec required exception
-            throw new ValidationException("No provider found for configuration type " + cfgType);
+            throw new ValidationException("No resover found for provider " + providerClass);
         }
     }
 
@@ -173,18 +163,21 @@
                     resolv = getDefaultValidationProviderResolver();
                 return resolv.getValidationProviders().get(0).createGenericConfiguration(this);
             } catch (Exception e) {
-                throw new ValidationException("Could not create configuration", e);
+                throw new ValidationException("Could not create a default provider", e);
             }
         }
     }
 
     /*
      * (non-Javadoc) See Section 4.4.5 Validation - Must be private
+     * 
+     * TODO - Spec recommends caching per classloader
+     * 
      */
     private static class DefaultValidationProviderResolver implements ValidationProviderResolver {
-
-        private static final String SPI_CFG =
-            "META-INF/services/javax.validation.spi.ValidationProvider";
+ 
+        private static final String SERVICES_FILENAME = "META-INF/services/" +
+            ValidationProvider.class.getName();
 
         /*
          * (non-Javadoc)
@@ -192,15 +185,16 @@
          * @see
          * javax.validation.ValidationProviderResolver#getValidationProviders()
          */
-        public List<ValidationProvider> getValidationProviders() {
-            List<ValidationProvider> providers = new ArrayList<ValidationProvider>();
+        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);
+                Enumeration<URL> cfgs = cl.getResources(SERVICES_FILENAME);
                 while (cfgs.hasMoreElements()) {
                     URL url = cfgs.nextElement();
                     BufferedReader br = null;
@@ -215,7 +209,7 @@
                                     // try loading the specified class
                                     final Class<?> provider = cl.loadClass(line);
                                     // create an instance to return
-                                    providers.add((ValidationProvider) provider.newInstance());
+                                    providers.add((ValidationProvider<?>) provider.newInstance());
                                 } catch (ClassNotFoundException e) {
                                     throw new ValidationException("Failed to load provider " + line + " configured in file " + url, e);
                                 } catch (InstantiationException e) {
@@ -227,6 +221,7 @@
                             line = br.readLine();
                         }
                         br.close();
+                        br = null;
                     } catch (IOException e) {
                         throw new ValidationException("Error trying to read " + url, e);
                     } finally {
@@ -235,7 +230,7 @@
                     }
                 }
             } catch (IOException e) {
-                throw new ValidationException("Error trying to read a " + SPI_CFG, e);
+                throw new ValidationException("Error trying to read a " + SERVICES_FILENAME, e);
             }
             // caller must handle the case of no providers found
             return providers;

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
            ('svn:executable' removed)

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,8 +17,6 @@
 package javax.validation;
 
 /**
- * @see java.lang.RuntmeException
- * 
  * @version $Rev$ $Date$
  */
 public class ValidationException extends RuntimeException {

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidationException.java
            ('svn:executable' removed)

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -23,8 +23,5 @@
  * @version $Rev$ $Date$
  */
 public interface ValidationProviderResolver {
-    /**
-     * @return List<ValidationProvider>
-     */
-    List<ValidationProvider> getValidationProviders();
+    List<ValidationProvider<?>> getValidationProviders();
 }

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -17,51 +17,24 @@
 package javax.validation;
 
 import java.util.Set;
+import javax.validation.metadata.BeanDescriptor;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface Validator {
-    /**
-	 * @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
-     */
     <T> Set<ConstraintViolation<T>> validateProperty(T object,
         String propertyName,
         Class<?>... groups);
 
-    /**
-	 * @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);
 
-	/**
-	 * @param clazz
-	 * @return BeanDescriptor
-	 * @throws ValidationException
-	 */
-	BeanDescriptor getConstraintsForClass(Class<?> clazz);
+    BeanDescriptor getConstraintsForClass(Class<?> clazz);
+
+    public <T> T unwrap(Class<T> type);
 }

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -20,20 +20,9 @@
  * @version $Rev$ $Date$
  */
 public interface ValidatorContext {
-    /**
-     * @param messageInterpolator
-     * @return ValidatorContext
-     */
     ValidatorContext messageInterpolator(MessageInterpolator messageInterpolator);
 
-    /**
-     * @param traversableResolver
-     * @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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -20,18 +20,11 @@
  * @version $Rev$ $Date$
  */
 public interface ValidatorFactory {
-    /**
-     * @return Validator
-     */
     Validator getValidator();
 
-    /**
-     * @return ValidatorContext
-     */
     ValidatorContext usingContext();
 
-    /**
-     * @return MessageInterpolator
-     */
     MessageInterpolator getMessageInterpolator();
+
+    public <T> T unwrap(Class<T> type);
 }

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/ValidatorFactory.java
            ('svn:executable' removed)

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,22 +16,14 @@
  */
 package javax.validation.bootstrap;
 
-import javax.validation.ValidationProviderResolver;
 import javax.validation.Configuration;
+import javax.validation.ValidationProviderResolver;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface GenericBootstrap {
-    /**
-     * @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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,20 +16,12 @@
  */
 package javax.validation.bootstrap;
 
-import javax.validation.ValidationProviderResolver;
 import javax.validation.Configuration;
+import javax.validation.ValidationProviderResolver;
 
 public interface ProviderSpecificBootstrap<T extends Configuration<T>> {
 
-    /**
-     * @param resolver
-     * @return ProviderSpecificBootstrap<T>
-     */
     public ProviderSpecificBootstrap<T> providerResolver(ValidationProviderResolver resolver);
 
-    /**
-     * @return T
-     * @throws javax.validation.ValidationException
-     */
     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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,26 +18,32 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface AssertFalse {
-    String message() default "{constraint.assertFalse}";
+    String message() default "{javax.validation.constraints.AssertFalse.message}";
 
     Class<?>[] groups() default {};
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    Class<? extends ConstraintPayload>[] payload() default {};
+
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -20,24 +20,29 @@
 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.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface AssertTrue {
-    String message() default "{constraint.assertTrue}";
+    String message() default "{javax.validation.constraints.AssertTrue.message}";
 
     Class<?>[] groups() default {};
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    Class<? extends ConstraintPayload>[] payload() default {};
+
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,28 +18,34 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface DecimalMax {
-    String message() default "{constraint.decimalmax}";
+    String message() default "{javax.validation.constraints.DecimalMax.message}";
 
     Class<?>[] groups() default {};
 
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     String value();
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,28 +18,34 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface DecimalMin {
-    String message() default "{constraint.decimalmin}";
+    String message() default "{javax.validation.constraints.DecimalMin.message}";
 
     Class<?>[] groups() default {};
 
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     String value();
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,30 +18,36 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Digits {
-    String message() default "{constraint.digits}";
+    String message() default "{javax.validation.constraints.Digits.message}";
 
     Class<?>[] groups() default {};
 
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     int integer();
 
     int fraction();
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,26 +18,32 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Future {
-    String message() default "{constraint.future}";
+    String message() default "{javax.validation.constraints.Future.message}";
 
     Class<?>[] groups() default {};
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    Class<? extends ConstraintPayload>[] payload() default {};
+
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,28 +18,34 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Max {
-    String message() default "{constraint.max}";
+    String message() default "{javax.validation.constraints.Max.message}";
 
     Class<?>[] groups() default {};
 
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     long value();
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,28 +18,34 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Min {
-    String message() default "{constraint.min}";
+    String message() default "{javax.validation.constraints.Min.message}";
 
     Class<?>[] groups() default {};
 
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     long value();
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,26 +18,32 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface NotNull {
-    String message() default "{constraint.notNull}";
+    String message() default "{javax.validation.constraints.NotNull.message}";
 
     Class<?>[] groups() default {};
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    Class<? extends ConstraintPayload>[] payload() default {};
+
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,26 +18,32 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Null {
-    String message() default "{constraint.null}";
+    String message() default "{javax.validation.constraints.Null.message}";
 
     Class<?>[] groups() default {};
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    Class<? extends ConstraintPayload>[] payload() default {};
+
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -18,26 +18,32 @@
 
 import java.lang.annotation.Documented;
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Past {
-    String message() default "{constraint.past}";
+    String message() default "{javax.validation.constraints.Past.message}";
 
     Class<?>[] groups() default {};
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    Class<? extends ConstraintPayload>[] payload() default {};
+
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,69 +16,66 @@
  */
 package javax.validation.constraints;
 
-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 static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Pattern {
+    
     String regexp();
 
     Flag[] flags() default {};
 
-    String message() default "{constraint.pattern}";
+    String message() default "{javax.validation.constraints.Pattern.message}";
 
     Class<?>[] groups() default {};
 
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     public static enum Flag {
-        /**
-         * @see java.util.regex.Pattern#UNIX_LINES
-         */
-        UNIX_LINES,
-
-        /**
-         * @see java.util.regex.Pattern#CASE_INSENSITIVE
-         */
-        CASE_INSENSITIVE,
-
-        /**
-         * @see java.util.regex.Pattern#COMMENTS
-         */
-        COMMENTS,
-
-        /**
-         * @see java.util.regex.Pattern#MULTILINE
-         */
-        MULTILINE,
-
-        /**
-         * @see java.util.regex.Pattern#DOTALL
-         */
-        DOTALL,
-
-        /**
-         * @see java.util.regex.Pattern#UNICODE_CASE
-         */
-        UNICODE_CASE,
-
-        /**
-         * @see java.util.regex.Pattern#CANON_EQ
-         */
-        CANON_EQ
+
+        UNIX_LINES(java.util.regex.Pattern.UNIX_LINES),
+
+        CASE_INSENSITIVE(java.util.regex.Pattern.CASE_INSENSITIVE),
+
+        COMMENTS(java.util.regex.Pattern.COMMENTS),
+
+        MULTILINE(java.util.regex.Pattern.MULTILINE),
+
+        DOTALL(java.util.regex.Pattern.DOTALL),
+
+        UNICODE_CASE(java.util.regex.Pattern.UNICODE_CASE),
+
+        CANON_EQ(java.util.regex.Pattern.CANON_EQ);
+
+        private final int value;
+
+        private Flag(int value) {
+            this.value = value;
+        }
+
+        public int getValue() {
+            return value;
+        }
     }
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -16,38 +16,38 @@
  */
 package javax.validation.constraints;
 
-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 static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
 import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
 
 /**
  * @version $Rev$ $Date$
  */
-@Target( { METHOD, FIELD, ANNOTATION_TYPE })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
 @Documented
 @Constraint(validatedBy = {})
 public @interface Size {
-    String message() default "{constraint.size}";
+    String message() default "{javax.validation.constraints.Size.message}";
 
     Class<?>[] groups() default {};
 
-    /**
-     * @return int
-     */
+    Class<? extends ConstraintPayload>[] payload() default {};
+
     int min() default 0;
 
-    /**
-     * @return int
-     */
     int max() default Integer.MAX_VALUE;
 
-    @Target( { METHOD, FIELD, ANNOTATION_TYPE })
+    @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
     @Retention(RUNTIME)
     @Documented
     @interface List {

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/BeanDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/BeanDescriptor.java?rev=794769&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/BeanDescriptor.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/BeanDescriptor.java Thu Jul 16 17:58:07 2009
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package javax.validation.metadata;
+
+import java.util.Set;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface BeanDescriptor extends ElementDescriptor {
+    boolean isBeanConstrained();
+
+    PropertyDescriptor getConstraintsForProperty(String propertyName);
+
+    Set<PropertyDescriptor> getConstrainedProperties();
+}

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/BeanDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ConstraintDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ConstraintDescriptor.java?rev=794769&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ConstraintDescriptor.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ConstraintDescriptor.java Thu Jul 16 17:58:07 2009
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package javax.validation.metadata;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintPayload;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface ConstraintDescriptor<T extends Annotation> {
+    T getAnnotation();
+
+    Set<Class<?>> getGroups();
+
+    Set<Class<ConstraintPayload>> getPayload();
+
+    List<Class<? extends ConstraintValidator<T, ?>>>
+        getConstraintValidatorClasses();
+
+    Map<String, Object> getAttributes();
+
+    Set<ConstraintDescriptor<?>> getComposingConstraints();
+
+    boolean isReportAsSingleViolation();
+}

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ConstraintDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java?rev=794769&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java Thu Jul 16 17:58:07 2009
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package javax.validation.metadata;
+
+import java.util.Set;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface ElementDescriptor {
+
+    boolean hasConstraints();
+
+    Class<?> getElementClass();
+
+    Set<ConstraintDescriptor<?>> getConstraintDescriptors();
+
+    Set<ConstraintDescriptor<?>> getUnorderdConstraintDescriptorsMatchingGroups(Class<?>... groups);
+}

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/PropertyDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/PropertyDescriptor.java?rev=794769&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/PropertyDescriptor.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/PropertyDescriptor.java Thu Jul 16 17:58:07 2009
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package javax.validation.metadata;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface PropertyDescriptor extends ElementDescriptor {
+    boolean isCascaded();
+
+    String getPropertyName();
+}

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/PropertyDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

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=794769&r1=794768&r2=794769&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 16 17:58:07 2009
@@ -22,13 +22,7 @@
  * @version $Rev$ $Date$
  */
 public interface BootstrapState {
-    /**
-     * @return ValidationProviderResolver
-     */
     ValidationProviderResolver getValidationProviderResolver();
 
-    /**
-     * @return ValidationProviderResolver
-     */
     ValidationProviderResolver getDefaultValidationProviderResolver();
 }

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ConfigurationState.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ConfigurationState.java?rev=794769&r1=794768&r2=794769&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ConfigurationState.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ConfigurationState.java Thu Jul 16 17:58:07 2009
@@ -17,8 +17,8 @@
 package javax.validation.spi;
 
 import java.io.InputStream;
-import java.util.Set;
 import java.util.Map;
+import java.util.Set;
 import javax.validation.ConstraintValidatorFactory;
 import javax.validation.MessageInterpolator;
 import javax.validation.TraversableResolver;
@@ -28,33 +28,15 @@
  */
 public interface ConfigurationState {
 
-    /**
-     * @return boolean
-     */
     boolean isIgnoreXmlConfiguration();
 
-    /**
-     * @return MessageInterpolator
-     */
     MessageInterpolator getMessageInterpolator();
 
-    /**
-     * @return Set<InputStream>
-     */
     Set<InputStream> getMappingStreams();
 
-    /**
-     * @return ConstraintValidatorFactory
-     */
     ConstraintValidatorFactory getConstraintValidatorFactory();
 
-    /**
-     * @return TraversableResolver
-     */
     TraversableResolver getTraversableResolver();
 
-    /**
-     * @return Map<String, String>
-     */
     Map<String, String> getProperties();
 }

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ConfigurationState.java
            ('svn:executable' removed)

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ValidationProvider.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ValidationProvider.java?rev=794769&r1=794768&r2=794769&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ValidationProvider.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/spi/ValidationProvider.java Thu Jul 16 17:58:07 2009
@@ -22,32 +22,11 @@
 /**
  * @version $Rev$ $Date$
  */
-public interface ValidationProvider {
-    /**
-     * @param configurationClass
-     * @return boolean
-     */
-    boolean isSuitable(Class<? extends Configuration<?>> configurationClass);
+public interface ValidationProvider<T extends Configuration<T>> {
 
-    /**
-     * @param configurationClass
-     * @param state
-     * @return Configuration<T>
-     */
-    <T extends Configuration<T>> T createSpecializedConfiguration(
-        BootstrapState state,
-        Class<T> configurationClass);
+    T createSpecializedConfiguration(BootstrapState state);
 
-    /**
-     * @param state
-     * @return Configuration<?>
-     */
     Configuration<?> createGenericConfiguration(BootstrapState state);
 
-    /**
-     * @param configurationState
-     * @return ValidatorFactory
-     * @throws javax.validation.ValidationException
-     */
     ValidatorFactory buildValidatorFactory(ConfigurationState configurationState);
 }



Mime
View raw message