myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r919528 [1/2] - in /myfaces/extensions/validator/branches/experimental/trunk_with_extval-83: core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ core/src/main/java/org/apache/myfaces/extensions/validator/core/startu...
Date Fri, 05 Mar 2010 18:23:02 GMT
Author: gpetracek
Date: Fri Mar  5 18:23:01 2010
New Revision: 919528

URL: http://svn.apache.org/viewvc?rev=919528&view=rev
Log:
EXTVAL-83 initial implementation

Added:
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/SingleViolationPropertyValidationInterceptor.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorageManager.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/MappedConstraintSourceStorage.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/mapper/DefaultMappedConstraintSourceStorageNameMapper.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/ConstraintSource.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/IgnoreConstraintSource.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetProperty.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetPropertyId.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation1TestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation2TestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation3TestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation4TestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation5TestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomConstraintSource.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomIgnoreConstraintSource.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetProperty.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetPropertyId.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1Bean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1MetaDataBean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2Bean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2MetaDataBean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3Bean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3MetaDataBean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware4Bean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware4MetaDataBean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware5Bean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware5MetaDataBean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware6Bean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware6MetaDataBean.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/Target3.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/Target4.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/MappedConstraintSourceBeanValidationModuleValidationInterceptor.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/MappedConstraintSourceBeanValidationModuleValidationInterceptorInternals.java
Modified:
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/BaseBeanValPropertyValidationTestCase.java
    myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/startup/BeanValidationStartupListener.java

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/SingleViolationPropertyValidationInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/SingleViolationPropertyValidationInterceptor.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/SingleViolationPropertyValidationInterceptor.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/SingleViolationPropertyValidationInterceptor.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.interceptor;
+
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+import javax.faces.component.EditableValueHolder;
+import java.util.Map;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+public class SingleViolationPropertyValidationInterceptor implements PropertyValidationInterceptor
+{
+    public boolean beforeValidation(
+            FacesContext facesContext, UIComponent uiComponent, Object convertedObject, Map<String, Object> properties)
+    {
+        if(uiComponent instanceof EditableValueHolder && !isComponentValid(uiComponent) && isNavigationBlocked())
+        {
+            return false;
+        }
+        return true;
+    }
+
+    private boolean isComponentValid(UIComponent uiComponent)
+    {
+        return ((EditableValueHolder)uiComponent).isValid();
+    }
+
+    private boolean isNavigationBlocked()
+    {
+        return FacesContext.getCurrentInstance().getRenderResponse();
+    }
+
+    public void afterValidation(
+            FacesContext facesContext, UIComponent uiComponent, Object convertedObject, Map<String, Object> properties)
+    {
+    }
+}

Modified: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java?rev=919528&r1=919527&r2=919528&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java (original)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java Fri Mar  5 18:23:01 2010
@@ -61,6 +61,10 @@
 import org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultViolationSeverityInterpreter;
 import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
 import org.apache.myfaces.extensions.validator.core.validation.parameter.DisableClientSideValidation;
+import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
+import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
+import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
+import org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId;
 import org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererProxy;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
@@ -103,6 +107,8 @@
         initViolationSeverityKey();
         initDisableClientSideValidationKey();
         initRequiredInitialization();
+        initDefaultConstraintSourceAnnotations();
+
         executeCustomStartupListener();
     }
 
@@ -234,6 +240,18 @@
         }
     }
 
+    private void initDefaultConstraintSourceAnnotations()
+    {
+        ExtValContext.getContext()
+                .addGlobalProperty(ConstraintSource.class.getName(), ConstraintSource.class, false);
+        ExtValContext.getContext()
+                .addGlobalProperty(IgnoreConstraintSource.class.getName(), IgnoreConstraintSource.class, false);
+        ExtValContext.getContext()
+                .addGlobalProperty(TargetProperty.class.getName(), TargetProperty.class, false);
+        ExtValContext.getContext()
+                .addGlobalProperty(TargetPropertyId.class.getName(), TargetPropertyId.class, false);
+    }
+
     /**
      * if it's configured that required init should happen,
      * it's required to deactivate the support for the required attribute

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,68 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.storage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
+import static org.apache.myfaces.extensions.validator.internal.UsageCategory.INTERNAL;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@UsageInformation(INTERNAL)
+public class DefaultMappedConstraintSourceStorage implements MappedConstraintSourceStorage
+{
+    protected final Log logger = LogFactory.getLog(getClass());
+
+    private Map<String, PropertyDetails> propertyDetailsMap = new HashMap<String, PropertyDetails>();
+
+    public void storeMapping(Class originalClass, String originalProperty, PropertyDetails targetPropertyDetails)
+    {
+        this.propertyDetailsMap.put(createKey(originalClass, originalProperty), targetPropertyDetails);
+    }
+
+    public PropertyDetails getMappedConstraintSource(Class originalClass, String originalProperty)
+    {
+        PropertyDetails foundEntry = this.propertyDetailsMap.get(createKey(originalClass, originalProperty));
+        PropertyDetails result = null;
+
+        if(foundEntry != null)
+        {
+            result = new PropertyDetails(foundEntry.getKey(), foundEntry.getBaseObject(), foundEntry.getProperty());
+        }
+        
+        return result;
+    }
+
+    public boolean containsMapping(Class originalClass, String originalProperty)
+    {
+        return this.propertyDetailsMap.containsKey(createKey(originalClass, originalProperty));
+    }
+
+    private String createKey(Class originalClass, String originalProperty)
+    {
+        return originalClass.getName() + "#" + originalProperty;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorageManager.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorageManager.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorageManager.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorageManager.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,43 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.storage;
+
+import org.apache.myfaces.extensions.validator.core.storage.mapper.DefaultMappedConstraintSourceStorageNameMapper;
+import static org.apache.myfaces.extensions.validator.internal.UsageCategory.INTERNAL;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+/**
+ * default storage-manager for mapped properties information
+ *
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@UsageInformation(INTERNAL)
+class DefaultMappedConstraintSourceStorageManager extends AbstractApplicationScopeAwareStorageManager<PropertyStorage>
+{
+    DefaultMappedConstraintSourceStorageManager()
+    {
+        register(new DefaultMappedConstraintSourceStorageNameMapper());
+    }
+
+    public String getStorageManagerKey()
+    {
+        return StorageManager.class.getName() + "_FOR_MAPPED_CONSTRAINT_SOURCE:KEY";
+    }
+}
\ No newline at end of file

Modified: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java?rev=919528&r1=919527&r2=919528&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java (original)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java Fri Mar  5 18:23:01 2010
@@ -73,6 +73,8 @@
                 new DefaultRendererInterceptorPropertyStorageManager(), false);
         setStorageManager(ViolationSeverityInterpreterStorage.class,
                 new DefaultViolationSeverityInterpreterStorageManager(), false);
+        setStorageManager(MappedConstraintSourceStorage.class,
+                new DefaultMappedConstraintSourceStorageManager(), false);
 
         setStorageManager(FacesInformationStorage.class,
                 new DefaultFacesInformationStorageManager(), false);

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/MappedConstraintSourceStorage.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/MappedConstraintSourceStorage.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/MappedConstraintSourceStorage.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/MappedConstraintSourceStorage.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,37 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.storage;
+
+import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public interface MappedConstraintSourceStorage
+{
+    void storeMapping(Class targetClass, String property, PropertyDetails propertyDetails);
+
+    PropertyDetails getMappedConstraintSource(Class targetClass, String property);
+
+    boolean containsMapping(Class targetClass, String property);
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/mapper/DefaultMappedConstraintSourceStorageNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/mapper/DefaultMappedConstraintSourceStorageNameMapper.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/mapper/DefaultMappedConstraintSourceStorageNameMapper.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/mapper/DefaultMappedConstraintSourceStorageNameMapper.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,43 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.storage.mapper;
+
+import org.apache.myfaces.extensions.validator.core.InvocationOrder;
+import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
+import org.apache.myfaces.extensions.validator.core.storage.MappedConstraintSourceStorage;
+import org.apache.myfaces.extensions.validator.core.storage.DefaultMappedConstraintSourceStorage;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+/**
+ * use a public class to allow optional deregistration
+ *
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@InvocationOrder(100)
+@UsageInformation(UsageCategory.INTERNAL)
+public class DefaultMappedConstraintSourceStorageNameMapper implements NameMapper<String>
+{
+    public String createName(String source)
+    {
+        return (MappedConstraintSourceStorage.class.getName().equals(source)) ?
+                DefaultMappedConstraintSourceStorage.class.getName() : null;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/ConstraintSource.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/ConstraintSource.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/ConstraintSource.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/ConstraintSource.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,43 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.validation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@Target({TYPE, FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface ConstraintSource
+{
+    Class value();
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/IgnoreConstraintSource.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/IgnoreConstraintSource.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/IgnoreConstraintSource.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/IgnoreConstraintSource.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,41 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.validation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@Target({FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface IgnoreConstraintSource
+{
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetProperty.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetProperty.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetProperty.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetProperty.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.validation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@Target({FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface TargetProperty
+{
+    String value();
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetPropertyId.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetPropertyId.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetPropertyId.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/TargetPropertyId.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,43 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.core.validation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Annotation;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.4
+ */
+@Target({FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface TargetPropertyId
+{
+    Class<? extends Annotation> value();
+}
\ No newline at end of file

Modified: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/BaseBeanValPropertyValidationTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/BaseBeanValPropertyValidationTestCase.java?rev=919528&r1=919527&r2=919528&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/BaseBeanValPropertyValidationTestCase.java (original)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/BaseBeanValPropertyValidationTestCase.java Fri Mar  5 18:23:01 2010
@@ -18,6 +18,9 @@
  */
 package org.apache.myfaces.extensions.validator.test.beanval;
 
+import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.interceptor.SingleViolationPropertyValidationInterceptor;
+
 import javax.faces.component.html.HtmlInputText;
 import javax.faces.component.html.HtmlForm;
 import javax.faces.component.UIViewRoot;
@@ -53,6 +56,8 @@
         bindBeanToExpression();
 
         createComponents();
+
+        ExtValContext.getContext().addPropertyValidationInterceptor(new SingleViolationPropertyValidationInterceptor());
     }
 
     private void createComponents()

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation1TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation1TestCase.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation1TestCase.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation1TestCase.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,76 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware1Bean;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ * EXTVAL-83
+ *
+ * @author Gerhard Petracek
+ */
+public class ConstraintSourceAwareValidation1TestCase extends BaseBeanValPropertyValidationTestCase<ConstraintSourceAware1Bean>
+{
+    public ConstraintSourceAwareValidation1TestCase(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(ConstraintSourceAwareValidation1TestCase.class);
+    }
+
+    protected ConstraintSourceAware1Bean getBeanToTest()
+    {
+        return new ConstraintSourceAware1Bean();
+    }
+
+    public void testImplecitFieldMapping()
+    {
+        createValueBindingForComponent(this.inputComponent1, "#{testBean.property1}");
+        setValueToValidate(this.inputComponent1, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent1);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+
+    public void testImplecitMethodMapping()
+    {
+        createValueBindingForComponent(this.inputComponent2, "#{testBean.property2}");
+        setValueToValidate(this.inputComponent2, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent2);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+}

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation2TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation2TestCase.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation2TestCase.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation2TestCase.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,75 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware2Bean;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ * EXTVAL-83
+ *
+ * @author Gerhard Petracek
+ */
+public class ConstraintSourceAwareValidation2TestCase extends BaseBeanValPropertyValidationTestCase<ConstraintSourceAware2Bean>
+{
+    public ConstraintSourceAwareValidation2TestCase(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(ConstraintSourceAwareValidation2TestCase.class);
+    }
+
+    protected ConstraintSourceAware2Bean getBeanToTest()
+    {
+        return new ConstraintSourceAware2Bean();
+    }
+
+    public void testIgnoreConstraintSource()
+    {
+        createValueBindingForComponent(this.inputComponent1, "#{testBean.property1}");
+        setValueToValidate(this.inputComponent1, "");
+
+        validateComponents();
+
+        assertComponentValid(this.inputComponent1);
+        assertNavigationBlocked(false);
+
+        checkMessageCount(0);
+    }
+
+    public void testStringBasedTargetProperty()
+    {
+        createValueBindingForComponent(this.inputComponent2, "#{testBean.property2}");
+        setValueToValidate(this.inputComponent2, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent2);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation3TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation3TestCase.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation3TestCase.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation3TestCase.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,75 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware3Bean;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ * EXTVAL-83
+ *
+ * @author Gerhard Petracek
+ */
+public class ConstraintSourceAwareValidation3TestCase extends BaseBeanValPropertyValidationTestCase<ConstraintSourceAware3Bean>
+{
+    public ConstraintSourceAwareValidation3TestCase(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(ConstraintSourceAwareValidation3TestCase.class);
+    }
+
+    protected ConstraintSourceAware3Bean getBeanToTest()
+    {
+        return new ConstraintSourceAware3Bean();
+    }
+
+    public void testMissingBasedConstraintSource()
+    {
+        createValueBindingForComponent(this.inputComponent1, "#{testBean.property1}");
+        setValueToValidate(this.inputComponent1, "");
+
+        validateComponents();
+
+        assertComponentValid(this.inputComponent1);
+        assertNavigationBlocked(false);
+
+        checkMessageCount(0);
+    }
+
+    public void testFieldBasedConstraintSource()
+    {
+        createValueBindingForComponent(this.inputComponent2, "#{testBean.property2}");
+        setValueToValidate(this.inputComponent2, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent2);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation4TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation4TestCase.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation4TestCase.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation4TestCase.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,75 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware4Bean;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ * EXTVAL-83
+ *
+ * @author Gerhard Petracek
+ */
+public class ConstraintSourceAwareValidation4TestCase extends BaseBeanValPropertyValidationTestCase<ConstraintSourceAware4Bean>
+{
+    public ConstraintSourceAwareValidation4TestCase(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(ConstraintSourceAwareValidation4TestCase.class);
+    }
+
+    protected ConstraintSourceAware4Bean getBeanToTest()
+    {
+        return new ConstraintSourceAware4Bean();
+    }
+
+    public void testMethodBasedConstraintSourceAndTargetPropertyAnnotation()
+    {
+        createValueBindingForComponent(this.inputComponent1, "#{testBean.property1}");
+        setValueToValidate(this.inputComponent1, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent1);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+
+    public void testMissingBasedConstraintSource()
+    {
+        createValueBindingForComponent(this.inputComponent2, "#{testBean.property2}");
+        setValueToValidate(this.inputComponent2, "");
+
+        validateComponents();
+
+        assertComponentValid(this.inputComponent2);
+        assertNavigationBlocked(false);
+
+        checkMessageCount(0);
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation5TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation5TestCase.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation5TestCase.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation5TestCase.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,76 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware5Bean;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ * EXTVAL-83
+ *
+ * @author Gerhard Petracek
+ */
+public class ConstraintSourceAwareValidation5TestCase extends BaseBeanValPropertyValidationTestCase<ConstraintSourceAware5Bean>
+{
+    public ConstraintSourceAwareValidation5TestCase(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(ConstraintSourceAwareValidation5TestCase.class);
+    }
+
+    protected ConstraintSourceAware5Bean getBeanToTest()
+    {
+        return new ConstraintSourceAware5Bean();
+    }
+
+    public void testMethodBasedTargetPropertyIdAnnotation()
+    {
+        createValueBindingForComponent(this.inputComponent1, "#{testBean.property1}");
+        setValueToValidate(this.inputComponent1, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent1);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+
+    public void testFieldBasedTargetPropertyIdAnnotation()
+    {
+        createValueBindingForComponent(this.inputComponent2, "#{testBean.property2}");
+        setValueToValidate(this.inputComponent2, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent2);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,110 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware6Bean;
+import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomConstraintSource;
+import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomIgnoreConstraintSource;
+import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomTargetProperty;
+import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomTargetPropertyId;
+import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
+import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
+import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
+import org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ * EXTVAL-83
+ *
+ * @author Gerhard Petracek
+ */
+public class ConstraintSourceAwareValidation6TestCase extends BaseBeanValPropertyValidationTestCase<ConstraintSourceAware6Bean>
+{
+    public ConstraintSourceAwareValidation6TestCase(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(ConstraintSourceAwareValidation6TestCase.class);
+    }
+
+    protected ConstraintSourceAware6Bean getBeanToTest()
+    {
+        return new ConstraintSourceAware6Bean();
+    }
+
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        ExtValContext extValContext = ExtValContext.getContext();
+
+        extValContext.addGlobalProperty(ConstraintSource.class.getName(), CustomConstraintSource.class);
+        extValContext.addGlobalProperty(IgnoreConstraintSource.class.getName(), CustomIgnoreConstraintSource.class);
+        extValContext.addGlobalProperty(TargetProperty.class.getName(), CustomTargetProperty.class);
+        extValContext.addGlobalProperty(TargetPropertyId.class.getName(), CustomTargetPropertyId.class);
+    }
+
+    public void testCustomAnnotations1()
+    {
+        createValueBindingForComponent(this.inputComponent1, "#{testBean.property1}");
+        setValueToValidate(this.inputComponent1, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent1);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+
+    public void testCustomAnnotations2()
+    {
+        createValueBindingForComponent(this.inputComponent2, "#{testBean.property2}");
+        setValueToValidate(this.inputComponent2, "");
+
+        validateComponents();
+
+        assertComponentInvalid(this.inputComponent2);
+        assertNavigationBlocked(true);
+
+        checkMessageCount(1);
+        checkMessageSeverities(FacesMessage.SEVERITY_ERROR);
+    }
+
+    public void testCustomAnnotations3()
+    {
+        createValueBindingForComponent(this.inputComponent3, "#{testBean.property3}");
+        setValueToValidate(this.inputComponent3, "");
+
+        validateComponents();
+
+        assertComponentValid(this.inputComponent3);
+        assertNavigationBlocked(false);
+
+        checkMessageCount(0);
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomConstraintSource.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomConstraintSource.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomConstraintSource.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomConstraintSource.java Fri Mar  5 18:23:01 2010
@@ -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 org.apache.myfaces.extensions.validator.test.beanval.custom;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Target({TYPE, FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+public @interface CustomConstraintSource
+{
+    public abstract Class value();
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomIgnoreConstraintSource.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomIgnoreConstraintSource.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomIgnoreConstraintSource.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomIgnoreConstraintSource.java Fri Mar  5 18:23:01 2010
@@ -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 org.apache.myfaces.extensions.validator.test.beanval.custom;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Target({FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+public @interface CustomIgnoreConstraintSource
+{
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetProperty.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetProperty.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetProperty.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetProperty.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,34 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.custom;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Target({FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+public @interface CustomTargetProperty
+{
+    public abstract String value();
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetPropertyId.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetPropertyId.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetPropertyId.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/custom/CustomTargetPropertyId.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,35 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.custom;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Target({FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+public @interface CustomTargetPropertyId
+{
+    public abstract Class<? extends Annotation> value();
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1Bean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1Bean.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1Bean.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1Bean.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.model;
+
+import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
+
+@ConstraintSource(ConstraintSourceAware1MetaDataBean.class)
+public class ConstraintSourceAware1Bean
+{
+    private String property1;
+
+    private String property2;
+
+    public String getProperty1()
+    {
+        return property1;
+    }
+
+    public void setProperty1(String property1)
+    {
+        this.property1 = property1;
+    }
+
+    public String getProperty2()
+    {
+        return property2;
+    }
+
+    public void setProperty2(String property2)
+    {
+        this.property2 = property2;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1MetaDataBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1MetaDataBean.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1MetaDataBean.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware1MetaDataBean.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,40 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.model;
+
+import javax.validation.constraints.NotNull;
+
+public class ConstraintSourceAware1MetaDataBean
+{
+    @NotNull
+    private String property1;
+
+    private String property2;
+
+    @NotNull
+    public String getProperty2()
+    {
+        return property2;
+    }
+
+    public void setProperty2(String property2)
+    {
+        this.property2 = property2;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2Bean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2Bean.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2Bean.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2Bean.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,53 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.model;
+
+import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
+import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
+import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
+
+@ConstraintSource(ConstraintSourceAware2MetaDataBean.class)
+public class ConstraintSourceAware2Bean
+{
+    @IgnoreConstraintSource
+    private String property1;
+
+    @TargetProperty("property3")
+    private String property2;
+
+    public String getProperty1()
+    {
+        return property1;
+    }
+
+    public void setProperty1(String property1)
+    {
+        this.property1 = property1;
+    }
+
+    public String getProperty2()
+    {
+        return property2;
+    }
+
+    public void setProperty2(String property2)
+    {
+        this.property2 = property2;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2MetaDataBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2MetaDataBean.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2MetaDataBean.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware2MetaDataBean.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,40 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.model;
+
+import javax.validation.constraints.NotNull;
+
+public class ConstraintSourceAware2MetaDataBean
+{
+    @NotNull
+    private String property1;
+
+    private String property3;
+
+    @NotNull
+    public String getProperty3()
+    {
+        return property3;
+    }
+
+    public void setProperty3(String property3)
+    {
+        this.property3 = property3;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3Bean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3Bean.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3Bean.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3Bean.java Fri Mar  5 18:23:01 2010
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.myfaces.extensions.validator.test.beanval.model;
+
+import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
+
+public class ConstraintSourceAware3Bean
+{
+    private String property1;
+
+    @ConstraintSource(ConstraintSourceAware3MetaDataBean.class)
+    private String property2;
+
+    public String getProperty1()
+    {
+        return property1;
+    }
+
+    public void setProperty1(String property1)
+    {
+        this.property1 = property1;
+    }
+
+    public String getProperty2()
+    {
+        return property2;
+    }
+
+    public void setProperty2(String property2)
+    {
+        this.property2 = property2;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3MetaDataBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3MetaDataBean.java?rev=919528&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3MetaDataBean.java (added)
+++ myfaces/extensions/validator/branches/experimental/trunk_with_extval-83/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/model/ConstraintSourceAware3MetaDataBean.java Fri Mar  5 18:23:01 2010
@@ -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 org.apache.myfaces.extensions.validator.test.beanval.model;
+
+import javax.validation.constraints.NotNull;
+
+public class ConstraintSourceAware3MetaDataBean
+{
+    @NotNull
+    private String property1;
+
+    @NotNull
+    private String property2;
+}
\ No newline at end of file



Mime
View raw message