org.javalid.external.jsf.validator
Class JsfValidatorExtImpl

java.lang.Object
  extended by org.javalid.external.jsf.validator.JsfValidatorExtImpl
All Implemented Interfaces:
JsfValidatorExt

public class JsfValidatorExtImpl
extends java.lang.Object
implements JsfValidatorExt

JSF validator that is used by the jv-framework to validate with backing beans.

Since:
1.0
Version:
1.0
Author:
M.Reuvers

Constructor Summary
JsfValidatorExtImpl()
           
 
Method Summary
 void setJsfLookup(JsfLookupExt jsfLookup)
          This method is called by the JV framework (after setJvConfiguration) is called) and sets the lookup interface to use.
 void setJvConfigurationWrapper(JvConfigurationWrapper jvConfigWrapper)
          Called by the jv framework when initializing a JsfAnnotationValidator implementation (right after constructing an instance).
 java.util.List<ValidationMessage> validate(java.lang.Object currentInstance, java.lang.String prefixPath, java.lang.String beanNameExpression, JvMethod jvMethod)
          This method is called by the JV framework (JsfAnnotationValidatorImpl) if an object to validate has defined a JSF lookup and thus must be validated through a JSF bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfValidatorExtImpl

public JsfValidatorExtImpl()
Method Detail

validate

public java.util.List<ValidationMessage> validate(java.lang.Object currentInstance,
                                                  java.lang.String prefixPath,
                                                  java.lang.String beanNameExpression,
                                                  JvMethod jvMethod)
Description copied from interface: JsfValidatorExt
This method is called by the JV framework (JsfAnnotationValidatorImpl) if an object to validate has defined a JSF lookup and thus must be validated through a JSF bean. It is the developer's responsibility to provide JvMethod with parameters that are needed. Think of: Object value and String prefixPath. These can be specified in a JvParam (see docs)

Specified by:
validate in interface JsfValidatorExt
Parameters:
currentInstance - The current instance for validation
prefixPath - The prefix path for this instance
beanNameExpression - The JSF expression of the (backing) bean to use
jvMethod - The method containing the actual call to be performed on the bean with ALL needed parameters.
Returns:
List containing ValidationMesssage instances if errors were encountered, if no errors an empty list must be returned.

setJvConfigurationWrapper

public void setJvConfigurationWrapper(JvConfigurationWrapper jvConfigWrapper)
Description copied from interface: JsfValidatorExt
Called by the jv framework when initializing a JsfAnnotationValidator implementation (right after constructing an instance). The default implementation uses the configuration to find out how to lookup beans etc.

Specified by:
setJvConfigurationWrapper in interface JsfValidatorExt
Parameters:
jvConfigWrapper - The configuration of the framework, allowing you access to the current configuration.

setJsfLookup

public void setJsfLookup(JsfLookupExt jsfLookup)
Description copied from interface: JsfValidatorExt
This method is called by the JV framework (after setJvConfiguration) is called) and sets the lookup interface to use.

Specified by:
setJsfLookup in interface JsfValidatorExt
Parameters:
jsfLookup - The actual lookup implementation to use