|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration org.apache.myfaces.extensions.validator.core.DefaultExtValCoreConfiguration
public class DefaultExtValCoreConfiguration
Default ExtVal Core Module Configuration that retrieves most of the values from the Web.xml initialization parameters.
Constructor Summary | |
---|---|
DefaultExtValCoreConfiguration()
|
Method Summary | |
---|---|
boolean |
activateRequiredInitialization()
Indicates if the ComponentInitializer's should mark UIComponent s as 'required'
if an equivalent constraint is hosted by the referenced property. |
Class<? extends Annotation> |
constraintSourceAnnotation()
Returns a class of an annotation which should be used as ConstraintSource
(use a custom implementation, if it is required to keep implementations independent of ExtVal) |
String |
customBasePackage()
Define a new base package where custom versions of the ExtVal artifacts can be found. |
String |
customComponentInitializerClassName()
Defines the name of a custom ComponentInitializer . |
String |
customComponentMetaDataExtractorClassName()
Defines the class name of a custom MetaDataExtractor . |
String |
customComponentMetaDataExtractorFactoryClassName()
Defines the name of a custom ComponentMetaDataExtractorFactory
which creates MetaDataExtractor s. |
String |
customFacesMessageFactoryClassName()
Defines the name of a custom FacesMessageFactory
which creates and converts FacesMessage s
(Default implementation:
DefaultValidationParameterExtractorFactory .) |
String |
customInformationProviderBeanClassName()
Defines the class name for a custom InformationProviderBean . |
String |
customMessageBundleBaseName()
The name of the Resource bundle used for looking up resource keys of validation messages. |
String |
customMessageResolverFactoryClassName()
Defines the name of a custom
which is responsible for creating the
MessageResolver
for a given ValidationStrategy . |
String |
customMetaDataExtractionInterceptorClassName()
Defines the name of a custom MetaDataExtractionInterceptor . |
String |
customMetaDataStorageFilterClassName()
Defines the name of a custom MetaDataStorageFilter . |
String |
customMetaDataToValidationStrategyNameMapperClassName()
Defines the name of the custom NameMapper that
takes a constraint-key and points to the
ValidationStrategy
that is linked to it. |
String |
customMetaDataTransformerFactoryClassName()
Defines the name of a custom
which is responsible for creating a
MetaDataTransformer
for a given
ValidationStrategy . |
String |
customPropertyValidationInterceptorClassName()
Defines the name of a custom PropertyValidationInterceptor . |
String |
customStaticValidationStrategyMappingSource()
Name of the optional property file which contains the mappings between ExtVal constraints and the ValidationStrategy s for validating them. |
String |
customStorageManagerFactoryClassName()
Defines the name of a custom which is responsible for creating the
StorageManager for
a given storage class. |
String |
customValidationExceptionInterceptorClassName()
Defines the name of a custom ValidationExceptionInterceptor . |
String |
customValidationParameterExtractorClassName()
Defines the class name of a custom ValidationParameterExtractor . |
String |
customValidationParameterExtractorFactoryClassName()
Defines the name of a custom ValidationParameterExtractorFactory
which creates
ValidationParameterExtractor s. |
String |
customValidationParameterFactoryClassName()
Defines the name of a custom
which is responsible for creating the final Validation Parameter class. |
String |
customValidationStrategyFactoryClassName()
Defines the name of a custom which is
responsible for creating a
ValidationStrategy
for a given metaData-key. |
String |
customValidationStrategyToMessageResolverNameMapperClassName()
Defines the name of a custom NameMapper that
takes a ValidationStrategy and points to the
MessageResolver
that is linked to it. |
String |
customValidationStrategyToMetaDataTransformerNameMapperClassName()
Defines the name of the custom NameMapper that
takes a ValidationStrategy and points to the
MetaDataTransformer
that is linked to it. |
boolean |
deactivateComponentInitialization()
Defines if the mechanism of component initialization (before the rendering process) should be deactivated. |
boolean |
deactivateDefaultConvention()
Indicates if ExtVal should deactivate the default convention. |
boolean |
deactivateDefaultNameMappers()
Indicates if ExtVal should deactivate all the internal defined name mappers. |
boolean |
deactivateElResolver()
Defines if ExtVal should fallback to an alternative (but deprecated) approach for inspecting EL-expressions. |
boolean |
deactivateRenderKitFactory()
Defines if the default entry point of ExtVal should be deactivated. |
boolean |
deactivateRequiredAttributeSupport()
Defines if ExtVal should reset the required attribute of a UIComponent
after the decoding the component. |
boolean |
deactivateValidationParameters()
Defines if the mechanism of generic validation parameters should be deactivated. |
Class<? extends ValidationParameter> |
disableClientSideValidationValidationParameter()
Defines the validation parameter annotation which indicates that the validation information should not be transferred to the UIComponent . |
Class<? extends Annotation> |
ignoreConstraintSourceAnnotation()
Returns a class of an annotation which should be used as IgnoreConstraintSource
(use a custom implementation, if it is required to keep implementations independent of ExtVal) |
boolean |
interpretEmptyStringSubmittedValuesAsNull()
Defines if ExtVal should convert empty strings to null (just for the validation process). |
static void |
overruleActivateRequiredInitialization(Boolean value,
boolean forceOverride)
Module and add-on writers can use this method to overrule the value of the parameter activateRequiredInitialization. it is also useful for them to specify a certain parameter value without the need for a web.xml initialization parameter. |
static void |
overruleDeactivateRequiredAttributeSupport(Boolean value,
boolean forceOverride)
Module and add-on writers can use this method to overrule the value of the parameter deactivateRequiredAttributeSupport. |
ProjectStageResolver |
projectStageResolver()
Defines the ProjectStageResolver that should be used by ExtVal. |
ProxyHelper |
proxyHelper()
Defines the ProxyHelper that should be used by ExtVal. |
Class<? extends ExtValRendererProxy> |
rendererProxy()
Defines an optional RendererProxy
that should be used by ExtVal. |
Class<? extends Annotation> |
targetPropertyAnnotation()
Returns a class of an annotation which should be used as TargetProperty
(use a custom implementation, if it is required to keep implementations independent of ExtVal) |
Class<? extends Annotation> |
targetPropertyIdAnnotation()
Returns a class of an annotation which should be used as TargetPropertyId
(use a custom implementation, if it is required to keep implementations independent of ExtVal) |
boolean |
validateEmptyFields()
Defines if ExtVal should validate empty fields. |
Class |
violationSeverity()
Returns the class which should be used as violation severity. |
Methods inherited from class org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration |
---|
get, use |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultExtValCoreConfiguration()
Method Detail |
---|
public String customMessageBundleBaseName()
customMessageBundleBaseName
in class ExtValCoreConfiguration
DefaultValidationErrorMessageResolver
public String customBasePackage()
customBasePackage
in class ExtValCoreConfiguration
InformationProviderBean.setupCustomizableInformation()
public String customInformationProviderBeanClassName()
InformationProviderBean
. This class must extend
InformationProviderBean
.
Parameter taken from the Web.xml initialization parameter CUSTOM_INFORMATION_PROVIDER_BEAN.
customInformationProviderBeanClassName
in class ExtValCoreConfiguration
InformationProviderBean
public String customComponentMetaDataExtractorClassName()
MetaDataExtractor
.
(Default implementation:
DefaultComponentMetaDataExtractor
).
Parameter taken from the Web.xml initialization parameter CUSTOM_COMPONENT_META_DATA_EXTRACTOR.
customComponentMetaDataExtractorClassName
in class ExtValCoreConfiguration
MetaDataExtractor
.org.apache.myfaces.extensions.validator.core.metadata.extractor.DefaultComponentMetaDataExtractorFactory#createWith(java.util.Map)
public String customValidationParameterExtractorClassName()
ValidationParameterExtractor
.
(Default implementation:
DefaultValidationParameterExtractor
.
Parameter taken from the Web.xml initialization parameter CUSTOM_VALIDATION_PARAMETER_EXTRACTOR.
customValidationParameterExtractorClassName
in class ExtValCoreConfiguration
DefaultValidationParameterExtractorFactory.create()
public String customStaticValidationStrategyMappingSource()
ValidationStrategy
s for validating them.
These mappings can be used to overrule all other configurations.
Parameter taken from the Web.xml initialization parameter CUSTOM_STATIC_VALIDATION_STRATEGY_MAPPING.
customStaticValidationStrategyMappingSource
in class ExtValCoreConfiguration
DefaultValidationStrategyFactory.initStaticMappings()
public String customComponentInitializerClassName()
ComponentInitializer
.
Parameter taken from the Web.xml initialization parameter CUSTOM_COMPONENT_INITIALIZER.
customComponentInitializerClassName
in class ExtValCoreConfiguration
ComponentInitializer
.ExtValContextInvocationOrderAwareInternals.lazyInitComponentInitializers()
public String customValidationExceptionInterceptorClassName()
ValidationExceptionInterceptor
.
Parameter taken from the Web.xml initialization parameter CUSTOM_VALIDATION_EXCEPTION_INTERCEPTOR.
customValidationExceptionInterceptorClassName
in class ExtValCoreConfiguration
ValidationExceptionInterceptor
.ExtValContextInvocationOrderAwareInternals.lazyInitValidationExceptionInterceptors()
public String customPropertyValidationInterceptorClassName()
PropertyValidationInterceptor
.
Parameter taken from the Web.xml initialization parameter CUSTOM_PROPERTY_VALIDATION_INTERCEPTOR.
customPropertyValidationInterceptorClassName
in class ExtValCoreConfiguration
PropertyValidationInterceptor
.ExtValContextInvocationOrderAwareInternals.lazyInitPropertyValidationInterceptors()
public String customMetaDataExtractionInterceptorClassName()
MetaDataExtractionInterceptor
.
Parameter taken from the Web.xml initialization parameter CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR.
customMetaDataExtractionInterceptorClassName
in class ExtValCoreConfiguration
MetaDataExtractionInterceptor
.ExtValContextInvocationOrderAwareInternals.lazyInitMetaDataExtractionInterceptors()
public ProxyHelper proxyHelper()
ProxyHelper
that should be used by ExtVal.
(Default implementation: DefaultProxyHelper
).
The method should never return null.
Parameter taken from the Web.xml initialization parameter CUSTOM_META_DATA_EXTRACTION_INTERCEPTOR. When no
value is specified, the DefaultProxyHelper
is returned.
proxyHelper
in class ExtValCoreConfiguration
ProxyHelper
that should be used.ProxyUtils.getProxyHelper()
public ProjectStageResolver projectStageResolver()
ProjectStageResolver
that should be used by ExtVal.
(Default implementation: DefaultProjectStageResolver
If the method returns null, the project-stage 'Production' will be used.
Returns always the DefaultProjectStageResolver.
projectStageResolver
in class ExtValCoreConfiguration
ProjectStage.getCurrentProjectStage()
public Class<? extends ExtValRendererProxy> rendererProxy()
RendererProxy
that should be used by ExtVal.
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.
rendererProxy
in class ExtValCoreConfiguration
RendererProxy
that should be used.ExtValLazyRendererProxy.getLazyRenderer()
,
ExtValRendererWrapper.ExtValRendererWrapper(javax.faces.render.Renderer)
public Class violationSeverity()
ViolationSeverity
).
Returns always the ViolationSeverity.
violationSeverity
in class ExtValCoreConfiguration
public String customValidationStrategyToMessageResolverNameMapperClassName()
NameMapper
that
takes a ValidationStrategy and points to the
MessageResolver
that is linked to it.
(The class should implement the interface NameMapper
customValidationStrategyToMessageResolverNameMapperClassName
in class ExtValCoreConfiguration
CustomConfiguredValidationStrategyToMsgResolverNameMapper.getCustomNameMapperClassName()
public String customMetaDataToValidationStrategyNameMapperClassName()
NameMapper
that
takes a constraint-key and points to the
ValidationStrategy
that is linked to it.
(The class should implement the interface NameMapper
customMetaDataToValidationStrategyNameMapperClassName
in class ExtValCoreConfiguration
CustomConfiguredAnnotationToValidationStrategyNameMapper.CustomConfiguredAnnotationToValidationStrategyNameMapper()
public String customValidationStrategyToMetaDataTransformerNameMapperClassName()
NameMapper
that
takes a ValidationStrategy and points to the
MetaDataTransformer
that is linked to it.
(The class should implement the interface NameMapper
customValidationStrategyToMetaDataTransformerNameMapperClassName
in class ExtValCoreConfiguration
CustomConfiguredValidationStrategyToMetaDataTransformerNameMapper.getCustomNameMapperClassName()
public String customMetaDataStorageFilterClassName()
MetaDataStorageFilter
.
Value taken from the Web.xml initialization parameter CUSTOM_META_DATA_STORAGE_FILTER.
customMetaDataStorageFilterClassName
in class ExtValCoreConfiguration
MetaDataStorageFilter
.DefaultMetaDataStorage.initFilters()
public String customValidationStrategyFactoryClassName()
which is
responsible for creating a
ValidationStrategy
for a given metaData-key.
(Default implementation:
DefaultValidationStrategyFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_STRATEGY_FACTORY.
customValidationStrategyFactoryClassName
in class ExtValCoreConfiguration
ClassMappingFactory
DefaultFactoryFinder.createValidationStrategyFactory()
public String customMessageResolverFactoryClassName()
which is responsible for creating the
MessageResolver
for a given ValidationStrategy
.
(Default implementation:
DefaultMessageResolverFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_MESSAGE_RESOLVER_FACTORY.
customMessageResolverFactoryClassName
in class ExtValCoreConfiguration
ClassMappingFactory
DefaultFactoryFinder.createMessageResolverFactory()
public String customComponentMetaDataExtractorFactoryClassName()
ComponentMetaDataExtractorFactory
which creates MetaDataExtractor
s.
(Default implementation:
DefaultComponentMetaDataExtractorFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_COMPONENT_META_DATA_EXTRACTOR_FACTORY.
customComponentMetaDataExtractorFactoryClassName
in class ExtValCoreConfiguration
ComponentMetaDataExtractorFactory
DefaultFactoryFinder.createComponentMetaDataExtractorFactory()
public String customValidationParameterExtractorFactoryClassName()
ValidationParameterExtractorFactory
which creates
ValidationParameterExtractor
s.
(Default implementation:
DefaultValidationParameterExtractorFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_PARAMETER_EXTRACTOR_FACTORY.
customValidationParameterExtractorFactoryClassName
in class ExtValCoreConfiguration
ValidationParameterExtractorFactory
DefaultFactoryFinder.createValidationParameterExtractorFactory()
public String customValidationParameterFactoryClassName()
which is responsible for creating the final Validation Parameter class.
(Default implementation:
DefaultValidationParameterFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_VALIDATION_PARAMETER_FACTORY.
customValidationParameterFactoryClassName
in class ExtValCoreConfiguration
ClassMappingFactory
DefaultFactoryFinder.createValidationParameterFactory()
public String customMetaDataTransformerFactoryClassName()
which is responsible for creating a
MetaDataTransformer
for a given
ValidationStrategy
.
(Default implementation:
DefaultMetaDataTransformerFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_META_DATA_TRANSFORMER_FACTORY.
customMetaDataTransformerFactoryClassName
in class ExtValCoreConfiguration
ClassMappingFactory
DefaultFactoryFinder.createMetaDataTransformerFactory()
public String customStorageManagerFactoryClassName()
which is responsible for creating the
StorageManager
for
a given storage class.
(Default implementation:
DefaultStorageManagerFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_STORAGE_MANAGER_FACTORY.
customStorageManagerFactoryClassName
in class ExtValCoreConfiguration
DefaultFactoryFinder.createStorageManagerFactory()
public String customFacesMessageFactoryClassName()
FacesMessageFactory
which creates and converts FacesMessage
s
(Default implementation:
DefaultValidationParameterExtractorFactory
.)
Value taken from the Web.xml initialization parameter CUSTOM_FACES_MESSAGE_FACTORY.
customFacesMessageFactoryClassName
in class ExtValCoreConfiguration
FacesMessageFactory
DefaultFactoryFinder.createFacesMessageFactory()
public Class<? extends Annotation> constraintSourceAnnotation()
ConstraintSource
(use a custom implementation, if it is required to keep implementations independent of ExtVal)
Returns the ConstraintSource
class as annotation for the Constraint Source feature.
constraintSourceAnnotation
in class ExtValCoreConfiguration
ConstraintSourceUtils.findMappedClass(org.apache.myfaces.extensions.validator.core.storage.PropertyStorage, java.lang.Class, java.lang.String)
public Class<? extends Annotation> ignoreConstraintSourceAnnotation()
IgnoreConstraintSource
(use a custom implementation, if it is required to keep implementations independent of ExtVal)
Returns the IgnoreConstraintSource
class as annotation for the ignore feature of the Constraint Source.
ignoreConstraintSourceAnnotation
in class ExtValCoreConfiguration
ConstraintSourceUtils.getIgnoreConstraintSourceAnnotationImplementation()
public Class<? extends Annotation> targetPropertyAnnotation()
TargetProperty
(use a custom implementation, if it is required to keep implementations independent of ExtVal)
Returns the TargetProperty
class as annotation for the Constraint Source target property feature.
targetPropertyAnnotation
in class ExtValCoreConfiguration
ConstraintSourceUtils.getTargetPropertyAnnotationImplementation()
public Class<? extends Annotation> targetPropertyIdAnnotation()
TargetPropertyId
(use a custom implementation, if it is required to keep implementations independent of ExtVal)
Returns the TargetPropertyId
class as annotation for the Constraint Source target property feature.
targetPropertyIdAnnotation
in class ExtValCoreConfiguration
ConstraintSourceUtils.getTargetPropertyIdAnnotationImplementation()
public Class<? extends ValidationParameter> disableClientSideValidationValidationParameter()
UIComponent
.
Returns the DisableClientSideValidation
class as indicator for this feature.
disableClientSideValidationValidationParameter
in class ExtValCoreConfiguration
ExtValStartupListener.initDisableClientSideValidationKey()
public boolean activateRequiredInitialization()
UIComponent
s as 'required'
if an equivalent constraint is hosted by the referenced property.
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.
activateRequiredInitialization
in class ExtValCoreConfiguration
org.apache.myfaces.extensions.validator.core.initializer.component.AbstractHtmlCoreComponentsComponentInitializer#configureComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.util.Map)
public static void overruleActivateRequiredInitialization(Boolean value, boolean forceOverride)
value
- The value we want to give the parameterforceOverride
- do we force overriding of another value set by a call to this overrule method.public boolean deactivateDefaultConvention()
deactivateDefaultConvention
in class ExtValCoreConfiguration
public boolean deactivateDefaultNameMappers()
deactivateDefaultNameMappers
in class ExtValCoreConfiguration
ExtValStartupListener.initNameMappers()
public boolean deactivateElResolver()
deactivateElResolver
in class ExtValCoreConfiguration
DefaultELHelper
public boolean deactivateComponentInitialization()
deactivateComponentInitialization
in class ExtValCoreConfiguration
UIComponent
s should not be initialized by ExtVal, false otherwise.ExtValContextInternals.isComponentInitializationActivated()
,
AbstractValidationInterceptor.isComponentInitializationDeactivated()
public boolean deactivateValidationParameters()
deactivateValidationParameters
in class ExtValCoreConfiguration
ExtValUtils.getValidationParameterExtractor()
public boolean deactivateRenderKitFactory()
deactivateRenderKitFactory
in class ExtValCoreConfiguration
ExtValRenderKitFactory.checkRenderKitFactoryDeactivation()
public boolean deactivateRequiredAttributeSupport()
UIComponent
after the decoding the component. (It's needed for special use-cases.)
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.
deactivateRequiredAttributeSupport
in class ExtValCoreConfiguration
ExtValUtils.isRequiredResetActivated()
public static void overruleDeactivateRequiredAttributeSupport(Boolean value, boolean forceOverride)
value
- The value we want to give the parameterforceOverride
- do we force overriding of another value set by a call to this overrule method.public boolean interpretEmptyStringSubmittedValuesAsNull()
interpretEmptyStringSubmittedValuesAsNull
in class ExtValCoreConfiguration
public boolean validateEmptyFields()
NullValueAwareValidationStrategy
annotation.
(Introduced by JSF 2.0)
Compared to std. JSF it's activated by default!
Value taken from the Web.xml initialization (JSF 2) parameter javax.faces.VALIDATE_EMPTY_FIELDS.
validateEmptyFields
in class ExtValCoreConfiguration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |