org.apache.myfaces.extensions.validator.beanval
Class BeanValidationModuleValidationInterceptor

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.interceptor.AbstractRendererInterceptor
      extended by org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor
          extended by org.apache.myfaces.extensions.validator.beanval.BeanValidationModuleValidationInterceptor
All Implemented Interfaces:
RendererInterceptor
Direct Known Subclasses:
MappedConstraintSourceBeanValidationModuleValidationInterceptor

public class BeanValidationModuleValidationInterceptor
extends AbstractValidationInterceptor

Since:
x.x.3
Author:
Gerhard Petracek

Field Summary
 
Fields inherited from class org.apache.myfaces.extensions.validator.core.interceptor.AbstractRendererInterceptor
logger
 
Constructor Summary
BeanValidationModuleValidationInterceptor()
           
 
Method Summary
protected  MetaDataExtractor getComponentMetaDataExtractor(Map<String,Object> properties)
          Implementations must return the MetaDataExtractor that will perform the extraction of the meta data from the component.
protected  Class getModuleKey()
          Identification of the validation module.
protected  boolean hasBeanValidationConstraints(PropertyInformation propertyInformation)
           
protected  void initComponent(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent)
          Initialize the component based on the meta-data which is provided by the referenced property.
protected  void initComponentWithPropertyDetails(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, PropertyDetails propertyDetails)
           
protected  boolean isRequiredInitializationSupported()
          In case of required initialization it's needed for some use-cases to reset the (required-)state of the components.
protected  void processConstraintViolations(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object convertedObject, Set<javax.validation.ConstraintViolation<Object>> violations)
           
protected  void processFieldValidation(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object convertedObject, PropertyInformation propertyInformation)
           
protected  void processValidation(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object convertedObject)
          A concrete implementation has to perform the actual validation of the value.
 
Methods inherited from class org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor
afterDecode, beforeEncodeBegin, beforeGetConvertedValue, getELHelper, getInterceptorProperties, getPropertiesForComponentMetaDataExtractor, getPropertyInformation, interpretEmptyStringValuesAsNull, isValueToValidateEmpty, processAfterValidation, processBeforeValidation, processComponent, recordProcessedInformation, transformValueForValidation, validateEmptyFields, validateValue
 
Methods inherited from class org.apache.myfaces.extensions.validator.core.interceptor.AbstractRendererInterceptor
afterEncodeBegin, afterEncodeChildren, afterEncodeEnd, afterGetConvertedValue, beforeDecode, beforeEncodeChildren, beforeEncodeEnd, getInterceptorId, getReturnValueOnSkipRendererDelegationException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanValidationModuleValidationInterceptor

public BeanValidationModuleValidationInterceptor()
Method Detail

isRequiredInitializationSupported

protected boolean isRequiredInitializationSupported()
Description copied from class: AbstractValidationInterceptor
In case of required initialization it's needed for some use-cases to reset the (required-)state of the components. Such a reset is just needed if required initialization is activated.

Overrides:
isRequiredInitializationSupported in class AbstractValidationInterceptor
Returns:
true if required initialization is supported by the current implementation, false otherwise

initComponent

protected void initComponent(javax.faces.context.FacesContext facesContext,
                             javax.faces.component.UIComponent uiComponent)
Description copied from class: AbstractValidationInterceptor
Initialize the component based on the meta-data which is provided by the referenced property.

Specified by:
initComponent in class AbstractValidationInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The component which is processed

initComponentWithPropertyDetails

protected void initComponentWithPropertyDetails(javax.faces.context.FacesContext facesContext,
                                                javax.faces.component.UIComponent uiComponent,
                                                PropertyDetails propertyDetails)

processValidation

protected void processValidation(javax.faces.context.FacesContext facesContext,
                                 javax.faces.component.UIComponent uiComponent,
                                 Object convertedObject)
Description copied from class: AbstractValidationInterceptor
A concrete implementation has to perform the actual validation of the value.

Specified by:
processValidation in class AbstractValidationInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The UIComponent which is processed.
convertedObject - The (adjusted) converted value.

getComponentMetaDataExtractor

protected MetaDataExtractor getComponentMetaDataExtractor(Map<String,Object> properties)
Description copied from class: AbstractValidationInterceptor
Implementations must return the MetaDataExtractor that will perform the extraction of the meta data from the component. The component itself is present in the properties map (it might influence the type of the returned MetaDataExtractor.

Specified by:
getComponentMetaDataExtractor in class AbstractValidationInterceptor
Parameters:
properties - Properties that can be used to determine the extractor which is returned.
Returns:
The MetaDataExtractor used for performing the xtraction of the meta data from the component.

hasBeanValidationConstraints

protected boolean hasBeanValidationConstraints(PropertyInformation propertyInformation)

processFieldValidation

protected void processFieldValidation(javax.faces.context.FacesContext facesContext,
                                      javax.faces.component.UIComponent uiComponent,
                                      Object convertedObject,
                                      PropertyInformation propertyInformation)

processConstraintViolations

protected void processConstraintViolations(javax.faces.context.FacesContext facesContext,
                                           javax.faces.component.UIComponent uiComponent,
                                           Object convertedObject,
                                           Set<javax.validation.ConstraintViolation<Object>> violations)

getModuleKey

protected Class getModuleKey()
Description copied from class: AbstractValidationInterceptor
Identification of the validation module. A key is just needed if other implementations should be restricted to 1-n special validation modules.

Overrides:
getModuleKey in class AbstractValidationInterceptor
Returns:
Identification of the validation module.


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.