org.openfaces.validation.core
Class CoreValidatorImpl
java.lang.Object
org.openfaces.validation.core.CoreValidatorImpl
- All Implemented Interfaces:
- CoreValidator
public class CoreValidatorImpl
- extends java.lang.Object
- implements CoreValidator
CoreValidatorImpl
is an implementation of CoreValidator
interface. This class is used
to build and maintain annotations validation logic. It uses Hibernate
ClassValidator
class to perform validation.
Method Summary |
java.util.List<ClientValidator> |
getClientValidatorsForComponent(javax.faces.component.UIComponent component,
javax.el.ELContext elContext)
|
<T> org.hibernate.validator.ClassValidator<T> |
|
getValidator(T model)
|
<T> org.hibernate.validator.ClassValidator<T> |
|
getValidatorByClass(java.lang.Class<T> modelClass)
Get the cached ClassValidator instance. |
org.hibernate.validator.InvalidValue[] |
validate(javax.el.ValueExpression valueExpression,
javax.el.ELContext elContext,
java.lang.Object value)
Validate that the given value can be assigned to the property given by
the value expression. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CoreValidatorImpl
public CoreValidatorImpl()
getValidator
public <T> org.hibernate.validator.ClassValidator<T> getValidator(T model)
getValidatorByClass
public <T> org.hibernate.validator.ClassValidator<T> getValidatorByClass(java.lang.Class<T> modelClass)
- Get the cached ClassValidator instance.
- Parameters:
modelClass
- the class to be validated
validate
public org.hibernate.validator.InvalidValue[] validate(javax.el.ValueExpression valueExpression,
javax.el.ELContext elContext,
java.lang.Object value)
- Description copied from interface:
CoreValidator
- Validate that the given value can be assigned to the property given by
the value expression.
- Specified by:
validate
in interface CoreValidator
- Parameters:
valueExpression
- a value expression, referring to a propertyelContext
- the ELContext in which to evaluate the expressionvalue
- a value to be assigned to the property
- Returns:
- a set of potential InvalidValues, from Hibernate Validator
getClientValidatorsForComponent
public java.util.List<ClientValidator> getClientValidatorsForComponent(javax.faces.component.UIComponent component,
javax.el.ELContext elContext)
- Specified by:
getClientValidatorsForComponent
in interface CoreValidator
Copyright © 1998-2010 TeamDev Ltd. All Rights Reserved.