You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ke...@apache.org on 2010/01/05 16:48:21 UTC

svn commit: r896104 - in /geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata: ElementDescriptor.java Scope.java

Author: kevan
Date: Tue Jan  5 15:48:21 2010
New Revision: 896104

URL: http://svn.apache.org/viewvc?rev=896104&view=rev
Log:
GERONIMO-5014 Updates to validator API. Patch from Mark Struberg. Many thanks Mark! 

Added:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java   (with props)
Modified:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java

Modified: 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=896104&r1=896103&r2=896104&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/ElementDescriptor.java Tue Jan  5 15:48:21 2010
@@ -16,6 +16,7 @@
  */
 package javax.validation.metadata;
 
+import java.lang.annotation.ElementType;
 import java.util.Set;
 
 /**
@@ -29,6 +30,17 @@
 
     Set<ConstraintDescriptor<?>> getConstraintDescriptors();
 
-    Set<ConstraintDescriptor<?>> getUnorderedConstraintDescriptorsMatchingGroups(Class<?>... groups);
-}
+    ConstraintFinder findConstraints();
+
+    interface ConstraintFinder {
+        ConstraintFinder unorderedAndMatchingGroups(Class<?>... groups);
+
+        ConstraintFinder lookingAt(Scope scope);
 
+        ConstraintFinder declaredOn(ElementType... types);
+
+        Set<ConstraintDescriptor<?>> getConstraintDescriptors();
+
+        boolean hasConstraints();
+    }
+}

Added: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java?rev=896104&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java (added)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java Tue Jan  5 15:48:21 2010
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public enum Scope {
+    LOCAL_ELEMENT,
+    HIERARCHY
+}
\ No newline at end of file

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

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/metadata/Scope.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain