myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r740008 - in /myfaces/extensions/validator/branches/branch_for_jsf_1_1: core/src/main/java/org/apache/myfaces/extensions/validator/core/ core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/ core/src/main/java/org/apache/...
Date Mon, 02 Feb 2009 15:35:58 GMT
Author: gpetracek
Date: Mon Feb  2 15:35:57 2009
New Revision: 740008

URL: http://svn.apache.org/viewvc?rev=740008&view=rev
Log:
EXTVAL-33 first step to allow a cleaner integration of the latest jsr changes

Added:
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/MetaDataExtractionInterceptor.java
Modified:
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/InformationProviderBean.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/AbstractNameMapperAwareFactory.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ValidationInterceptor.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/MetaDataEntry.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractorFactory.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/AbstractValidationStrategy.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AbstractMetaDataToValidationStrategyNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AnnotationToValidationStrategyBeanNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConventionAnnotationToValidationStrategyNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/DefaultAnnotationToValidationStrategyNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/SimpleAnnotationToValidationStrategyNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/annotation/extractor/DefaultPropertyScanningMetaDataExtractor.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/JoinMetaDataTransformer.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/PatternMetaDataTransformer.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java Mon Feb  2 15:35:57 2009
@@ -42,6 +42,7 @@
     STARTUP_LISTENER,
     COMPONENT_INITIALIZER,
     VALIDATION_EXCEPTION_INTERCEPTOR,
+    META_DATA_EXTRACTION_INTERCEPTOR,
 
     MESSAGE_RESOLVER_FACTORY,
     VALIDATION_STRATEGY_FACTORY,

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java Mon Feb  2 15:35:57 2009
@@ -22,6 +22,7 @@
 import org.apache.myfaces.extensions.validator.core.initializer.configuration.StaticConfiguration;
 import org.apache.myfaces.extensions.validator.core.interceptor.RendererInterceptor;
 import org.apache.myfaces.extensions.validator.core.interceptor.ValidationExceptionInterceptor;
+import org.apache.myfaces.extensions.validator.core.interceptor.MetaDataExtractionInterceptor;
 import org.apache.myfaces.extensions.validator.core.recorder.ProcessedInformationRecorder;
 import org.apache.myfaces.extensions.validator.core.factory.FactoryFinder;
 import org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder;
@@ -58,6 +59,7 @@
 
     private List<ComponentInitializer> componentInitializers;
     private List<ValidationExceptionInterceptor> validationExceptionInterceptors;
+    private List<MetaDataExtractionInterceptor> metaDataExtractionInterceptors;
 
     private Map<String, Object> globalProperties = new HashMap<String, Object>();
 
@@ -132,6 +134,42 @@
         }
     }
 
+    private void lazyInitMetaDataExtractionInterceptors()
+    {
+        if(this.metaDataExtractionInterceptors != null)
+        {
+            return;
+        }
+
+        this.metaDataExtractionInterceptors = new ArrayList<MetaDataExtractionInterceptor>();
+
+        List<String> metaDataExtractionInterceptorClassNames = new ArrayList<String>();
+
+        metaDataExtractionInterceptorClassNames
+            .add(WebXmlParameter.CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR);
+        metaDataExtractionInterceptorClassNames
+            .add(ExtValContext.getContext().getInformationProviderBean().get(
+                    CustomInformation.META_DATA_EXTRACTION_INTERCEPTOR));
+
+        MetaDataExtractionInterceptor metaDataExtractionInterceptor;
+        for (String validationExceptionInterceptorName : metaDataExtractionInterceptorClassNames)
+        {
+            metaDataExtractionInterceptor =
+                (MetaDataExtractionInterceptor)
+                        ClassUtils.tryToInstantiateClassForName(validationExceptionInterceptorName);
+
+            if (metaDataExtractionInterceptor != null)
+            {
+                this.metaDataExtractionInterceptors.add(metaDataExtractionInterceptor);
+
+                if(logger.isTraceEnabled())
+                {
+                    logger.trace(metaDataExtractionInterceptor.getClass().getName() + " added");
+                }
+            }
+        }
+    }
+
     public static ExtValContext getContext()
     {
         return extValContext;
@@ -217,6 +255,18 @@
         return validationExceptionInterceptors;
     }
 
+    public void addMetaDataExtractionInterceptor(MetaDataExtractionInterceptor metaDataExtractionInterceptor)
+    {
+        lazyInitMetaDataExtractionInterceptors();
+        metaDataExtractionInterceptors.add(metaDataExtractionInterceptor);
+    }
+
+    public List<MetaDataExtractionInterceptor> getMetaDataExtractionInterceptors()
+    {
+        lazyInitMetaDataExtractionInterceptors();
+        return metaDataExtractionInterceptors;
+    }
+
     public List<ProcessedInformationRecorder> getProcessedInformationRecorders()
     {
         return processedInformationRecorders;

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/InformationProviderBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/InformationProviderBean.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/InformationProviderBean.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/InformationProviderBean.java Mon Feb  2 15:35:57 2009
@@ -90,6 +90,8 @@
                 "ComponentInitializer");
         customizableInfos.put(CustomInformation.VALIDATION_EXCEPTION_INTERCEPTOR,
                 "ValidationExceptionInterceptor");
+        customizableInfos.put(CustomInformation.META_DATA_EXTRACTION_INTERCEPTOR,
+                "MetaDataExtractionInterceptor");
 
         customizableInfos.put(CustomInformation.VALIDATION_STRATEGY_TO_MSG_RESOLVER_NAME_MAPPER,
             "ValidationStrategyToMsgResolverNameMapper");

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java Mon Feb  2 15:35:57 2009
@@ -55,6 +55,9 @@
     static final String CUSTOM_VALIDATION_EXCEPTION_INTERCEPTOR = WebXmlUtils
         .getInitParameter("CUSTOM_VALIDATION_EXCEPTION_INTERCEPTOR");
 
+    static final String CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR = WebXmlUtils
+        .getInitParameter("CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR");
+
     /*
      * name mapper
      */

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/AbstractNameMapperAwareFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/AbstractNameMapperAwareFactory.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/AbstractNameMapperAwareFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/AbstractNameMapperAwareFactory.java Mon Feb  2 15:35:57 2009
@@ -43,7 +43,7 @@
         }
     }
 
-    public synchronized void deregister(Class classToDeregister)
+    public synchronized void deregister(Class<? extends NameMapper> classToDeregister)
     {
         Iterator<NameMapper<T>> nameMapperIterator = getNameMapperList().iterator();
         while(nameMapperIterator.hasNext())
@@ -57,7 +57,7 @@
         }
     }
 
-    public void deny(Class classToDeny)
+    public void deny(Class<? extends NameMapper> classToDeny)
     {
         deregister(classToDeny);
 

Added: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/MetaDataExtractionInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/MetaDataExtractionInterceptor.java?rev=740008&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/MetaDataExtractionInterceptor.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/MetaDataExtractionInterceptor.java Mon Feb  2 15:35:57 2009
@@ -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.interceptor;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.core.property.PropertyInformation;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.2
+ */
+@UsageInformation(UsageCategory.API)
+public interface MetaDataExtractionInterceptor
+{
+    /**
+     *
+     * @param propertyInformation the information entry which contains information about the property
+     */
+    void afterExtracting(PropertyInformation propertyInformation);
+}

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ValidationInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ValidationInterceptor.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ValidationInterceptor.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ValidationInterceptor.java Mon Feb  2 15:35:57 2009
@@ -27,6 +27,8 @@
 import org.apache.myfaces.extensions.validator.core.metadata.CommonMetaDataKeys;
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformationKeys;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.renderkit.exception.SkipBeforeInterceptorsException;
+import org.apache.myfaces.extensions.validator.core.renderkit.exception.SkipRendererDelegationException;
 import org.apache.myfaces.extensions.validator.core.recorder.ProcessedInformationRecorder;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 
@@ -35,6 +37,7 @@
 import javax.faces.component.EditableValueHolder;
 import javax.faces.convert.ConverterException;
 import javax.faces.render.Renderer;
+import javax.faces.validator.ValidatorException;
 import java.io.IOException;
 import java.util.Map;
 import java.util.HashMap;
@@ -48,7 +51,7 @@
 {
     @Override
     public void beforeEncodeBegin(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
-        throws IOException
+            throws IOException, SkipBeforeInterceptorsException, SkipRendererDelegationException
     {
         initComponent(facesContext, uiComponent);
     }
@@ -73,7 +76,7 @@
         Map<String, Object> metaData = new HashMap<String, Object>();
         for (MetaDataEntry entry : metaDataExtractor.extract(facesContext, uiComponent).getMetaDataEntries())
         {
-            validationStrategy = ExtValUtils.getValidationStrategyForMetaData(entry.getKey());
+            validationStrategy = ExtValUtils.getValidationStrategyForMetaDataEntry(entry);
 
             if (validationStrategy != null)
             {
@@ -101,15 +104,19 @@
                     }
                 }
 
-                if(Boolean.TRUE.equals(entry.getProperty(PropertyInformationKeys.SKIP_VALIDATION, Boolean.class)))
+                if(!metaData.isEmpty() &&
+                        Boolean.TRUE.equals(entry.getProperty(PropertyInformationKeys.SKIP_VALIDATION, Boolean.class)))
                 {
                     metaData.put(CommonMetaDataKeys.SKIP_VALIDATION, true);
                 }
 
                 //get component initializer for the current component and configure it
                 //also in case of skipped validation to reset e.g. the required attribute
-                ExtValUtils.configureComponentWithMetaData(facesContext, uiComponent, metaData);
-            }
+                if(!metaData.isEmpty())
+                {
+                    ExtValUtils.configureComponentWithMetaData(facesContext, uiComponent, metaData);
+                }
+           }
         }
 
         if(logger.isTraceEnabled())
@@ -120,7 +127,7 @@
 
     @Override
     public void beforeGetConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object o, Renderer wrapped)
-        throws ConverterException
+            throws ConverterException, SkipBeforeInterceptorsException, SkipRendererDelegationException
     {
         Object convertedObject = wrapped.getConvertedValue(facesContext, uiComponent, o);
 
@@ -135,7 +142,14 @@
             }
         }
 
-        processValidation(facesContext, uiComponent, convertedObject);
+        try
+        {
+            processValidation(facesContext, uiComponent, convertedObject);
+        }
+        catch (ValidatorException e)
+        {
+            throw new ConverterException(e.getFacesMessage(), e);
+        }
     }
 
     protected void processValidation(FacesContext facesContext, UIComponent uiComponent, Object convertedObject)
@@ -156,7 +170,7 @@
 
         for (MetaDataEntry entry : metaDataExtractor.extract(facesContext, uiComponent).getMetaDataEntries())
         {
-            validationStrategy = ExtValUtils.getValidationStrategyForMetaData(entry.getKey());
+            validationStrategy = ExtValUtils.getValidationStrategyForMetaDataEntry(entry);
 
             if (validationStrategy != null)
             {

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/MetaDataEntry.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/MetaDataEntry.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/MetaDataEntry.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/MetaDataEntry.java Mon Feb  2 15:35:57 2009
@@ -62,6 +62,11 @@
         this.value = value;
     }
 
+    public Map<String, Object> getProperties()
+    {
+        return properties;
+    }
+
     public void setProperties(Map<String, Object> properties)
     {
         this.properties = properties;

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractorFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractorFactory.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractorFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractorFactory.java Mon Feb  2 15:35:57 2009
@@ -22,6 +22,7 @@
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
@@ -90,6 +91,6 @@
             logger.trace(metaDataExtractor.getClass().getName() + " created");
         }
 
-        return metaDataExtractor;
+        return ExtValUtils.createInterceptedMetaDataExtractor(metaDataExtractor);
     }
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/AbstractValidationStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/AbstractValidationStrategy.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/AbstractValidationStrategy.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/AbstractValidationStrategy.java Mon Feb  2 15:35:57 2009
@@ -27,7 +27,6 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.convert.ConverterException;
 import javax.faces.validator.ValidatorException;
 
 /**
@@ -96,7 +95,7 @@
                         ": throw original exception after processAfterValidatorException");
                 }
 
-                throw new ConverterException(e.getFacesMessage(), e);
+                throw e;
             }
 
             if(logger.isTraceEnabled())

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java Mon Feb  2 15:35:57 2009
@@ -23,6 +23,7 @@
 import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
 import org.apache.myfaces.extensions.validator.core.initializer.configuration.StaticConfiguration;
 import org.apache.myfaces.extensions.validator.core.initializer.configuration.StaticConfigurationEntry;
@@ -54,12 +55,12 @@
  */
 @UsageInformation({UsageCategory.INTERNAL, UsageCategory.CUSTOMIZABLE})
 public class DefaultValidationStrategyFactory extends AbstractNameMapperAwareFactory
-        implements ClassMappingFactory<String, ValidationStrategy>
+        implements ClassMappingFactory<MetaDataEntry, ValidationStrategy>
 {
     protected final Log logger = LogFactory.getLog(getClass());
 
     private Map<String, String> metaDataKeyToValidationStrategyMapping = null;
-    private List<NameMapper<String>> nameMapperList = new ArrayList<NameMapper<String>>();
+    private List<NameMapper<MetaDataEntry>> nameMapperList = new ArrayList<NameMapper<MetaDataEntry>>();
 
     public DefaultValidationStrategyFactory()
     {
@@ -69,24 +70,24 @@
         }
     }
 
-    public ValidationStrategy create(String metaDataKey)
+    public ValidationStrategy create(MetaDataEntry metaDataEntry)
     {
         if (metaDataKeyToValidationStrategyMapping == null)
         {
             initStaticMappings();
         }
 
-        if (metaDataKeyToValidationStrategyMapping.containsKey(metaDataKey))
+        if (metaDataKeyToValidationStrategyMapping.containsKey(metaDataEntry.getKey()))
         {
-            return getValidationStrategyInstance(metaDataKeyToValidationStrategyMapping.get(metaDataKey));
+            return getValidationStrategyInstance(metaDataKeyToValidationStrategyMapping.get(metaDataEntry.getKey()));
         }
 
         ValidationStrategy validationStrategy;
         String strategyName;
         //null -> use name mappers
-        for (NameMapper<String> nameMapper : nameMapperList)
+        for (NameMapper<MetaDataEntry> nameMapper : this.nameMapperList)
         {
-            strategyName = nameMapper.createName(metaDataKey);
+            strategyName = nameMapper.createName(metaDataEntry);
 
             if (strategyName == null)
             {
@@ -97,7 +98,7 @@
 
             if (validationStrategy != null)
             {
-                addMapping(metaDataKey, strategyName);
+                addMapping(metaDataEntry.getKey(), strategyName);
                 return validationStrategy;
             }
         }
@@ -183,7 +184,7 @@
         }
     }
 
-    protected List<NameMapper<String>> getNameMapperList()
+    protected List<NameMapper<MetaDataEntry>> getNameMapperList()
     {
         return this.nameMapperList;
     }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AbstractMetaDataToValidationStrategyNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AbstractMetaDataToValidationStrategyNameMapper.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AbstractMetaDataToValidationStrategyNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AbstractMetaDataToValidationStrategyNameMapper.java Mon Feb  2 15:35:57 2009
@@ -19,6 +19,7 @@
 package org.apache.myfaces.extensions.validator.core.validation.strategy.mapper;
 
 import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.commons.logging.Log;
@@ -29,7 +30,7 @@
  * @since 1.x.1
  */
 @UsageInformation(UsageCategory.INTERNAL)
-public abstract class AbstractMetaDataToValidationStrategyNameMapper implements NameMapper<String>
+public abstract class AbstractMetaDataToValidationStrategyNameMapper implements NameMapper<MetaDataEntry>
 {
     protected final Log logger = LogFactory.getLog(getClass());
 

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AnnotationToValidationStrategyBeanNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AnnotationToValidationStrategyBeanNameMapper.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AnnotationToValidationStrategyBeanNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/AnnotationToValidationStrategyBeanNameMapper.java Mon Feb  2 15:35:57 2009
@@ -19,6 +19,7 @@
 package org.apache.myfaces.extensions.validator.core.validation.strategy.mapper;
 
 import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -39,14 +40,14 @@
 public class AnnotationToValidationStrategyBeanNameMapper extends AbstractMetaDataToValidationStrategyNameMapper
 {
     public static final String PREFIX_FOR_BEAN_MAPPING = "bean:";
-    private NameMapper<String> wrapped;
+    private NameMapper<MetaDataEntry> wrapped;
 
-    public AnnotationToValidationStrategyBeanNameMapper(NameMapper<String> nameMapper)
+    public AnnotationToValidationStrategyBeanNameMapper(NameMapper<MetaDataEntry> nameMapper)
     {
         this.wrapped = nameMapper;
     }
 
-    public String createName(String source)
+    public String createName(MetaDataEntry source)
     {
         String name = wrapped.createName(source);
 

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java Mon Feb  2 15:35:57 2009
@@ -19,6 +19,7 @@
 package org.apache.myfaces.extensions.validator.core.validation.strategy.mapper;
 
 import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
@@ -32,7 +33,7 @@
  */
 @UsageInformation({UsageCategory.INTERNAL, UsageCategory.CUSTOMIZABLE})
 public class CustomConfiguredAnnotationToValidationStrategyNameMapper extends
-    AbstractCustomNameMapper<String>
+    AbstractCustomNameMapper<MetaDataEntry>
 {
     protected String getCustomNameMapperClassName()
     {

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConventionAnnotationToValidationStrategyNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConventionAnnotationToValidationStrategyNameMapper.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConventionAnnotationToValidationStrategyNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConventionAnnotationToValidationStrategyNameMapper.java Mon Feb  2 15:35:57 2009
@@ -21,6 +21,7 @@
 import org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -35,7 +36,7 @@
  */
 @UsageInformation({UsageCategory.INTERNAL, UsageCategory.CUSTOMIZABLE})
 public class CustomConventionAnnotationToValidationStrategyNameMapper extends
-    AbstractCustomNameMapper<String>
+    AbstractCustomNameMapper<MetaDataEntry>
 {
     protected String getCustomNameMapperClassName()
     {

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/DefaultAnnotationToValidationStrategyNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/DefaultAnnotationToValidationStrategyNameMapper.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/DefaultAnnotationToValidationStrategyNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/DefaultAnnotationToValidationStrategyNameMapper.java Mon Feb  2 15:35:57 2009
@@ -19,6 +19,7 @@
 package org.apache.myfaces.extensions.validator.core.validation.strategy.mapper;
 
 import org.apache.myfaces.extensions.validator.core.InternalConventionProvider;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -31,8 +32,8 @@
 @UsageInformation(UsageCategory.INTERNAL)
 public class DefaultAnnotationToValidationStrategyNameMapper extends AbstractMetaDataToValidationStrategyNameMapper
 {
-    public String createName(String metaDataKey)
+    public String createName(MetaDataEntry metaDataEntry)
     {
-        return InternalConventionProvider.getValidationStrategyClassName(metaDataKey);
+        return InternalConventionProvider.getValidationStrategyClassName(metaDataEntry.getKey());
     }
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/SimpleAnnotationToValidationStrategyNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/SimpleAnnotationToValidationStrategyNameMapper.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/SimpleAnnotationToValidationStrategyNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/SimpleAnnotationToValidationStrategyNameMapper.java Mon Feb  2 15:35:57 2009
@@ -20,6 +20,7 @@
 
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -32,9 +33,9 @@
 @UsageInformation({UsageCategory.INTERNAL})
 public class SimpleAnnotationToValidationStrategyNameMapper extends AbstractMetaDataToValidationStrategyNameMapper
 {
-    public String createName(String metaDataKey)
+    public String createName(MetaDataEntry metaDataEntry)
     {
-        return metaDataKey +
+        return metaDataEntry.getKey() +
             ExtValContext.getContext().getInformationProviderBean().get(CustomInformation.VALIDATION_STRATEGY_POSTFIX);
     }
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java Mon Feb  2 15:35:57 2009
@@ -26,8 +26,10 @@
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
 import org.apache.myfaces.extensions.validator.core.interceptor.ValidationExceptionInterceptor;
+import org.apache.myfaces.extensions.validator.core.interceptor.MetaDataExtractionInterceptor;
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformationKeys;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
+import org.apache.myfaces.extensions.validator.core.property.PropertyInformation;
 import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.core.el.AbstractELHelperFactory;
 import org.apache.myfaces.extensions.validator.core.el.ValueBindingExpression;
@@ -60,16 +62,16 @@
     private static final String JAVAX_FACES_MAXIMUM = "javax.faces.validator.LengthValidator.MAXIMUM";
     private static final String JAVAX_FACES_MAXIMUM_DETAIL = "javax.faces.validator.LengthValidator.MAXIMUM_detail";
 
-    public static ValidationStrategy getValidationStrategyForMetaData(String metaDataKey)
+    public static ValidationStrategy getValidationStrategyForMetaDataEntry(MetaDataEntry metaDataEntry)
     {
         return ((ClassMappingFactory<Object, ValidationStrategy>) ExtValContext.getContext()
                 .getFactoryFinder()
                 .getFactory(FactoryNames.VALIDATION_STRATEGY_FACTORY, ClassMappingFactory.class))
-                .create(metaDataKey);
+                .create(metaDataEntry);
     }
 
     public static void registerMetaDataToValidationStrategyNameMapper(
-            NameMapper<String> metaDataToValidationStrategyNameMapper)
+            NameMapper<MetaDataEntry> metaDataToValidationStrategyNameMapper)
     {
         (ExtValContext.getContext()
                 .getFactoryFinder()
@@ -168,6 +170,23 @@
         return result;
     }
 
+    public static MetaDataExtractor createInterceptedMetaDataExtractor(final MetaDataExtractor metaDataExtractor)
+    {
+        return new MetaDataExtractor()
+        {
+            public PropertyInformation extract(FacesContext facesContext, Object object)
+            {
+                PropertyInformation result = metaDataExtractor.extract(facesContext, object);
+                for(MetaDataExtractionInterceptor metaDataExtractionInterceptor :
+                        ExtValContext.getContext().getMetaDataExtractionInterceptors())
+                {
+                    metaDataExtractionInterceptor.afterExtracting(result);
+                }
+                return result;
+            }
+        };
+    }
+
     public static MessageResolver getMessageResolverForValidationStrategy(ValidationStrategy validationStrategy)
     {
         return ((ClassMappingFactory<ValidationStrategy, MessageResolver>)ExtValContext.getContext()

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/annotation/extractor/DefaultPropertyScanningMetaDataExtractor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/annotation/extractor/DefaultPropertyScanningMetaDataExtractor.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/annotation/extractor/DefaultPropertyScanningMetaDataExtractor.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/annotation/extractor/DefaultPropertyScanningMetaDataExtractor.java Mon Feb  2 15:35:57 2009
@@ -23,10 +23,12 @@
 import org.apache.myfaces.extensions.validator.core.property.DefaultPropertyInformation;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.myfaces.extensions.validator.core.metadata.extractor.DefaultComponentMetaDataExtractor;
+import org.apache.myfaces.extensions.validator.core.metadata.extractor.MetaDataExtractor;
 import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 
 import javax.faces.context.FacesContext;
 
@@ -37,6 +39,15 @@
 @UsageInformation(UsageCategory.INTERNAL)
 public class DefaultPropertyScanningMetaDataExtractor extends DefaultComponentMetaDataExtractor
 {
+    private DefaultPropertyScanningMetaDataExtractor()
+    {
+    }
+
+    public static MetaDataExtractor getInstance()
+    {
+        return ExtValUtils.createInterceptedMetaDataExtractor(new DefaultPropertyScanningMetaDataExtractor());
+    }
+
     @Override
     @ToDo(Priority.MEDIUM)
     public PropertyInformation extract(FacesContext facesContext, Object object)

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/JoinMetaDataTransformer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/JoinMetaDataTransformer.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/JoinMetaDataTransformer.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/JoinMetaDataTransformer.java Mon Feb  2 15:35:57 2009
@@ -42,7 +42,7 @@
 {
     public Map<String, Object> convertMetaData(MetaDataEntry metaDataEntry)
     {
-        MetaDataExtractor extractor = new DefaultPropertyScanningMetaDataExtractor();
+        MetaDataExtractor extractor = DefaultPropertyScanningMetaDataExtractor.getInstance();
 
         String[] targetExpressions = metaDataEntry.getValue(JoinValidation.class).value();
 
@@ -60,7 +60,7 @@
             for (MetaDataEntry entry : extractor.extract(FacesContext.getCurrentInstance(),
                 propertyDetails).getMetaDataEntries())
             {
-                validationStrategy = ExtValUtils.getValidationStrategyForMetaData(entry.getKey());
+                validationStrategy = ExtValUtils.getValidationStrategyForMetaDataEntry(entry);
 
                 metaDataTransformer = ExtValUtils.getMetaDataTransformerForValidationStrategy(validationStrategy);
 

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/PatternMetaDataTransformer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/PatternMetaDataTransformer.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/PatternMetaDataTransformer.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/PatternMetaDataTransformer.java Mon Feb  2 15:35:57 2009
@@ -49,8 +49,14 @@
         String validationErrorMsgKey = (annotation).validationErrorMsgKey();
         Locale currentLocale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
 
+        MetaDataEntry tmpMetaDataEntry = new MetaDataEntry();
+        tmpMetaDataEntry.setKey(annotation.annotationType().getName());
+        tmpMetaDataEntry.setValue(annotation);
+        //needed for jsr303 integration
+        tmpMetaDataEntry.setProperties(metaDataEntry.getProperties());
+
         ValidationStrategy validationStrategy =
-            ExtValUtils.getValidationStrategyForMetaData(annotation.annotationType().getName());
+            ExtValUtils.getValidationStrategyForMetaDataEntry(tmpMetaDataEntry);
 
         String validationErrorMsg = ExtValUtils.getMessageResolverForValidationStrategy(validationStrategy)
             .getMessage(validationErrorMsgKey, currentLocale);

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java?rev=740008&r1=740007&r2=740008&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java Mon Feb  2 15:35:57 2009
@@ -44,7 +44,7 @@
             UIComponent uiComponent, MetaDataEntry metaDataEntry,
             Object convertedObject) throws ValidatorException
     {
-        MetaDataExtractor extractor = new DefaultPropertyScanningMetaDataExtractor();
+        MetaDataExtractor extractor = DefaultPropertyScanningMetaDataExtractor.getInstance();
 
         String[] targetExpressions = metaDataEntry.getValue(JoinValidation.class).value();
 
@@ -58,7 +58,7 @@
 
             for (MetaDataEntry entry : extractor.extract(facesContext, propertyDetails).getMetaDataEntries())
             {
-                validationStrategy = ExtValUtils.getValidationStrategyForMetaData(entry.getKey());
+                validationStrategy = ExtValUtils.getValidationStrategyForMetaDataEntry(entry);
 
                 if (validationStrategy != null)
                 {



Mime
View raw message