You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by rd...@apache.org on 2010/07/28 16:48:31 UTC

svn commit: r980078 - /myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/

Author: rdebusscher
Date: Wed Jul 28 14:48:31 2010
New Revision: 980078

URL: http://svn.apache.org/viewvc?rev=980078&view=rev
Log:
JavaDoc for EXTVAL-100

Modified:
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/DefaultExtValCoreConfiguration.java
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java
    myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/DefaultExtValCoreConfiguration.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/DefaultExtValCoreConfiguration.java?rev=980078&r1=980077&r2=980078&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/DefaultExtValCoreConfiguration.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/DefaultExtValCoreConfiguration.java Wed Jul 28 14:48:31 2010
@@ -28,6 +28,8 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.validation.parameter.DisableClientSideValidation;
 import org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameter;
 import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
+import org.apache.myfaces.extensions.validator.internal.Priority;
+import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
@@ -35,6 +37,9 @@ import org.apache.myfaces.extensions.val
 import java.lang.annotation.Annotation;
 
 /**
+ * Default ExtVal Core Module Configuration that retrieves most of the values from the Web.xml initialization
+ * parameters.
+ *
  * @author Gerhard Petracek
  * @since r4
  */
@@ -43,57 +48,104 @@ public class DefaultExtValCoreConfigurat
 {
     private static final String GLOBAL_PROPERTY_MODE_INIT_REQUIRED = "mode:init:required";
     private static final String GLOBAL_PROPERTY_MODE_RESET_REQUIRED = "mode:reset:required";
-    
+
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_MESSAGE_BUNDLE.
+     */
     public String customMessageBundleBaseName()
     {
         return WebXmlParameter.CUSTOM_MESSAGE_BUNDLE;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_BASE_PACKAGE.
+     */
     public String customBasePackage()
     {
         return WebXmlParameter.CUSTOM_BASE_PACKAGE;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_INFORMATION_PROVIDER_BEAN.
+     */
     public String customInformationProviderBeanClassName()
     {
         return WebXmlParameter.CUSTOM_INFORMATION_PROVIDER_BEAN;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_COMPONENT_META_DATA_EXTRACTOR.
+     */
     public String customComponentMetaDataExtractorClassName()
     {
         return WebXmlParameter.CUSTOM_COMPONENT_META_DATA_EXTRACTOR;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_VALIDATION_PARAMETER_EXTRACTOR.
+     */
     public String customValidationParameterExtractorClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_PARAMETER_EXTRACTOR;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter  CUSTOM_STATIC_VALIDATION_STRATEGY_MAPPING.
+     */
     public String customStaticValidationStrategyMappingSource()
     {
         return WebXmlParameter.CUSTOM_STATIC_VALIDATION_STRATEGY_MAPPING;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_COMPONENT_INITIALIZER.
+     */
     public String customComponentInitializerClassName()
     {
         return WebXmlParameter.CUSTOM_COMPONENT_INITIALIZER;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_VALIDATION_EXCEPTION_INTERCEPTOR.
+     */
     public String customValidationExceptionInterceptorClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_EXCEPTION_INTERCEPTOR;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_PROPERTY_VALIDATION_INTERCEPTOR.
+     */
     public String customPropertyValidationInterceptorClassName()
     {
         return WebXmlParameter.CUSTOM_PROPERTY_VALIDATION_INTERCEPTOR;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR.
+     */
     public String customMetaDataExtractionInterceptorClassName()
     {
         return WebXmlParameter.CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR;
     }
 
+    /**
+     * {@inheritDoc}
+     * Parameter taken from the Web.xml initialization parameter CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR. When no
+     * value is specified, the {@link DefaultProxyHelper} is returned.
+     */
+    @ToDo(value = Priority.MEDIUM, description = "The tryToInstantiateClassForName can return a null value which isn't "
+            + "handled correctly afyterwards.  We should throw an exception like in rendererProxy method.")
     public ProxyHelper proxyHelper()
     {
         String customProxyHelperClassName = WebXmlParameter.CUSTOM_PROXY_HELPER;
@@ -106,11 +158,21 @@ public class DefaultExtValCoreConfigurat
         return new DefaultProxyHelper();
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns always the DefaultProjectStageResolver.
+     */
     public ProjectStageResolver projectStageResolver()
     {
         return new DefaultProjectStageResolver();
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns the ExtValRendererProxy class which is configured in the global property of ExtVal. When no property
+     * defined, null is returned (which is correctly handled by the calling methods) or an exception can be thrown
+     * when the global property contains an invalid class name.
+     */
     public Class<? extends ExtValRendererProxy> rendererProxy()
     {
         String proxyClassName = (String) ExtValContext.getContext().getGlobalProperty(ExtValRendererProxy.KEY);
@@ -130,96 +192,175 @@ public class DefaultExtValCoreConfigurat
         return null;
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns always the ViolationSeverity.
+     */
     public Class violationSeverity()
     {
         return ViolationSeverity.class;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_STRATEGY_TO_MESSAGE_RESOLVER_NAME_MAPPER.
+     */
     public String customValidationStrategyToMessageResolverNameMapperClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_STRATEGY_TO_MESSAGE_RESOLVER_NAME_MAPPER;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_META_DATA_TO_VALIDATION_STRATEGY_NAME_MAPPER.
+     */
     public String customMetaDataToValidationStrategyNameMapperClassName()
     {
         return WebXmlParameter.CUSTOM_META_DATA_TO_VALIDATION_STRATEGY_NAME_MAPPER;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter
+     * CUSTOM_VALIDATION_STRATEGY_TO_META_DATA_TRANSFORMER_NAME_MAPPER.
+     */
     public String customValidationStrategyToMetaDataTransformerNameMapperClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_STRATEGY_TO_META_DATA_TRANSFORMER_NAME_MAPPER;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_META_DATA_STORAGE_FILTER.
+     */
     public String customMetaDataStorageFilterClassName()
     {
         return WebXmlParameter.CUSTOM_META_DATA_STORAGE_FILTER;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_STRATEGY_FACTORY.
+     */
     public String customValidationStrategyFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_STRATEGY_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_MESSAGE_RESOLVER_FACTORY.
+     */
     public String customMessageResolverFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_MESSAGE_RESOLVER_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_COMPONENT_META_DATA_EXTRACTOR_FACTORY.
+     */
     public String customComponentMetaDataExtractorFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_COMPONENT_META_DATA_EXTRACTOR_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_PARAMETER_EXTRACTOR_FACTORY.
+     */
     public String customValidationParameterExtractorFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_PARAMETER_EXTRACTOR_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_PARAMETER_FACTORY.
+     */
     public String customValidationParameterFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_VALIDATION_PARAMETER_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_META_DATA_TRANSFORMER_FACTORY.
+     */
     public String customMetaDataTransformerFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_META_DATA_TRANSFORMER_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_STORAGE_MANAGER_FACTORY.
+     */
     public String customStorageManagerFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_STORAGE_MANAGER_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter CUSTOM_FACES_MESSAGE_FACTORY.
+     */
     public String customFacesMessageFactoryClassName()
     {
         return WebXmlParameter.CUSTOM_FACES_MESSAGE_FACTORY;
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns the {@link ConstraintSource} class as annotation for the Constraint Source feature.  
+     */
     public Class<? extends Annotation> constraintSourceAnnotation()
     {
         return ConstraintSource.class;
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns the {@link IgnoreConstraintSource} class as annotation for the ignore feature of the Constraint Source.
+     */
     public Class<? extends Annotation> ignoreConstraintSourceAnnotation()
     {
         return IgnoreConstraintSource.class;
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns the {@link TargetProperty} class as annotation for the Constraint Source target property feature.
+     */
     public Class<? extends Annotation> targetPropertyAnnotation()
     {
         return TargetProperty.class;
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns the {@link TargetPropertyId} class as annotation for the Constraint Source target property feature.
+     */
     public Class<? extends Annotation> targetPropertyIdAnnotation()
     {
         return TargetPropertyId.class;
     }
 
+    /**
+     * {@inheritDoc}
+     * Returns the {@link DisableClientSideValidation} class as indicator for this feature.
+     */
     public Class<? extends ValidationParameter> disableClientSideValidationValidationParameter()
     {
         return DisableClientSideValidation.class;
     }
 
+    /**
+     * {@inheritDoc}
+     * First a global parameter is checked to see if the Module or Add-on hasn't overruled the value of the
+     * Web.xml initialization parameter ACTIVATE_REQUIRED_INITIALIZATION.  If overruled, this value is taken, otherwise
+     * the initialization parameter value.  By default, the method return false if there are no values specified.
+     */
     public boolean activateRequiredInitialization()
     {
         Boolean globalProperty = (Boolean)ExtValContext.getContext().getGlobalProperty(
@@ -247,37 +388,68 @@ public class DefaultExtValCoreConfigurat
         ExtValContext.getContext().addGlobalProperty(GLOBAL_PROPERTY_MODE_INIT_REQUIRED, value, forceOverride);
     }
     
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter DEACTIVATE_DEFAULT_CONVENTION.
+     */
     public boolean deactivateDefaultConvention()
     {
         return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_DEFAULT_CONVENTION);
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter DEACTIVATE_DEFAULT_NAME_MAPPERS.
+     */
     public boolean deactivateDefaultNameMappers()
     {
         String deactivateDefaultNameMappers = WebXmlParameter.DEACTIVATE_DEFAULT_NAME_MAPPERS;
         return deactivateDefaultNameMappers != null && deactivateDefaultNameMappers.equalsIgnoreCase("true");
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter DEACTIVATE_EL_RESOLVER.
+     */
     public boolean deactivateElResolver()
     {
         return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_EL_RESOLVER);
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter DEACTIVATE_COMPONENT_INITIALIZATION.
+     */
     public boolean deactivateComponentInitialization()
     {
         return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_COMPONENT_INITIALIZATION);
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter DEACTIVATE_VALIDATION_PARAMETERS.
+     */
     public boolean deactivateValidationParameters()
     {
         return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_VALIDATION_PARAMETERS);
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization parameter DEACTIVATE_RENDER_KIT_FACTORY.
+     */
     public boolean deactivateRenderKitFactory()
     {
         return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_RENDER_KIT_FACTORY);
     }
 
+    /**
+     * {@inheritDoc}
+     * First a global parameter is checked to see if some Module or Add-on hasn't overruled the value of the
+     * Web.xml initialization parameter DEACTIVATE_REQUIRED_ATTRIBUTE_SUPPORT.  If overruled, this value is taken,
+     * otherwise the initialization parameter value.  By default, the method return false if there are no values
+     * specified.
+     */
     public boolean deactivateRequiredAttributeSupport()
     {
         Boolean globalProperty = (Boolean)ExtValContext.getContext().getGlobalProperty(
@@ -305,11 +477,20 @@ public class DefaultExtValCoreConfigurat
         ExtValContext.getContext().addGlobalProperty(GLOBAL_PROPERTY_MODE_RESET_REQUIRED, value, forceOverride);
     }
     
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization (JSF 2) parameter
+     * avax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL.
+     */
     public boolean interpretEmptyStringSubmittedValuesAsNull()
     {
         return !"false".equalsIgnoreCase(WebXmlParameter.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL);
     }
 
+    /**
+     * {@inheritDoc}
+     * Value taken from the Web.xml initialization (JSF 2) parameter javax.faces.VALIDATE_EMPTY_FIELDS.
+     */
     public boolean validateEmptyFields()
     {
         return !"false".equalsIgnoreCase(WebXmlParameter.VALIDATE_EMPTY_FIELDS);

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/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_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java?rev=980078&r1=980077&r2=980078&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValContext.java Wed Jul 28 14:48:31 2010
@@ -78,9 +78,17 @@ public class ExtValContext
 
     private Map<String, Object> globalProperties = new HashMap<String, Object>();
 
+    /**
+     * Storage for all configuration objects.
+     * @since r4
+     */
     private Map<Class<? extends ExtValModuleConfiguration>, ExtValModuleConfiguration> extValConfig =
             new ConcurrentHashMap<Class<? extends ExtValModuleConfiguration>, ExtValModuleConfiguration>();
 
+    /**
+     * Configured Module Configuration resolver.
+     * @since r4
+     */
     private ExtValModuleConfigurationResolver defaultModuleConfigurationResolver;
 
     private Map<StaticConfigurationNames, List<StaticConfiguration<String, String>>> staticConfigMap
@@ -94,6 +102,18 @@ public class ExtValContext
         this.contextHelper = new ExtValContextInternals();
         this.invocationOrderAwareContextHelper = new ExtValContextInvocationOrderAwareInternals(this.contextHelper);
 
+        retrieveModuleConfigurationResolver();
+    }
+
+    /**
+     * Retrieves the Module Configuration Resolver.  Code looks first for a resolver located under the ExtVal Custom
+     * package (org.apache.myfaces.extensions.validator.custom.ExtValModuleConfigurationResolver) and then for a
+     * web.xml defined initialization parameter org.apache.myfaces.extensions.validator.core.
+     * ExtValModuleConfigurationResolver
+     * for a fully qualified class name.  The resolver configured by the web.xml overrides the custom defined one.
+     */
+    private void retrieveModuleConfigurationResolver()
+    {
         Object customExtValModuleConfigurationResolver =
                 ClassUtils.tryToInstantiateClassForName(CUSTOM_EXTVAL_MODULE_CONFIGURATION_RESOLVER_CLASS_NAME);
 
@@ -442,7 +462,18 @@ public class ExtValContext
     {
         return this.globalProperties.get(name);
     }
-    
+
+    /**
+     * Retrieves the configuration object of the type specified by the parameter 'targetType'.  The type should be
+     * direct descendants of ExtValModuleConfiguration and the same as the type you used to register the configuration
+     * (see addModuleConfiguration).
+     *
+     * @param targetType Key that specifies the type of configuration, should be direct descendants of
+     * ExtValModuleConfiguration
+     * @param <T>
+     * @return  configuration object
+     * @since r4
+     */
     public <T extends ExtValModuleConfiguration> T getModuleConfiguration(Class<T> targetType)
     {
         ExtValModuleConfiguration result = this.extValConfig.get(targetType);
@@ -451,20 +482,44 @@ public class ExtValContext
         return (T)result;
     }
 
+    /**
+     * Registers the configuration object specified in the parameter 'config' for the type 'key' within ExtVal
+     * overriding
+     * possible another registration.
+     *
+     * @param key Key that specifies the type of configuration, should be direct descendants of
+     * ExtValModuleConfiguration
+     * @param extValConfig Configuration object to register
+     * @return true
+     * @since r4
+     */
     public boolean addModuleConfiguration(Class<? extends ExtValModuleConfiguration> key,
                                           ExtValModuleConfiguration extValConfig)
     {
         return addModuleConfiguration(key, extValConfig, true);
     }
 
+    /**
+     * Registers the configuration object specified in the parameter 'config' for the type 'key' within ExtVal.  When a
+     * configuration object already exist for the key and we don't specify to override it (parameter forceOverride) the
+     * configuration isn't registered.
+     * @param key Key that specifies the type of configuration, should be direct descendants of
+     * ExtValModuleConfiguration
+     * @param config Configuration object to register
+     * @param forceOverride Do we override another custom configuration that is already registered.
+     * @return true is the configuration is registered or false if already existed and no ofrce override specified.
+     * @since r4
+     */
     public boolean addModuleConfiguration(Class<? extends ExtValModuleConfiguration> key,
                                           ExtValModuleConfiguration config,
                                           boolean forceOverride)
     {
+        // Check if it already exists.
         if (this.extValConfig.containsKey(key))
         {
             if (!forceOverride)
             {
+                // Don't forced, so not registered
                 return false;
             }
 
@@ -473,13 +528,16 @@ public class ExtValContext
 
         //anonymous class are only supported for test-cases and
         //there we don't need a custom config defined in the web.xml
+        // or from a resolver
         if(!config.getClass().isAnonymousClass())
         {
             config = tryToLoadCustomConfigImplementation(config);
         }
 
+        // Store the configuration
         this.extValConfig.put(key, config);
 
+        // Logging when in Development Stage.
         if(JsfProjectStage.is(JsfProjectStage.Development))
         {
             this.logger.info("config for key [" + config.getClass() + "] added");
@@ -488,11 +546,22 @@ public class ExtValContext
         return true;
     }
 
+    /**
+     * Tries to load a custom configuration implementation by looking for a web.xml initialization parameter. The method
+     * returns the configuration object that should be used. That is, the custom defined version or the specified
+     * as parameter of the method.
+     *
+     * @param config The configuration object for which we try to load another version
+     * @return The custom configuration object or parameter specified if no alternative found.
+     * @since r4
+     */
     private ExtValModuleConfiguration tryToLoadCustomConfigImplementation(ExtValModuleConfiguration config)
     {
-
+        // Get the parent if the parameter.  For the default version, like DefaultExtValCoreConfiguration, it is
+        // the abstract base class.
         Class configClass = config.getClass().getSuperclass();
 
+        // To be on the safe side that the parent still belongs to the configuration part of ExtVal.
         if(!ExtValModuleConfiguration.class.isAssignableFrom(configClass))
         {
             return config;
@@ -502,15 +571,18 @@ public class ExtValContext
         Class<? extends ExtValModuleConfiguration> configDefinitionClass =
                 (Class<? extends  ExtValModuleConfiguration>)configClass;
 
+        // If we have a resolver, use it to retrieve the configuration
         if(this.defaultModuleConfigurationResolver != null)
         {
             config = this.defaultModuleConfigurationResolver.getCustomConfiguration(configDefinitionClass);
         }
 
+        // Lookup the web.xml initialization parameter
         String customConfigClassName = getInitParameter(null, configDefinitionClass.getName());
 
         if(customConfigClassName != null)
         {
+            // If specified, see if it exists and can be used.
             Object customConfig = ClassUtils.tryToInstantiateClassForName(customConfigClassName);
 
             if(customConfig instanceof ExtValModuleConfiguration)
@@ -518,6 +590,7 @@ public class ExtValContext
                 return (ExtValModuleConfiguration)customConfig;
             }
         }
+        // return the parameter or resolver one.
         return config;
     }
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java?rev=980078&r1=980077&r2=980078&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java Wed Jul 28 14:48:31 2010
@@ -28,9 +28,10 @@ import java.lang.annotation.Annotation;
 import java.util.logging.Logger;
 
 /**
- * 'custom' as prefix is used for 'optional' configurations. that means
- * if a method returns null extval uses a different approach to find an implementation e.g. via a naming convention
- * -> all other methods aren't allowed to return null if there is no additional rule
+ * ExtVal Core Module configuration.
+ * 'custom' as prefix is used for 'optional' configurations. That means
+ * if a method returns null ExtVal uses a different approach to find an implementation e.g. via a naming convention
+ * -> all other methods aren't allowed to return null if there is no additional rule.
  *
  * @author Gerhard Petracek
  * @since r4
@@ -66,6 +67,12 @@ public abstract class ExtValCoreConfigur
         return extValContext;
     }
     
+    /**
+     * Retrieve the Core Module Configuration stored in the context.  If this doesn't exists (Normally the
+     * ExtValStartUpListener registers version)
+     * it returns a new default version. 
+     * @return The active ExtVal Core Module Configuration 
+     */
     public static ExtValCoreConfiguration get()
     {
         ExtValCoreConfiguration moduleConfig = getExtValContext().getModuleConfiguration(ExtValCoreConfiguration.class);
@@ -77,6 +84,12 @@ public abstract class ExtValCoreConfigur
         return moduleConfig != null ? moduleConfig : new DefaultExtValCoreConfiguration();
     }
 
+    /**
+     * Sets the active Core Module Configuration.
+     * @param config The Core Module Configuration to activate
+     * @param forceOverride if not forced and there is already a configuration active, It isn't activated 
+     * @return Is the Core Module Configuration in the parameter set as active?
+     */
     @UsageInformation(UsageCategory.INTERNAL)
     public static boolean use(ExtValCoreConfiguration config, boolean forceOverride)
     {
@@ -86,118 +99,443 @@ public abstract class ExtValCoreConfigur
     /*
      * web.xml config
      */
+    /**
+     * The name of the Resource bundle used for looking up resource keys of validation messages.
+     * 
+     * @return Fully qualified name of resource bundle.
+     * @see org.apache.myfaces.extensions.validator.core.validation.message.resolver.DefaultValidationErrorMessageResolver
+     */
     public abstract String customMessageBundleBaseName();
 
+    /**
+     * Define a new base package where custom versions of the ExtVal objects can be found.  By default, there are looked
+     * up in the package
+     * org.apache.myfaces.extensions.validator.custom
+     * 
+     * @return package name
+     * @see InformationProviderBean#setupCustomizableInformation()
+     */
     public abstract String customBasePackage();
 
+    /**
+     * Defines the class name for a custom {@link InformationProviderBean}. This class must extend the
+     * InformationProviderBean of ExtVal.
+     *   
+     * @return Fully Qualified Class name of the class to be used as InformationProviderBean 
+     * @see InformationProviderBean
+     */
     public abstract String customInformationProviderBeanClassName();
 
+    /**
+     * Defines the class name of a custom {@link
+     * org.apache.myfaces.extensions.validator.core.metadata.extractor.MetaDataExtractor}. The default implementation is
+     * DefaultComponentMetaDataExtractor.
+     * 
+     * @return Fully Qualified Class name of implementation of a MetaDataExtractor.
+     * @see org.apache.myfaces.extensions.validator.core.metadata.extractor.DefaultComponentMetaDataExtractorFactory#createWith(java.util.Map<java.lang.String,java.lang.Object>)
+     */
     public abstract String customComponentMetaDataExtractorClassName();
 
+    /**
+     * Defines the class name of a custom {@link
+     * org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractor}. The default
+     * implementation is DefaultValidationParameterExtractor.
+     * 
+     * @return Fully Qualified Class name of implementation of a ValidationParameterExtractor. 
+     * 
+     * @see org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultValidationParameterExtractorFactory#create()
+     */
     public abstract String customValidationParameterExtractorClassName();
 
+    /**
+     * Name of the property file that contains the mappings between the validation annotations and the
+     * ValidationStrategy. These mappings can be used to override the ExtVal defined ones.
+     * 
+     * @return Fully qualified name of the properties file with the mappings.
+     * @see org.apache.myfaces.extensions.validator.core.validation.strategy.DefaultValidationStrategyFactory#initStaticMappings()
+     */
     public abstract String customStaticValidationStrategyMappingSource();
 
+    /**
+     * Defines the name of an additional {@link
+     * org.apache.myfaces.extensions.validator.core.initializer.component.ComponentInitializer}.
+     * 
+     * @return Fully qualified class name of the implementation of a ComponentInitializer.
+     * @see ExtValContextInvocationOrderAwareInternals#lazyInitComponentInitializers()
+     */
     public abstract String customComponentInitializerClassName();
 
+    /**
+     * Defines the name of an additional {@link
+     * org.apache.myfaces.extensions.validator.core.interceptor.ValidationExceptionInterceptor}.
+     * 
+     * @return Fully qualified class name of the implementation of a ValidationExceptionInterceptor.
+     * @see ExtValContextInvocationOrderAwareInternals#lazyInitValidationExceptionInterceptors()
+     */
     public abstract String customValidationExceptionInterceptorClassName();
 
+    /**
+     * Defines the name of an additional {@link
+     * org.apache.myfaces.extensions.validator.core.interceptor.PropertyValidationInterceptor}.
+     * 
+     * @return Fully qualified class name of the implementation of a PropertyValidationInterceptor.
+     * @see ExtValContextInvocationOrderAwareInternals#lazyInitPropertyValidationInterceptors()
+     */
     public abstract String customPropertyValidationInterceptorClassName();
 
+    /**
+     * Defines the name of an additional {@link
+     * org.apache.myfaces.extensions.validator.core.interceptor.MetaDataExtractionInterceptor}.
+     * 
+     * @return Fully qualified class name of the implementation of a MetaDataExtractionInterceptor.
+     * @see ExtValContextInvocationOrderAwareInternals#lazyInitMetaDataExtractionInterceptors()
+     */
     public abstract String customMetaDataExtractionInterceptorClassName();
 
     /*
      * others
      */
+    
+    /**
+     * Defines the {@link ProxyHelper} that should be used by ExtVal. By default, the {@link
+     * org.apache.myfaces.extensions.validator.core.proxy.DefaultProxyHelper} is used.
+     * The method should never return null.
+     * 
+     * @return The instance of the ProxyHelper that should be used.
+     * @see org.apache.myfaces.extensions.validator.util.ProxyUtils#getProxyHelper()
+     */
     public abstract ProxyHelper proxyHelper();
 
+    /**
+     * Defines the name {@link ProjectStageResolver} that should be used by ExtVal. By default, the {@link
+     * DefaultProjectStageResolver} is used and subclasses are allowed to return null for this method.  In that case,
+     * the projectStage Production is returned.
+     * 
+     * @return The instance of the ProjectStageResolver that should be used.
+     * @see ProjectStage#getCurrentProjectStage()
+     */
     public abstract ProjectStageResolver projectStageResolver();
 
+    /**
+     * Defines the {@link org.apache.myfaces.extensions.validator.core.renderkit.RendererProxy} that should be used by
+     * ExtVal.
+     * 
+     * @return The instance of the RendererProxy that should be used.
+     * @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValLazyRendererProxy#getLazyRenderer()
+     * @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper#ExtValRendererWrapper(javax.faces.render.Renderer)
+     */
     public abstract Class<? extends ExtValRendererProxy> rendererProxy();
 
     /*
      * ConstraintSource
      */
-
+    
+    /**
+     * Defines the annotation which specifies the target class where the validation annotations should be taken from.
+     * Such an annotation needs the property value that is of type Class. By default, the
+     * {@link org.apache.myfaces.extensions.validator.core.validation.ConstraintSource} annotation is used.
+     * 
+     * @return Annotation class that identifies where the target class for validations is located.
+     * @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#findMappedClass(org.apache.myfaces.extensions.validator.core.storage.PropertyStorage, java.lang.Class, java.lang.String)
+     */
     public abstract Class<? extends Annotation> constraintSourceAnnotation();
 
+    /**
+     * Defines the annotation which indicates that for the property no validation annotations are searched in the target
+     * class, defined by the ConstraintSourceAnnotation method.  By default, the
+     * {@link org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource} annotation is used.
+     * 
+     * @return Annotation class that identifies that no validation targets need to be looked up.
+     * @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#getIgnoreConstraintSourceAnnotationImplementation()
+     */
     public abstract Class<? extends Annotation> ignoreConstraintSourceAnnotation();
 
+    /**
+     * Defines the annotation which indicates which property name (by string name) needs to be used to extract the
+     * validation annotations. Such an annotation needs the property value which is of type String. By default, the
+     * {@link org.apache.myfaces.extensions.validator.core.validation.TargetProperty} annotation is used.
+     * 
+     * @return Annotation class indicating the property name to use.
+     * @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#getTargetPropertyAnnotationImplementation()
+     */
     public abstract Class<? extends Annotation> targetPropertyAnnotation();
 
+    /**
+     * Defines the annotation which indicates the property that needs to be used to extract the validation annotations.
+     * The property should be annotated by the same annotation specified in the value property.  By default, the
+     * {@link org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId} annotation is used.
+     * 
+     * @return Annotation class indicating the property to use.
+     * @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#getTargetPropertyIdAnnotationImplementation()
+     */
     public abstract Class<? extends Annotation> targetPropertyIdAnnotation();
 
     /*
      * validation parameter
      */
 
+    /**
+     * Defines the class that is used for the definition of the violation severity. By default it is {@link
+     * org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity}.
+     * 
+     * @return Class used to identify violation severity
+     */
     public abstract Class violationSeverity();
 
+    /**
+     * Defines the validation parameter annotation which indicates that the validation information should not be placed
+     * on the UIComponents (like the length property)
+     *
+     * @return Validation parameter annotation for indicating that no validation information needs to be set on the view
+     * components.
+     * @see org.apache.myfaces.extensions.validator.core.startup.ExtValStartupListener#initDisableClientSideValidationKey()
+     */
     public abstract Class<? extends ValidationParameter> disableClientSideValidationValidationParameter();
 
     /*
      * name mapper
      */
+    /**
+     * Defines the class name of the custom {@link org.apache.myfaces.extensions.validator.core.mapper.NameMapper} that
+     * takes a ValidationStrategy and points to the MessageResolver that goes with it. The class should implement the
+     * interface NameMapper<ValidationStrategy>.
+     * 
+     * @return fully qualified class name of the custom NameMapper to retrieve MessageResolver name for a
+     * ValidationStrategy.
+     * @see org.apache.myfaces.extensions.validator.core.validation.message.resolver.mapper.CustomConfiguredValidationStrategyToMsgResolverNameMapper#getCustomNameMapperClassName()
+     */
     public abstract String customValidationStrategyToMessageResolverNameMapperClassName();
 
+    /**
+     * Defines the class name of the custom {@link org.apache.myfaces.extensions.validator.core.mapper.NameMapper} that
+     * takes a validation annotation key (=class name) and points to the ValidationStrategy that goes with it. The
+     * class should implement the interface NameMapper<String>.
+     * 
+     * @return fully qualified class name of the custom NameMapper to retrieve ValidationStrategy name for a validation
+     * key.
+     * @see org.apache.myfaces.extensions.validator.core.validation.strategy.mapper.CustomConfiguredAnnotationToValidationStrategyNameMapper#CustomConfiguredAnnotationToValidationStrategyNameMapper()
+     */
     public abstract String customMetaDataToValidationStrategyNameMapperClassName();
 
+    /**
+     * Defines the class name of the custom {@link org.apache.myfaces.extensions.validator.core.mapper.NameMapper} that
+     * takes a ValidationStrategy and points to the MetaDataTransformer that goes with it. The class should implement
+     * the interface NameMapper<ValidationStrategy>.
+     * 
+     * @return fully qualified class name of the custom NameMapper to retrieve MetaDataTransformer name for a
+     * ValidationStrategy.
+     * @see org.apache.myfaces.extensions.validator.core.metadata.transformer.mapper.CustomConfiguredValidationStrategyToMetaDataTransformerNameMapper#getCustomNameMapperClassName()
+     */
     public abstract String customValidationStrategyToMetaDataTransformerNameMapperClassName();
 
     /*
      * filter
      */
+    /**
+     * Defines the name of an additional {@link
+     * org.apache.myfaces.extensions.validator.core.storage.MetaDataStorageFilter}.
+     *
+     * 
+     * @return Fully qualified class name of the implementation of a MetaDataStorageFilter.
+     * @see org.apache.myfaces.extensions.validator.core.storage.DefaultMetaDataStorage#initFilters()
+     */
     public abstract String customMetaDataStorageFilterClassName();
 
     /*
      * factories
      */
+
+    /**
+     * Defines the class name of custom {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+     * <String,org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy>} which is
+     * responsible for creating/supplying the ValidationStrategy implementation for a certain metaData key. The default
+     * implementation is DefaultValidationStrategyFactory.
+     *
+     * @return Fully qualified class name of implementation of a ClassMappingFactory.
+     *
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationStrategyFactory()
+     */
     public abstract String customValidationStrategyFactoryClassName();
 
+    /**
+     * Defines the class name of custom {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+     * <ValidationStrategy, MessageResolver>} which is responsible for creating/supplying the MessageResolver
+     * implementation for a certain Validation Strategy. The default implementation is DefaultMessageResolverFactory.
+     *
+     * @return Fully qualified class name of implementation of a ClassMappingFactory.
+     *
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createMessageResolverFactory()
+     */
     public abstract String customMessageResolverFactoryClassName();
 
+    /**
+     * Defines the class name of a custom {@link
+     * org.apache.myfaces.extensions.validator.core.metadata.extractor.ComponentMetaDataExtractorFactory} which creates
+     * the MetaDataExtractor's. The default implementation is DefaultComponentMetaDataExtractorFactory.
+     *
+     * @return Fully qualified class name of implementation of a ComponentMetaDataExtractorFactory.
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createComponentMetaDataExtractorFactory()
+     */
     public abstract String customComponentMetaDataExtractorFactoryClassName();
 
+    /**
+     * Defines the class name of a custom {@link
+     * org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractorFactory}  which
+     * creates the ValidationParameterExtractor's. The default implementation is
+     * DefaultValidationParameterExtractorFactory.
+     *
+     * @return Fully qualified class name of implementation of a ValidationParameterExtractorFactory.
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationParameterExtractorFactory()
+     */
     public abstract String customValidationParameterExtractorFactoryClassName();
 
+    /**
+     * Defines the class name of custom {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+     * <Class, Class>} which is responsible for creating/supplying the real Validation Parameter class .
+     * The default implementation is DefaultValidationParameterFactory.
+     *
+     * @return Fully qualified class name of implementation of a ClassMappingFactory.
+     *
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationParameterFactory() 
+     */
     public abstract String customValidationParameterFactoryClassName();
 
+    /**
+     * Defines the class name of custom {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+     * <ValidationStrategy, MetaDataTransformer>} which is responsible for creating/supplying the MetaDataTransformer
+     * for a certain validationStrategy . The default implementation is DefaultMetaDataTransformerFactory.
+     *
+     * @return Fully qualified class name of implementation of a ClassMappingFactory.
+     *
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createMetaDataTransformerFactory()
+     */
     public abstract String customMetaDataTransformerFactoryClassName();
 
+    /**
+     * Defines the class name of custom {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+     * <Class, StorageManager>} which is responsible for creating/supplying the StorageManager for
+     * a Storage class. The default implementation is DefaultStorageManagerFactory.
+     *
+     * @return Fully qualified class name of implementation of a ClassMappingFactory.
+     *
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createStorageManagerFactory()
+     */
     public abstract String customStorageManagerFactoryClassName();
 
+    /**
+     * Defines the class name of a custom {@link
+     * org.apache.myfaces.extensions.validator.core.factory.FacesMessageFactory} which creates and converts
+     * FacesMessage's. The default implementation is DefaultValidationParameterExtractorFactory.
+     *
+     * @return Fully qualified class name of implementation of a FacesMessageFactory.
+     * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createFacesMessageFactory()
+     */
     public abstract String customFacesMessageFactoryClassName();
 
     /*
      * activate
      */
+
+    /**
+     * Indicates if the ComponentInitializer's should mark the UIComponent as 'required' when the Validation annotations
+     * on the property indicate that a value must be entered by the user.
+     *
+     * @return true when required attribute should be set to true.
+     * @see org.apache.myfaces.extensions.validator.core.initializer.component.AbstractHtmlCoreComponentsComponentInitializer#configureComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.util.Map<java.lang.String,java.lang.Object>)
+     */
     public abstract boolean activateRequiredInitialization();
 
     /*
      * deactivate
      */
+
+    /**
+     * Indicates if ExtVal should deactivate the usage of the resource bundle for validation messages specified in the
+     * InformationBeanProvider.
+     *
+     * @return  true when we want to deactivate resource bundle.
+     * @see org.apache.myfaces.extensions.validator.core.validation.message.resolver.AbstractValidationErrorMessageResolver#tryToUseMessageBundleConvention(java.lang.String, java.util.Locale)
+     */
     //currently just used by AbstractValidationErrorMessageResolver
     public abstract boolean deactivateDefaultConvention();
 
+    /**
+     * Indicates if ExtVal should deactivate all the internal defined name mappers. Be aware that doing so, it disrupt
+     * normal functionality of extVal when no alternative are defined.
+     *
+     * @return true when we want to deactivate internal defined name mappers.
+     * @see org.apache.myfaces.extensions.validator.core.startup.ExtValStartupListener#initNameMappers()
+     */
     public abstract boolean deactivateDefaultNameMappers();
 
+    /**
+     * Indicates if ExtVal should not use the internal ELResolver to inspect EL constructs.  If deactivated, a fallback
+     * mechanism is used that inspects the EL expression string.
+     *
+     * @return  true when we want to deactivate internal EL Resolver.
+     * @see org.apache.myfaces.extensions.validator.core.el.DefaultELHelper
+     */
     public abstract boolean deactivateElResolver();
 
+    /**
+     * Indicates that the view components don't need to be initialized using the ExtVal information.  It disables all
+     * ComponentInitializers but also the extraction of metaData during 'encoding' (render response phase) of the page.
+     *
+     * @return true if UI component should not be initialized by ExtVal.
+     * @see ExtValContextInternals#isComponentInitializationActivated()
+     * @see org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor#isComponentInitializationDeactivated()
+     */
     public abstract boolean deactivateComponentInitialization();
 
+    /**
+     * Indicates that ExtVal does not need to use a ParameterValidatorExtractor.
+     *
+     * @return true when no parameter validation extraction need to be done.
+     * @see org.apache.myfaces.extensions.validator.util.ExtValUtils#getValidationParameterExtractor()
+     */
     public abstract boolean deactivateValidationParameters();
 
+    /**
+     * Indicates that ExtVal does not create wrappers for Renderer's.
+     * TODO Find out what the possible consequences are if it is deactivated.  Trinidad support module does it by
+     * default.
+     *
+     * @return  True when we want to deactivate usage of Renderer wrappers.
+     * @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValRenderKitFactory#checkRenderKitFactoryDeactivation()
+     */
     public abstract boolean deactivateRenderKitFactory();
 
     //there is nothing like DEACTIVATE_DEFAULT_VALIDATION_INTERCEPTOR
-    //use ExtValContext.getContext().denyRendererInterceptor(...) within an extval-StartupListener
+    //use ExtValContext.getContext().denyRendererInterceptor(...) within an ExtValStartupListener
 
+    /**
+     * Indicates if ExtVal should reset the required attribute of the UIComponent after the 'decode' (apply request
+     * parameters) phase. This reset of the required attribute is only done when the setting of the attribute is
+     * activated by activateRequiredAttributeSupport.<br/>
+     * Remark, this method should be better named as activateResetRequiredAttributeSupport.
+     *
+     * @return true when we want to remove the required attribute on the UICOMpoent after decoding.
+     * @see org.apache.myfaces.extensions.validator.util.ExtValUtils#isRequiredResetActivated()
+     */
     public abstract boolean deactivateRequiredAttributeSupport();
 
     /*
      * spec parameters
      */
+
+    /**
+     * Should ExtVal interpret the empty field values on screen as null.  A new general JSF 2.0 parameter.
+     *
+     * @return true if we want backwards compatible functionality.
+     */
     public abstract boolean interpretEmptyStringSubmittedValuesAsNull();
 
+    /**
+     * Should ExtVal interpret empty fields.  If set, the required attribute can be placed (if all other requirements
+     * are met)on the UIComponent.  Other factors that have an impact on the validation of empty fields is the
+     * NullValueAwareValidationStrategy annotation.
+     *
+     * @return true if we want backwards compatible functionality.
+     */
     public abstract boolean validateEmptyFields();
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java?rev=980078&r1=980077&r2=980078&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java Wed Jul 28 14:48:31 2010
@@ -22,6 +22,8 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
 /**
+ * Marker interface to indicate Customizable ExtVal Module configuration.
+ * 
  * @author Gerhard Petracek
  * @since r4
  */

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java?rev=980078&r1=980077&r2=980078&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java Wed Jul 28 14:48:31 2010
@@ -22,11 +22,24 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
 /**
+ * Allows the retrieval of a custom configuration object.
+ *
  * @author Gerhard Petracek
  * @since r4
  */
 @UsageInformation({UsageCategory.API, UsageCategory.CUSTOMIZABLE})
 public interface ExtValModuleConfigurationResolver
 {
+    /**
+     * Retrieves the custom configuration object which is of the type specified by the parameter. The type of the
+     * parameter is one of the abstract classes which directly implement the ExtValModuleConfiguration interface, like
+     * ExtValCoreConfiguration. The return object should not only implement the ExtValModuleConfiguration, but
+     * should also extend from the class specified in the configType. The method isn't allowed to return null except
+     * for the case that a custom configuration object for that type is defined as web.xml initialization parameter.
+     *
+     * @param configType Class type indicating the type of module for which we need to retrieve the configuration
+     * @param <T>
+     * @return Configuration object which ExtVal will use.
+     */
     <T extends ExtValModuleConfiguration> ExtValModuleConfiguration getCustomConfiguration(Class<T> configType);
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_2_0/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_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java?rev=980078&r1=980077&r2=980078&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/core/src/main/java/org/apache/myfaces/extensions/validator/core/WebXmlParameter.java Wed Jul 28 14:48:31 2010
@@ -121,6 +121,9 @@ interface WebXmlParameter
     /*
      * deactivate
      */
+    /**
+     * @since r4
+     */
     static final String DEACTIVATE_REQUIRED_ATTRIBUTE_SUPPORT = WebXmlUtils
             .getInitParameter("DEACTIVATE_REQUIRED_ATTRIBUTE_SUPPORT");