myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r763239 - in /myfaces/extensions/validator/trunk: component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/ core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/...
Date Wed, 08 Apr 2009 13:28:25 GMT
Author: gpetracek
Date: Wed Apr  8 13:28:24 2009
New Revision: 763239

URL: http://svn.apache.org/viewvc?rev=763239&view=rev
Log:
refactoring of target scanning

Modified:
    myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
    myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java
    myfaces/extensions/validator/trunk/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java

Modified: myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java?rev=763239&r1=763238&r2=763239&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
(original)
+++ myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java
Wed Apr  8 13:28:24 2009
@@ -29,8 +29,6 @@
 import org.apache.myfaces.extensions.validator.trinidad.renderkit.ExtValTrinidadRendererProxy;
 import org.apache.myfaces.extensions.validator.trinidad.interceptor.TrinidadValidationExceptionInterceptor;
 import org.apache.myfaces.extensions.validator.trinidad.interceptor.TrinidadRendererInterceptor;
-import org.apache.myfaces.extensions.validator.internal.Priority;
-import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -43,7 +41,6 @@
 @UsageInformation(UsageCategory.INTERNAL)
 public class TrinidadModuleStartupListener extends AbstractStartupListener
 {
-    @ToDo(value = Priority.MEDIUM, description = "web.xml parameter to deactivate it")
     protected void init()
     {
         initTrinidadSupport();

Modified: myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java?rev=763239&r1=763238&r2=763239&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java
(original)
+++ myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/metadata/extractor/DefaultComponentMetaDataExtractor.java
Wed Apr  8 13:28:24 2009
@@ -107,19 +107,9 @@
             addPropertyAccessAnnotations(currentClass, propertyDetails.getProperty(), propertyInformation);
             addFieldAccessAnnotations(currentClass, propertyDetails.getProperty(), propertyInformation);
 
-            currentClass = currentClass.getSuperclass();
-        }
-
-        for (Class currentInterface : entityClass.getInterfaces())
-        {
-            currentClass = currentInterface;
+            processInterfaces(currentClass, propertyDetails, propertyInformation);
 
-            while (currentClass != null)
-            {
-                addPropertyAccessAnnotations(currentClass, propertyDetails.getProperty(),
propertyInformation);
-
-                currentClass = currentClass.getSuperclass();
-            }
+            currentClass = currentClass.getSuperclass();
         }
 
         if(logger.isTraceEnabled())
@@ -130,6 +120,17 @@
         return propertyInformation;
     }
 
+    private void processInterfaces(
+            Class currentClass, PropertyDetails propertyDetails, PropertyInformation propertyInformation)
+    {
+        for (Class currentInterface : currentClass.getInterfaces())
+        {
+            addPropertyAccessAnnotations(currentInterface, propertyDetails.getProperty(),
propertyInformation);
+
+            processInterfaces(currentInterface, propertyDetails, propertyInformation);
+        }
+    }
+
     protected void addPropertyAccessAnnotations(Class entity, String property,
                                                 PropertyInformation propertyInformation)
     {

Modified: myfaces/extensions/validator/trunk/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/trunk/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java?rev=763239&r1=763238&r2=763239&view=diff
==============================================================================
--- myfaces/extensions/validator/trunk/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java
(original)
+++ myfaces/extensions/validator/trunk/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java
Wed Apr  8 13:28:24 2009
@@ -18,8 +18,6 @@
  */
 package org.apache.myfaces.extensions.validator.crossval.annotation;
 
-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;
 
@@ -36,7 +34,6 @@
  */
 @Target({METHOD, FIELD})
 @Retention(RUNTIME)
-@ToDo(value = Priority.MEDIUM, description = "DateIsEntry (valueOf, type)")
 @UsageInformation(UsageCategory.API)
 public @interface DateIs
 {



Mime
View raw message