org.jboss.seam.core
@Name(value="org.jboss.seam.core.validators") @BypassInterceptors @Scope(value=APPLICATION) @Install(precedence=0, classDependencies="org.jboss.seam.core.ClassValidator") public class Validators extends Object
Constructor and Description |
---|
Validators() |
Modifier and Type | Method and Description |
---|---|
protected <T> ClassValidator<T> |
createValidator(Class<T> modelClass)
Create a new ClassValidator for the given class, using the current Seam
ResourceBundle.
|
<T> ClassValidator<T> |
getValidator(Class<T> modelClass)
Get the cached ClassValidator instance.
|
<T> ClassValidator<T> |
getValidator(T model)
Get the cached ClassValidator instance.
|
static Validators |
instance() |
Set<javax.validation.ConstraintViolation<Object>> |
validate(javax.el.ValueExpression valueExpression,
javax.el.ELContext elContext,
Object value)
Validate that the given value can be assigned to the property given by the
value expression.
|
public <T> ClassValidator<T> getValidator(T model)
model
- the object to be validatedpublic <T> ClassValidator<T> getValidator(Class<T> modelClass)
modelClass
- the class to be validatedprotected <T> ClassValidator<T> createValidator(Class<T> modelClass)
modelClass
- the class to be validatedpublic Set<javax.validation.ConstraintViolation<Object>> validate(javax.el.ValueExpression valueExpression, javax.el.ELContext elContext, Object value)
valueExpression
- a value expression, referring to a propertyelContext
- the ELContext in which to evaluate the expressionvalue
- a value to be assigned to the propertypublic static Validators instance()
Copyright © 2015 Seam Framework. All Rights Reserved.