myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r920972 - in /myfaces/extensions/validator/branches/branch_for_jsf_1_1: component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ core/src/main/java/org/apache/myfaces/extensions/validator/co...
Date Tue, 09 Mar 2010 16:38:31 GMT
Author: gpetracek
Date: Tue Mar  9 16:38:30 2010
New Revision: 920972

URL: http://svn.apache.org/viewvc?rev=920972&view=rev
Log:
EXTVAL-87 first step

Added:
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java
Modified:
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRenderKit.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRendererWrapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/DefaultELHelper.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/extractor/DefaultComponentMetaDataExtractor.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/DefaultMetaDataTransformerFactory.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/DefaultValidationStrategyToMetaDataTransformerNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/SimpleValidationStrategyToMetaDataTransformerNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererProxy.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/DefaultValidationStrategyToMsgResolverNameMapper.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ClassUtils.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/core/src/main/java/org/apache/myfaces/extensions/validator/util/ReflectionUtils.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/BeanValidationModuleValidationInterceptorInternals.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/annotation/extractor/DefaultGroupControllerScanningExtractor.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/JoinValidationMetaDataStorageFilter.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/strategy/JoinValidationStrategy.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/LocalCompareStrategy.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/util/PropertyValidationUtils.java

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRenderKit.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRenderKit.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRenderKit.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRenderKit.java Tue Mar  9 16:38:30 2010
@@ -21,6 +21,7 @@ package org.apache.myfaces.extensions.va
 import org.apache.myfaces.extensions.validator.core.renderkit.ExtValRenderKit;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import javax.faces.render.RenderKit;
 import javax.faces.render.Renderer;
@@ -42,8 +43,7 @@ public class ExtValGenericRenderKit exte
         Class currentClass = renderKit.getClass();
 
         //it's not possible to wrap the converter again - occurs e.g. under solaris + bea weblogic
-        if (currentClass.getName().contains("$$EnhancerByCGLIB$$")
-            || currentClass.getName().contains("$$FastClassByCGLIB$$"))
+        if (ProxyUtils.isProxiedClass(currentClass))
         {
             return renderKit;
         }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRendererWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRendererWrapper.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRendererWrapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ExtValGenericRendererWrapper.java Tue Mar  9 16:38:30 2010
@@ -21,6 +21,7 @@ package org.apache.myfaces.extensions.va
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -43,8 +44,7 @@ public final class ExtValGenericRenderer
         Class currentClass = renderer.getClass();
 
         //to avoid re-wrapping - occurs e.g. under solaris + bea weblogic
-        if (currentClass.getName().contains("$$EnhancerByCGLIB$$") ||
-            currentClass.getName().contains("$$FastClassByCGLIB$$"))
+        if (ProxyUtils.isProxiedClass(currentClass))
         {
             return renderer;
         }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/DefaultELHelper.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/el/DefaultELHelper.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/DefaultELHelper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/DefaultELHelper.java Tue Mar  9 16:38:30 2010
@@ -24,6 +24,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 import org.apache.myfaces.extensions.validator.util.ReflectionUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -65,7 +66,7 @@ public class DefaultELHelper implements 
     {
         //due to a restriction with the ri
         Object bean = getValueOfExpression(facesContext, valueBindingExpression);
-        return (bean != null) ? bean.getClass() : null;
+        return (bean != null) ? ProxyUtils.getUnproxiedClass(bean.getClass()) : null;
     }
 
     public Object getBean(String beanName)
@@ -198,10 +199,12 @@ public class DefaultELHelper implements 
 
         Method currentMethod;
         String currentPropertyName;
+        Class currentClassOfPropertyValue;
         for(int i = 1; i < properties.length; i++)
         {
             currentPropertyName = properties[i];
-            currentMethod = ReflectionUtils.tryToGetMethod(currentPropertyValue.getClass(),
+            currentClassOfPropertyValue = ProxyUtils.getUnproxiedClass(currentPropertyValue.getClass());
+            currentMethod = ReflectionUtils.tryToGetMethod(currentClassOfPropertyValue,
                 "get" + currentPropertyName.substring(0, 1).toUpperCase() + currentPropertyName.substring(1));
 
             if(currentMethod == null && currentPropertyValue instanceof Map)

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=920972&r1=920971&r2=920972&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 Tue Mar  9 16:38:30 2010
@@ -29,6 +29,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformation;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import javax.faces.context.FacesContext;
 import javax.faces.component.UIComponent;
@@ -171,10 +172,11 @@ public class ValidationInterceptor exten
     {
         if(value == null)
         {
-            return validationStrategy.getClass().isAnnotationPresent(NullValueAwareValidationStrategy.class);
+            Class validationStrategyClass = ProxyUtils.getUnproxiedClass(validationStrategy.getClass());
+            return validationStrategyClass.isAnnotationPresent(NullValueAwareValidationStrategy.class);
         }
 
-        return !"".equals(value) || validationStrategy.getClass()
+        return !"".equals(value) || ProxyUtils.getUnproxiedClass(validationStrategy.getClass())
                 .isAnnotationPresent(EmptyValueAwareValidationStrategy.class);
     }
 

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.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/DefaultComponentMetaDataExtractor.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java Tue Mar  9 16:38:30 2010
@@ -33,6 +33,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -99,7 +100,7 @@ public class DefaultComponentMetaDataExt
         /*
          * get bean class and property name
          */
-        Class entityClass = propertyDetails.getBaseObject().getClass();
+        Class entityClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());
 
         //create
         propertyInformation.setInformation(PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/DefaultMetaDataTransformerFactory.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/transformer/DefaultMetaDataTransformerFactory.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/DefaultMetaDataTransformerFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/DefaultMetaDataTransformerFactory.java Tue Mar  9 16:38:30 2010
@@ -33,6 +33,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.metadata.transformer.mapper.
         ValidationStrategyToMetaDataTransformerSubMapperAwareNameMapper;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.commons.logging.Log;
@@ -103,7 +104,7 @@ public class DefaultMetaDataTransformerF
                                         .getValidationStrategyClassName();
         }
 
-        return !isProxyDetected ? validationStrategy.getClass().getName() : null;
+        return !isProxyDetected ? ProxyUtils.getClassName(validationStrategy.getClass()) : null;
     }
 
     private void tryToInitStaticMappings()

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/DefaultValidationStrategyToMetaDataTransformerNameMapper.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/transformer/mapper/DefaultValidationStrategyToMetaDataTransformerNameMapper.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/DefaultValidationStrategyToMetaDataTransformerNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/DefaultValidationStrategyToMetaDataTransformerNameMapper.java Tue Mar  9 16:38:30 2010
@@ -23,6 +23,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.InvocationOrder;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 /**
  * Default implementation which maps ExtVal ValidationStrategies to MetaDataTransformers.
@@ -37,8 +38,12 @@ public class DefaultValidationStrategyTo
 {
     public String createName(ValidationStrategy validationStrategy)
     {
+        Class<? extends ValidationStrategy> validationStrategyClass =
+                ProxyUtils.getUnproxiedClass(validationStrategy.getClass(), ValidationStrategy.class);
+
         return InternalConventionProvider.getMetaDataTransformerClassName(
-                validationStrategy.getClass(), getClassName(validationStrategy.getClass().getSimpleName()));
+                validationStrategyClass,
+                getClassName(validationStrategyClass.getSimpleName()));
     }
 
     protected String getClassName(String validationStrategyClassName)

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/SimpleValidationStrategyToMetaDataTransformerNameMapper.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/transformer/mapper/SimpleValidationStrategyToMetaDataTransformerNameMapper.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/SimpleValidationStrategyToMetaDataTransformerNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/transformer/mapper/SimpleValidationStrategyToMetaDataTransformerNameMapper.java Tue Mar  9 16:38:30 2010
@@ -24,6 +24,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.InvocationOrder;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 /**
  * It's an alternative Mapper to place ValidationStrategies and MetaDataTransformers in the same package.
@@ -38,12 +39,15 @@ public class SimpleValidationStrategyToM
 {
     public String createName(ValidationStrategy validationStrategy)
     {
-        if(validationStrategy.getClass().getPackage() == null)
+        Class<? extends ValidationStrategy> validationStrategyClass =
+                ProxyUtils.getUnproxiedClass(validationStrategy.getClass(), ValidationStrategy.class);
+
+        if(validationStrategyClass.getPackage() == null)
         {
             return null;
         }
-        return getSimpleMetaDataTransformerName(validationStrategy.getClass().getPackage().getName() + ".",
-                                                validationStrategy.getClass().getSimpleName());
+        return getSimpleMetaDataTransformerName(validationStrategyClass.getPackage().getName() + ".",
+                                                validationStrategyClass.getSimpleName());
     }
 
     public String getSimpleMetaDataTransformerName(String validationStrategyPackageName,

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererProxy.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/renderkit/ExtValRendererProxy.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererProxy.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererProxy.java Tue Mar  9 16:38:30 2010
@@ -24,6 +24,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.storage.RendererProxyStorage;
 import org.apache.myfaces.extensions.validator.core.JsfProjectStage;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -248,7 +249,7 @@ public class ExtValRendererProxy extends
 
     protected String getRendererKey()
     {
-        return this.wrapped.getClass().getName();
+        return ProxyUtils.getClassName(this.wrapped.getClass());
     }
 
     private RendererProxyStorage getRendererStorage()

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.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/storage/AbstractStorageManager.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java Tue Mar  9 16:38:30 2010
@@ -21,6 +21,7 @@ package org.apache.myfaces.extensions.va
 import org.apache.myfaces.extensions.validator.core.factory.AbstractNameMapperAwareFactory;
 import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import static org.apache.myfaces.extensions.validator.internal.UsageCategory.REUSE;
 import org.apache.commons.logging.Log;
@@ -95,7 +96,7 @@ public abstract class AbstractStorageMan
 
         if(storageMap != null && storageMap.containsKey(storageKey))
         {
-            Class storageClass = storageMap.get(storageKey).getClass();
+            Class storageClass = ProxyUtils.getUnproxiedClass(storageMap.get(storageKey).getClass());
             storageMap.put(storageKey, (T)ClassUtils.tryToInstantiateClass(storageClass));
         }
     }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.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/storage/DefaultMetaDataStorage.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java Tue Mar  9 16:38:30 2010
@@ -31,6 +31,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -96,7 +97,7 @@ public class DefaultMetaDataStorage impl
 
         copyMetaData(propertyInformation, propertyInformationToStore);
 
-        getMapForClass(propertyDetails.getBaseObject().getClass())
+        getMapForClass(ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass()))
                 .put(propertyDetails.getProperty(), propertyInformationToStore);
     }
 
@@ -137,14 +138,14 @@ public class DefaultMetaDataStorage impl
 
     private boolean isFilterDenied(MetaDataStorageFilter storageFilter)
     {
-        return this.deniedMetaDataFilters.contains(storageFilter.getClass());
+        return this.deniedMetaDataFilters.contains(getStorageFilterClass(storageFilter));
     }
 
     private boolean isFilterAlreadyRegistered(MetaDataStorageFilter storageFilter)
     {
         for(MetaDataStorageFilter filter : this.metaDataStorageFilters)
         {
-            if(filter.getClass().equals(storageFilter.getClass()))
+            if(filter.getClass().equals(getStorageFilterClass(storageFilter)))
             {
                 return true;
             }
@@ -213,11 +214,16 @@ public class DefaultMetaDataStorage impl
 
     private Map<String, PropertyInformation> getMapForClass(Class target)
     {
-        String key = ClassUtils.getClassName(target);
+        String key = ProxyUtils.getClassName(target);
         if(!this.cachedPropertyInformation.containsKey(key))
         {
             this.cachedPropertyInformation.put(key, new HashMap<String, PropertyInformation>());
         }
         return this.cachedPropertyInformation.get(key);
     }
+
+    private Class<? extends MetaDataStorageFilter> getStorageFilterClass(MetaDataStorageFilter storageFilter)
+    {
+        return ProxyUtils.getUnproxiedClass(storageFilter.getClass(), MetaDataStorageFilter.class);
+    }
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.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/storage/DefaultPropertyStorage.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java Tue Mar  9 16:38:30 2010
@@ -22,7 +22,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.extensions.validator.internal.UsageCategory.INTERNAL;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
-import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -73,7 +73,7 @@ public class DefaultPropertyStorage impl
 
     private Map<String, Field> getFieldMapForClass(Class target)
     {
-        String key = ClassUtils.getClassName(target);
+        String key = ProxyUtils.getClassName(target);
         if (!this.fieldMap.containsKey(key))
         {
             this.fieldMap.put(key, new HashMap<String, Field>());
@@ -83,11 +83,11 @@ public class DefaultPropertyStorage impl
 
     private Map<String, Method> getMethodMapForClass(Class target)
     {
-        String key = ClassUtils.getClassName(target);
+        String key = ProxyUtils.getClassName(target);
         if (!this.methodMap.containsKey(key))
         {
             this.methodMap.put(key, new HashMap<String, Method>());
         }
         return this.methodMap.get(key);
     }
-}
\ No newline at end of file
+}

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.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/message/resolver/DefaultMessageResolverFactory.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java Tue Mar  9 16:38:30 2010
@@ -27,6 +27,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.initializer.configuration.StaticConfigurationNames;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
@@ -65,7 +66,7 @@ public class DefaultMessageResolverFacto
 
     public MessageResolver create(ValidationStrategy validationStrategy)
     {
-        String strategyName = validationStrategy.getClass().getName();
+        String strategyName = ProxyUtils.getClassName(validationStrategy.getClass());
 
         if (strategyMessageResolverMapping == null)
         {
@@ -86,7 +87,7 @@ public class DefaultMessageResolverFacto
             resolverName = nameMapper.createName(validationStrategy);
 
             //name wasn't mapped
-            if (resolverName == null || validationStrategy.getClass().getName().equals(resolverName))
+            if (resolverName == null || ProxyUtils.getClassName(validationStrategy.getClass()).equals(resolverName))
             {
                 continue;
             }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/DefaultValidationStrategyToMsgResolverNameMapper.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/message/resolver/mapper/DefaultValidationStrategyToMsgResolverNameMapper.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/DefaultValidationStrategyToMsgResolverNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/DefaultValidationStrategyToMsgResolverNameMapper.java Tue Mar  9 16:38:30 2010
@@ -23,6 +23,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.InvocationOrder;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 /**
  * Default implementation which maps ExtVal ValidationStrategies to ExtVal MessageResolvers.
@@ -37,8 +38,10 @@ public class DefaultValidationStrategyTo
 {
     public String createName(ValidationStrategy validationStrategy)
     {
-        return InternalConventionProvider.getMessageResolverClassName(validationStrategy.getClass(),
-                                                     getClassName(validationStrategy.getClass().getSimpleName()));
+        Class<? extends ValidationStrategy> validationStrategyClass = ProxyUtils
+                .getUnproxiedClass(validationStrategy.getClass(), ValidationStrategy.class);
+        return InternalConventionProvider.getMessageResolverClassName(validationStrategyClass,
+                                                     getClassName(validationStrategyClass.getSimpleName()));
     }
 
     protected String getClassName(String strategyClassName)

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ClassUtils.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/ClassUtils.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ClassUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ClassUtils.java Tue Mar  9 16:38:30 2010
@@ -120,19 +120,4 @@ public class ClassUtils
             return null;
         }
     }
-
-    public static String getClassName(Class currentClass)
-    {
-        if (isProxiedClass(currentClass))
-        {
-            return currentClass.getName().substring(0, currentClass.getName().indexOf("$"));
-        }
-        return currentClass.getName();
-    }
-
-    public static boolean isProxiedClass(Class currentClass)
-    {
-        return currentClass.getName().contains("$$EnhancerByCGLIB$$")
-            || currentClass.getName().contains("$$FastClassByCGLIB$$");
-    }
 }

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=920972&r1=920971&r2=920972&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 Tue Mar  9 16:38:30 2010
@@ -750,7 +750,8 @@ public class ExtValUtils
     {
         return metaData.isEmpty() ||
                 (Boolean.TRUE.equals(entry.getProperty(PropertyInformationKeys.SKIP_VALIDATION, Boolean.class)) &&
-                        isSkipableValidationStrategy(validationStrategy.getClass()));
+                        isSkipableValidationStrategy(ProxyUtils.getUnproxiedClass(
+                                validationStrategy.getClass(), ValidationStrategy.class)));
     }
 
     public static boolean interpretEmptyStringValuesAsNull()

Added: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.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/ProxyUtils.java?rev=920972&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java Tue Mar  9 16:38:30 2010
@@ -0,0 +1,60 @@
+/*
+ * 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.util;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+/**
+ * @author Gerhard Petracek
+ * @since x.x.3
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class ProxyUtils
+{
+    public static <T> Class<T> getUnproxiedClass(Class currentClass, Class<T> targetType)
+    {
+        return (Class<T>)getUnproxiedClass(currentClass);
+    }
+
+    public static Class getUnproxiedClass(Class currentClass)
+    {
+        if(isProxiedClass(currentClass))
+        {
+            return ClassUtils.tryToLoadClassForName(getClassName(currentClass));
+        }
+        return currentClass;
+    }
+
+    public static String getClassName(Class proxiedClass)
+    {
+        if (isProxiedClass(proxiedClass))
+        {
+            return proxiedClass.getName().substring(0, proxiedClass.getName().indexOf("$"));
+        }
+        return proxiedClass.getName();
+    }
+
+    public static boolean isProxiedClass(Class currentClass)
+    {
+        return currentClass.getName().contains("$$EnhancerByCGLIB$$")
+            || currentClass.getName().contains("$$FastClassByCGLIB$$");
+    }
+
+}

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ReflectionUtils.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/ReflectionUtils.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ReflectionUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ReflectionUtils.java Tue Mar  9 16:38:30 2010
@@ -185,7 +185,7 @@ public class ReflectionUtils
             }
 
             //no is - it's only possible at properties not at bean level
-            currentMethod = tryToGetMethod(currentBase.getClass(),
+            currentMethod = tryToGetMethod(ProxyUtils.getUnproxiedClass(currentBase.getClass()),
                 "get" + currentProperty.substring(0, 1).toUpperCase() +
                     currentProperty.substring(1, currentProperty.length()));
             currentBase = tryToInvokeMethod(currentBase, currentMethod);

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/BeanValidationModuleValidationInterceptorInternals.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/BeanValidationModuleValidationInterceptorInternals.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/BeanValidationModuleValidationInterceptorInternals.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/BeanValidationModuleValidationInterceptorInternals.java Tue Mar  9 16:38:30 2010
@@ -31,7 +31,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
-import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -98,8 +98,11 @@ class BeanValidationModuleValidationInte
             foundGroups = new Class[]{Default.class};
         }
 
-        ElementDescriptor elementDescriptor = getDescriptorFor(
-                propertyDetails.getBaseObject().getClass(), propertyDetails.getProperty());
+        Class targetClass = propertyDetails.getBaseObject().getClass();
+
+        targetClass = ProxyUtils.getUnproxiedClass(targetClass);
+
+        ElementDescriptor elementDescriptor = getDescriptorFor(targetClass, propertyDetails.getProperty());
 
         if (elementDescriptor == null)
         {
@@ -190,7 +193,9 @@ class BeanValidationModuleValidationInte
     {
         PropertyDetails propertyDetails = ExtValUtils.getPropertyDetails(propertyInformation);
 
-        return getDescriptorFor(propertyDetails.getBaseObject().getClass(), propertyDetails.getProperty()) != null;
+        Class targetClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());
+
+        return getDescriptorFor(targetClass, propertyDetails.getProperty()) != null;
     }
 
     @SuppressWarnings({"unchecked"})
@@ -223,11 +228,7 @@ class BeanValidationModuleValidationInte
     {
         Class result = ExtValUtils.getPropertyDetails(propertyInformation).getBaseObject().getClass();
 
-        if(ClassUtils.isProxiedClass(result))
-        {
-            result = ClassUtils.tryToLoadClassForName(ClassUtils.getClassName(result));
-        }
-        return result;
+        return ProxyUtils.getUnproxiedClass(result);
     }
 
     String getPropertyToValidate(PropertyInformation propertyInformation)

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/annotation/extractor/DefaultGroupControllerScanningExtractor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/annotation/extractor/DefaultGroupControllerScanningExtractor.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/annotation/extractor/DefaultGroupControllerScanningExtractor.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/annotation/extractor/DefaultGroupControllerScanningExtractor.java Tue Mar  9 16:38:30 2010
@@ -27,6 +27,7 @@ import org.apache.myfaces.extensions.val
 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.ProxyUtils;
 
 import javax.faces.context.FacesContext;
 
@@ -48,7 +49,7 @@ public class DefaultGroupControllerScann
 
         PropertyDetails propertyDetails = (PropertyDetails)object;
 
-        Class entityClass = propertyDetails.getBaseObject().getClass();
+        Class entityClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());
 
         PropertyInformation propertyInformation = new DefaultPropertyInformation();
         propertyInformation.setInformation(PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java Tue Mar  9 16:38:30 2010
@@ -33,9 +33,11 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.validation.message.FacesMessageHolder;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.ToDo;
+import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 import org.apache.myfaces.extensions.validator.util.ReflectionUtils;
-import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
@@ -201,12 +203,7 @@ class ExtValBeanValidationMetaDataIntern
                               List<Class> restrictedGroupsForModelValidation,
                               boolean processModelValidation)
     {
-        Class classToInspect = objectToInspect.getClass();
-
-        if(ClassUtils.isProxiedClass(classToInspect))
-        {
-            classToInspect = ClassUtils.tryToLoadClassForName(ClassUtils.getClassName(classToInspect));
-        }
+        Class classToInspect = ProxyUtils.getUnproxiedClass(objectToInspect.getClass());
 
         while (!Object.class.getName().equals(classToInspect.getName()))
         {
@@ -289,17 +286,20 @@ class ExtValBeanValidationMetaDataIntern
     private Object getValueOfProperty(Object base, String property)
     {
         property = property.substring(0, 1).toUpperCase() + property.substring(1, property.length());
-        Method targetMethod = ReflectionUtils.tryToGetMethod(base.getClass(), "get" + property);
+
+        Class targetClass = ProxyUtils.getUnproxiedClass(base.getClass());
+
+        Method targetMethod = ReflectionUtils.tryToGetMethod(targetClass, "get" + property);
 
         if (targetMethod == null)
         {
-            targetMethod = ReflectionUtils.tryToGetMethod(base.getClass(), "is" + property);
+            targetMethod = ReflectionUtils.tryToGetMethod(targetClass, "is" + property);
         }
 
         if (targetMethod == null)
         {
             throw new IllegalStateException(
-                    "class " + base.getClass() + " has no public get/is " + property.toLowerCase());
+                    "class " + targetClass + " has no public get/is " + property.toLowerCase());
         }
         return ReflectionUtils.tryToInvokeMethod(base, targetMethod);
     }
@@ -360,6 +360,7 @@ class ExtValBeanValidationMetaDataIntern
         }
     }
 
+    @ToDo(value = Priority.MEDIUM, description = "test proxy support")
     private void transferGroupValidationInformationToFoundGroups(
             Object objectToInspect,
             List<Class> foundGroupsForPropertyValidation,

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/JoinValidationMetaDataStorageFilter.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/JoinValidationMetaDataStorageFilter.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/JoinValidationMetaDataStorageFilter.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/JoinValidationMetaDataStorageFilter.java Tue Mar  9 16:38:30 2010
@@ -28,6 +28,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.storage.MetaDataStorageFilter;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -177,8 +178,9 @@ public class JoinValidationMetaDataStora
     {
         PropertyDetails propertyDetails = ExtValUtils.createPropertyDetailsForNewTarget(metaDataEntry, target);
 
+        Class targetClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());
         return new StaticSyntaxMetaDataExtractor().extract(
-                propertyDetails.getBaseObject().getClass(), propertyDetails.getProperty()).getMetaDataEntries();
+                targetClass, propertyDetails.getProperty()).getMetaDataEntries();
     }
 
     private class StaticSyntaxMetaDataExtractor extends DefaultComponentMetaDataExtractor

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=920972&r1=920971&r2=920972&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 Tue Mar  9 16:38:30 2010
@@ -29,6 +29,7 @@ import org.apache.myfaces.extensions.val
 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 org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.PropertyValidationModuleKey;
 
 import javax.faces.context.FacesContext;
@@ -64,7 +65,7 @@ public class DefaultPropertyScanningMeta
 
         PropertyDetails propertyDetails = (PropertyDetails)object;
 
-        Class entityClass = propertyDetails.getBaseObject().getClass();
+        Class entityClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());
 
         //TODO test with complex components
         propertyInformation.setInformation(

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=920972&r1=920971&r2=920972&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 Tue Mar  9 16:38:30 2010
@@ -26,6 +26,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -88,7 +89,8 @@ public class JoinValidationStrategy exte
 
                 if (validationStrategy != null)
                 {
-                    if(ExtValUtils.processMetaDataEntryAfterSkipValidation(validationStrategy.getClass(), entry))
+                    if(ExtValUtils.processMetaDataEntryAfterSkipValidation(ProxyUtils.getUnproxiedClass(
+                            validationStrategy.getClass(), ValidationStrategy.class), entry))
                     {
                         continue;
                     }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.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/crossval/CrossValidationPhaseListener.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java Tue Mar  9 16:38:30 2010
@@ -22,6 +22,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.util.JsfUtils;
 import org.apache.myfaces.extensions.validator.util.ReflectionUtils;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCrossValidationStrategy;
@@ -79,7 +80,7 @@ public class CrossValidationPhaseListene
                         ReflectionUtils.tryToInvokeMethod(
                                 entry.getValidationStrategy(),
                                 ReflectionUtils.tryToGetMethod(
-                                        entry.getValidationStrategy().getClass(),
+                                        ProxyUtils.getUnproxiedClass(entry.getValidationStrategy().getClass()),
                                         "initCrossValidation",
                                         CrossValidationStorageEntry.class),
                                 entry);
@@ -101,7 +102,7 @@ public class CrossValidationPhaseListene
                             addMessage = (Boolean)ReflectionUtils.tryToInvokeMethod(
                                     entry.getValidationStrategy(),
                                     ReflectionUtils.tryToGetMethod(
-                                            entry.getValidationStrategy().getClass(),
+                                            ProxyUtils.getUnproxiedClass(entry.getValidationStrategy().getClass()),
                                             "processAfterCrossValidatorException",
                                             CrossValidationStorageEntry.class,
                                             validatorException.getClass()),

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/LocalCompareStrategy.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/crossval/strategy/LocalCompareStrategy.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/LocalCompareStrategy.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/LocalCompareStrategy.java Tue Mar  9 16:38:30 2010
@@ -29,6 +29,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformationKeys;
 import org.apache.myfaces.extensions.validator.util.CrossValidationUtils;
 import org.apache.myfaces.extensions.validator.util.ReflectionUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -118,11 +119,12 @@ class LocalCompareStrategy implements Re
     protected Object getValueOfProperty(Object base, String property)
     {
         property = property.substring(0,1).toUpperCase() + property.substring(1, property.length());
-        Method targetMethod = ReflectionUtils.tryToGetMethod(base.getClass(), "get" + property);
+        Class targetClass = ProxyUtils.getUnproxiedClass(base.getClass());
+        Method targetMethod = ReflectionUtils.tryToGetMethod(targetClass, "get" + property);
 
         if(targetMethod == null)
         {
-            targetMethod = ReflectionUtils.tryToGetMethod(base.getClass(), "is" + property);
+            targetMethod = ReflectionUtils.tryToGetMethod(targetClass, "is" + property);
         }
 
         if(targetMethod == null)

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/util/PropertyValidationUtils.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/util/PropertyValidationUtils.java?rev=920972&r1=920971&r2=920972&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/util/PropertyValidationUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/util/PropertyValidationUtils.java Tue Mar  9 16:38:30 2010
@@ -42,7 +42,8 @@ public class PropertyValidationUtils
                                          ValidationStrategy validationStrategy,
                                          MetaDataEntry metaDataEntry)
     {
-        if(ExtValUtils.isSkipableValidationStrategy(validationStrategy.getClass()))
+        if(ExtValUtils.isSkipableValidationStrategy(
+                ProxyUtils.getUnproxiedClass(validationStrategy.getClass(), ValidationStrategy.class)))
         {
             Boolean skipValidation = metaDataEntry.getProperty(
                 PropertyInformationKeys.SKIP_VALIDATION, Boolean.class);



Mime
View raw message