You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2010/10/26 23:50:02 UTC
svn commit: r1027753 - in
/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core:
./ factory/ interceptor/
Author: gpetracek
Date: Tue Oct 26 21:50:02 2010
New Revision: 1027753
URL: http://svn.apache.org/viewvc?rev=1027753&view=rev
Log:
EXTVAL-29
Modified:
myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java
myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java
myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java
myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java
myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/FactoryNames.java
myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractRendererInterceptor.java
Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java?rev=1027753&r1=1027752&r2=1027753&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/CustomInformation.java Tue Oct 26 21:50:02 2010
@@ -22,6 +22,8 @@ import org.apache.myfaces.extensions.val
import org.apache.myfaces.extensions.validator.internal.UsageInformation;
/**
+ * ExtVal artifacts supported by the {@link org.apache.myfaces.extensions.validator.core.InformationProviderBean}
+ *
* @author Gerhard Petracek
* @since 1.x.1
*/
Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/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_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java?rev=1027753&r1=1027752&r2=1027753&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValCoreConfiguration.java Tue Oct 26 21:50:02 2010
@@ -53,9 +53,11 @@ public abstract class ExtValCoreConfigur
}
/**
- * Don't access ExtValContext during initialization of the class. OpenWebBeans initializes all classes during
- * startup of the WebContainer. extValContext constructor tries to access Web.xml parameters through FacesContext
- * which isn't available yet.
+ * Don't access ExtValContext during initialization of the class. E.g. OpenWebBeans initializes all classes during
+ * startup of the WebContainer.
+ * ({@link ExtValContext} constructor tries to access Web.xml parameters through
+ * {@link javax.faces.context.FacesContext} which isn't available during the classpath-scanning.)
+ *
* @return The ExtValContext
*/
private static ExtValContext getExtValContext()
@@ -66,12 +68,13 @@ 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
+ * Returns the configuration for the core-module stored in the context.
+ * If this doesn't exists (usually a startup-listener registers a (custom) implementation),
+ * it returns a new instance of the default implementation.
+ *
+ * @return The active ExtVal Core Module Configuration
*/
public static ExtValCoreConfiguration get()
{
@@ -85,10 +88,11 @@ public abstract class ExtValCoreConfigur
}
/**
- * 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?
+ * Sets a new configuration for the core-module
+ *
+ * @param config The new configuration for the core-module
+ * @param forceOverride use true to replace an existing configuration
+ * @return true if the new config was registered successfully
*/
@UsageInformation(UsageCategory.INTERNAL)
public static boolean use(ExtValCoreConfiguration config, boolean forceOverride)
@@ -101,172 +105,194 @@ public abstract class ExtValCoreConfigur
*/
/**
* The name of the Resource bundle used for looking up resource keys of validation messages.
- *
- * @return Fully qualified name of resource bundle.
+ *
+ * @return Fully qualified name of a custom 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
+ * Define a new base package where custom versions of the ExtVal artifacts can be found.
+ * (Default value: org.apache.myfaces.extensions.validator.custom)
+ *
* @see InformationProviderBean#setupCustomizableInformation()
+ *
+ * @return package name
*/
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
+ * Defines the class name for a custom {@link InformationProviderBean}. This class must extend
+ * {@link InformationProviderBean}.
+ *
+ * @return Fully qualified class name of the class to be used as {@link 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.
+ * Defines the class name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.MetaDataExtractor}.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.DefaultComponentMetaDataExtractor}).
+ *
* @see org.apache.myfaces.extensions.validator.core.metadata.extractor.DefaultComponentMetaDataExtractorFactory#createWith(java.util.Map<java.lang.String,java.lang.Object>)
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.MetaDataExtractor}.
*/
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.
- *
+ * org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractor}.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultValidationParameterExtractor}.
+ *
* @see org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultValidationParameterExtractorFactory#create()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractor).
*/
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.
+ * Name of the optional property file which contains the mappings between ExtVal constraints and the
+ * {@link org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy}s for validating them.
+ * These mappings can be used to overrule all other configurations.
+ *
* @see org.apache.myfaces.extensions.validator.core.validation.strategy.DefaultValidationStrategyFactory#initStaticMappings()
+ *
+ * @return Fully qualified name of the property file which contains the mappings.
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.initializer.component.ComponentInitializer}.
+ *
* @see ExtValContextInvocationOrderAwareInternals#lazyInitComponentInitializers()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.initializer.component.ComponentInitializer}.
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.interceptor.ValidationExceptionInterceptor}.
+ *
* @see ExtValContextInvocationOrderAwareInternals#lazyInitValidationExceptionInterceptors()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.interceptor.ValidationExceptionInterceptor}.
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.interceptor.PropertyValidationInterceptor}.
+ *
* @see ExtValContextInvocationOrderAwareInternals#lazyInitPropertyValidationInterceptors()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.interceptor.PropertyValidationInterceptor}.
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.interceptor.MetaDataExtractionInterceptor}.
+ *
* @see ExtValContextInvocationOrderAwareInternals#lazyInitMetaDataExtractionInterceptors()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.interceptor.MetaDataExtractionInterceptor}.
*/
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.
+ * Defines the {@link ProxyHelper} that should be used by ExtVal.
+ * (Default implementation: {@link org.apache.myfaces.extensions.validator.core.proxy.DefaultProxyHelper}).
* 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()
+ *
+ * @return The instance of the {@link ProxyHelper} that should be used.
*/
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.
+ * Defines the {@link ProjectStageResolver} that should be used by ExtVal.
+ * (Default implementation: {@link DefaultProjectStageResolver}
+ * If the method returns null, the project-stage 'Production' will be used.
+ *
* @see ProjectStage#getCurrentProjectStage()
+ *
+ * @return The instance of the ProjectStageResolver that should be used.
*/
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.
+ * Defines an optional {@link org.apache.myfaces.extensions.validator.core.renderkit.RendererProxy}
+ * that should be used by ExtVal.
+ *
* @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValLazyRendererProxy#getLazyRenderer()
- * @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper#ExtValRendererWrapper(Renderer)
+ * @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererWrapper#ExtValRendererWrapper(javax.faces.render.Renderer)
+ *
+ * @return The instance of the {@link org.apache.myfaces.extensions.validator.core.renderkit.RendererProxy}
+ * that should be used.
*/
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.
+ * Returns a class of an annotation which should be used as
+ * {@link org.apache.myfaces.extensions.validator.core.validation.ConstraintSource}
+ * (use a custom implementation, if it is required to keep implementations independent of ExtVal)
+ *
* @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#findMappedClass(org.apache.myfaces.extensions.validator.core.storage.PropertyStorage, java.lang.Class, java.lang.String)
+ *
+ * @return Annotation class of the alternative implementation
*/
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.
+ * Returns a class of an annotation which should be used as
+ * {@link org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource}
+ * (use a custom implementation, if it is required to keep implementations independent of ExtVal)
+ *
* @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#getIgnoreConstraintSourceAnnotationImplementation()
+ *
+ * @return Annotation class of the alternative implementation
*/
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.
+ * Returns a class of an annotation which should be used as
+ * {@link org.apache.myfaces.extensions.validator.core.validation.TargetProperty}
+ * (use a custom implementation, if it is required to keep implementations independent of ExtVal)
+ *
* @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#getTargetPropertyAnnotationImplementation()
+ *
+ * @return Annotation class of the alternative implementation
*/
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.
+ * Returns a class of an annotation which should be used as
+ * {@link org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId}
+ * (use a custom implementation, if it is required to keep implementations independent of ExtVal)
+ *
* @see org.apache.myfaces.extensions.validator.util.ConstraintSourceUtils#getTargetPropertyIdAnnotationImplementation()
+ *
+ * @return Annotation class of the alternative implementation
*/
public abstract Class<? extends Annotation> targetPropertyIdAnnotation();
@@ -275,69 +301,86 @@ public abstract class ExtValCoreConfigur
*/
/**
- * 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
+ * Returns the class which should be used as violation severity.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity}).
+ *
+ * @return class which should be used as 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)
+ * Defines the validation parameter annotation which indicates that the validation information should not be
+ * transferred to the {@link javax.faces.component.UIComponent}.
*
- * @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()
+ *
+ * @return Validation parameter annotation for indicating that no validation information needs to be set on the
+ * ui-component.
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.mapper.NameMapper} that
+ * takes a ValidationStrategy and points to the
+ * {@link org.apache.myfaces.extensions.validator.core.validation.message.resolver.MessageResolver}
+ * that is linked to it.
+ * (The class should implement the interface NameMapper<ValidationStrategy>.)
+ *
* @see org.apache.myfaces.extensions.validator.core.validation.message.resolver.mapper.CustomConfiguredValidationStrategyToMsgResolverNameMapper#getCustomNameMapperClassName()
+ *
+ * @return fully qualified class name of the custom NameMapper to retrieve MessageResolver name for a given
+ * ValidationStrategy.
*/
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.
+ * Defines the name of the custom
+ * {@link org.apache.myfaces.extensions.validator.core.mapper.NameMapper} that
+ * takes a constraint-key and points to the
+ * {@link org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy}
+ * that is linked to it.
+ * (The class should implement the interface NameMapper<String>.)
+ *
* @see org.apache.myfaces.extensions.validator.core.validation.strategy.mapper.CustomConfiguredAnnotationToValidationStrategyNameMapper#CustomConfiguredAnnotationToValidationStrategyNameMapper()
+ *
+ * @return fully qualified class name of the custom NameMapper to retrieve ValidationStrategy name for a given
+ * constraint-key.
*/
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.
+ * Defines the name of the custom
+ * {@link org.apache.myfaces.extensions.validator.core.mapper.NameMapper} that
+ * takes a ValidationStrategy and points to the
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.transformer.MetaDataTransformer}
+ * that is linked to it.
+ * (The class should implement the interface NameMapper<ValidationStrategy>.)
+ *
* @see org.apache.myfaces.extensions.validator.core.metadata.transformer.mapper.CustomConfiguredValidationStrategyToMetaDataTransformerNameMapper#getCustomNameMapperClassName()
+ *
+ * @return fully qualified class name of the custom NameMapper to retrieve MetaDataTransformer name for a given
+ * ValidationStrategy.
*/
public abstract String customValidationStrategyToMetaDataTransformerNameMapperClassName();
/*
* filter
*/
+
/**
- * Defines the name of an additional {@link
- * org.apache.myfaces.extensions.validator.core.storage.MetaDataStorageFilter}.
+ * Defines the name of a custom
+ * {@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()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.storage.MetaDataStorageFilter}.
*/
public abstract String customMetaDataStorageFilterClassName();
@@ -346,89 +389,129 @@ public abstract class ExtValCoreConfigur
*/
/**
- * Defines the class name of custom {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+ * Defines the name of a 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.
+ * responsible for creating a
+ * {@link org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy}
+ * for a given metaData-key.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.validation.strategy.DefaultValidationStrategyFactory}.)
*
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationStrategyFactory()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory}
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+ * <ValidationStrategy, MessageResolver>}
+ * which is responsible for creating the
+ * {@link org.apache.myfaces.extensions.validator.core.validation.message.resolver.MessageResolver}
+ * for a given {@link org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy}.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.validation.message.resolver.DefaultMessageResolverFactory}.)
*
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createMessageResolverFactory()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory}
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.ComponentMetaDataExtractorFactory}
+ * which creates {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.MetaDataExtractor}s.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.DefaultComponentMetaDataExtractorFactory}
+ * .)
*
- * @return Fully qualified class name of implementation of a ComponentMetaDataExtractorFactory.
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createComponentMetaDataExtractorFactory()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.extractor.ComponentMetaDataExtractorFactory}
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractorFactory}
+ * which creates
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractor}s.
+ * (Default implementation:
+ * {@link
+ * org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultValidationParameterExtractorFactory}.)
*
- * @return Fully qualified class name of implementation of a ValidationParameterExtractorFactory.
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationParameterExtractorFactory()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameterExtractorFactory}
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory <Class, Class>}
+ * which is responsible for creating the final Validation Parameter class.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultValidationParameterFactory}.)
*
- * @return Fully qualified class name of implementation of a ClassMappingFactory.
+ * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationParameterFactory()
*
- * @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createValidationParameterFactory()
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory}
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+ * <ValidationStrategy, MetaDataTransformer>}
+ * which is responsible for creating a
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.transformer.MetaDataTransformer}
+ * for a given
+ * {@link org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy}.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.metadata.transformer.DefaultMetaDataTransformerFactory}.)
*
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createMetaDataTransformerFactory()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory}
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory
+ * <Class, StorageManager>} which is responsible for creating the
+ * {@link org.apache.myfaces.extensions.validator.core.storage.StorageManager} for
+ * a given storage class.
+ * (Default implementation:
+ * {@link org.apache.myfaces.extensions.validator.core.storage.DefaultStorageManagerFactory}.)
*
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createStorageManagerFactory()
+ *
+ * @return Fully qualified class name of implementation of a ClassMappingFactory.
*/
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.
+ * Defines the name of a custom
+ * {@link org.apache.myfaces.extensions.validator.core.factory.FacesMessageFactory}
+ * which creates and converts {@link javax.faces.application.FacesMessage}s
+ * (Default implementation:
+ * {@link
+ * org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultValidationParameterExtractorFactory}.)
*
- * @return Fully qualified class name of implementation of a FacesMessageFactory.
* @see org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder#createFacesMessageFactory()
+ *
+ * @return Fully qualified class name of the class to be used as
+ * {@link org.apache.myfaces.extensions.validator.core.factory.FacesMessageFactory}
*/
public abstract String customFacesMessageFactoryClassName();
@@ -437,11 +520,12 @@ public abstract class ExtValCoreConfigur
*/
/**
- * 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.
+ * Indicates if the ComponentInitializer's should mark {@link javax.faces.component.UIComponent}s as 'required'
+ * if an equivalent constraint is hosted by the referenced property.
*
- * @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>)
+ *
+ * @return true if the required attribute should be honored, false otherwise.
*/
public abstract boolean activateRequiredInitialization();
@@ -450,58 +534,59 @@ public abstract class ExtValCoreConfigur
*/
/**
- * Indicates if ExtVal should deactivate the usage of the resource bundle for validation messages specified in the
- * InformationBeanProvider.
+ * Indicates if ExtVal should deactivate the default convention.
*
- * @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)
+ * @return true if the default convention should be deactivated, false otherwise
*/
//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.
+ * Indicates if ExtVal should deactivate all the internal defined name mappers.
+ * (Be aware that ExtVal will fail, if no alternatives are defined.)
*
- * @return true when we want to deactivate internal defined name mappers.
* @see org.apache.myfaces.extensions.validator.core.startup.ExtValStartupListener#initNameMappers()
+ *
+ * @return true when we want to deactivate internal defined name mappers.
*/
public abstract boolean deactivateDefaultNameMappers();
/**
- /**
- * Not used in 1.x.x version.
+ * Defines if ExtVal should fallback to an alternative (but deprecated) approach for inspecting EL-expressions.
*
* @return true when we want to deactivate internal EL Resolver.
* @see org.apache.myfaces.extensions.validator.core.el.DefaultELHelper
*/
+ @Deprecated
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.
+ * Defines if the mechanism of component initialization (before the rendering process) should be deactivated.
*
- * @return true if UI component should not be initialized by ExtVal.
* @see ExtValContextInternals#isComponentInitializationActivated()
* @see org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor#isComponentInitializationDeactivated()
+ *
+ * @return true if {@link javax.faces.component.UIComponent}s should not be initialized by ExtVal, false otherwise.
*/
public abstract boolean deactivateComponentInitialization();
/**
- * Indicates that ExtVal does not need to use a ParameterValidatorExtractor.
+ * Defines if the mechanism of generic validation parameters should be deactivated.
*
- * @return true when no parameter validation extraction need to be done.
* @see org.apache.myfaces.extensions.validator.util.ExtValUtils#getValidationParameterExtractor()
+ *
+ * @return true if validation parameter extraction should be skipped, false otherwise
*/
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.
+ * Defines if the default entry point of ExtVal should be deactivated.
+ * (Attention: in case of mojarra you have to use the vm-parameter:
+ * org.apache.myfaces.extensions.validator.DEACTIVATE_RENDER_KIT_FACTORY)
*
- * @return True when we want to deactivate usage of Renderer wrappers.
* @see org.apache.myfaces.extensions.validator.core.renderkit.ExtValRenderKitFactory#checkRenderKitFactoryDeactivation()
+ *
+ * @return true for deactivating ExtVal, false otherwise
*/
public abstract boolean deactivateRenderKitFactory();
@@ -509,33 +594,38 @@ public abstract class ExtValCoreConfigur
//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.
+ * Defines if ExtVal should reset the required attribute of a {@link javax.faces.component.UIComponent}
+ * after the decoding the component. (It's needed for special use-cases.)
*
- * @return true when we want to remove the required attribute on the UICOMpoent after decoding.
* @see org.apache.myfaces.extensions.validator.util.ExtValUtils#isRequiredResetActivated()
+ *
+ * @return true if ExtVal should set the required attribute to false, false otherwise
*/
public abstract boolean deactivateRequiredAttributeSupport();
/*
- * spec parameters
+ * supported spec parameters
*/
/**
- * Should ExtVal interpret the empty field values on screen as null. A new general JSF 2.0 parameter.
+ * Defines if ExtVal should convert empty strings to null (just for the validation process).
+ * (Introduced by JSF 2.0)
+ * Compared to std. JSF it's activated by default!
*
- * @return true if we want backwards compatible functionality.
+ * @return false for using the default behavior of JSF 2.0
*/
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.
+ * Defines if ExtVal should validate empty fields.
+ *
+ * Please also have a look at the
+ * {@link org.apache.myfaces.extensions.validator.core.validation.NullValueAwareValidationStrategy} annotation.
+ *
+ * (Introduced by JSF 2.0)
+ * Compared to std. JSF it's activated by default!
*
- * @return true if we want backwards compatible functionality.
+ * @return false for using the default behavior of JSF 2.0
*/
public abstract boolean validateEmptyFields();
}
Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/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_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java?rev=1027753&r1=1027752&r2=1027753&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfiguration.java Tue Oct 26 21:50:02 2010
@@ -22,8 +22,8 @@ import org.apache.myfaces.extensions.val
import org.apache.myfaces.extensions.validator.internal.UsageCategory;
/**
- * Marker interface to indicate Customizable ExtVal Module configuration.
- *
+ * Marker interface for type-safe ExtVal configurations.
+ *
* @author Gerhard Petracek
* @since r4
*/
Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/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_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java?rev=1027753&r1=1027752&r2=1027753&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValModuleConfigurationResolver.java Tue Oct 26 21:50:02 2010
@@ -31,15 +31,17 @@ import org.apache.myfaces.extensions.val
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.
+ * Retrieves the custom configuration which matches the given config-type.
+ * The type of the parameter is one of the abstract classes which directly implements the
+ * {@link ExtValModuleConfiguration} interface, like {@link ExtValCoreConfiguration}.
+ * The returned config has to extend one of the abstract config classes.
*
- * @param configType Class type indicating the type of module for which we need to retrieve the configuration
+ * (The method isn't allowed to return null except
+ * for the case that a custom configuration for that type is defined via a web.xml context-param.)
+ *
+ * @param configType Class that specifies the type of the target config.
* @param <T>
- * @return Configuration object which ExtVal will use.
+ * @return Configuration object which will be used by ExtVal.
*/
<T extends ExtValModuleConfiguration> ExtValModuleConfiguration getCustomConfiguration(Class<T> configType);
}
Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/FactoryNames.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/FactoryNames.java?rev=1027753&r1=1027752&r2=1027753&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/FactoryNames.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/factory/FactoryNames.java Tue Oct 26 21:50:02 2010
@@ -22,8 +22,8 @@ import org.apache.myfaces.extensions.val
import org.apache.myfaces.extensions.validator.internal.UsageCategory;
/**
- * Names of factories known by the FactoryFinder.
- * @see org.apache.myfaces.extensions.validator.core.factory.FactoryFinder
+ * Names of factories known by the
+ * {@link org.apache.myfaces.extensions.validator.core.factory.FactoryFinder}
*
* @author Gerhard Petracek
* @since 1.x.1
Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractRendererInterceptor.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/AbstractRendererInterceptor.java?rev=1027753&r1=1027752&r2=1027753&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractRendererInterceptor.java (original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractRendererInterceptor.java Tue Oct 26 21:50:02 2010
@@ -32,6 +32,8 @@ import java.io.IOException;
import java.util.logging.Logger;
/**
+ * Empty base implementation which allows concrete implementations to override just the needed methods.
+ *
* @author Gerhard Petracek
* @since 1.x.1
*/
@@ -50,6 +52,9 @@ public abstract class AbstractRendererIn
return getClass().getName();
}
+ /**
+ * {@inheritDoc}
+ */
public Object getReturnValueOnSkipRendererDelegationException(
SkipRendererDelegationException skipRendererDelegationException, Object currentReturnValue)
{
@@ -59,26 +64,41 @@ public abstract class AbstractRendererIn
/*
* before
*/
+ /**
+ * {@inheritDoc}
+ */
public void beforeDecode(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws SkipBeforeInterceptorsException, SkipRendererDelegationException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void beforeEncodeBegin(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws IOException, SkipBeforeInterceptorsException, SkipRendererDelegationException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void beforeEncodeChildren(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws IOException, SkipBeforeInterceptorsException, SkipRendererDelegationException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void beforeEncodeEnd(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws IOException, SkipBeforeInterceptorsException, SkipRendererDelegationException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void beforeGetConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object o, Renderer wrapped)
throws ConverterException, SkipBeforeInterceptorsException, SkipRendererDelegationException
{
@@ -87,26 +107,41 @@ public abstract class AbstractRendererIn
/*
* after
*/
+ /**
+ * {@inheritDoc}
+ */
public void afterDecode(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws SkipAfterInterceptorsException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void afterEncodeBegin(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws IOException, SkipAfterInterceptorsException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void afterEncodeChildren(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws IOException, SkipAfterInterceptorsException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void afterEncodeEnd(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped)
throws IOException, SkipAfterInterceptorsException
{
}
+ /**
+ * {@inheritDoc}
+ */
public void afterGetConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object o, Renderer wrapped)
throws ConverterException, SkipAfterInterceptorsException
{