org.nuiton.validator.bean
Class BeanValidatorUtil

java.lang.Object
  extended by org.nuiton.validator.bean.BeanValidatorUtil

public class BeanValidatorUtil
extends Object

The helper class for bean validation module.

Since:
2.0
Author:
tchemit

Constructor Summary
protected BeanValidatorUtil()
           
 
Method Summary
static void convert(BeanValidator<?> validator, String fieldName, String value, Class<?> valueClass)
          Convert a value to a given type and then if was succesffull try to set it in the bean manage by the validator.
static EnumSet<NuitonValidatorScope> getScopes(List<BeanValidatorMessage<?>> messages)
           
static EnumMap<NuitonValidatorScope,Integer> getScopesCount(List<BeanValidatorMessage<?>> messages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanValidatorUtil

protected BeanValidatorUtil()
Method Detail

convert

public static void convert(BeanValidator<?> validator,
                           String fieldName,
                           String value,
                           Class<?> valueClass)
Convert a value to a given type and then if was succesffull try to set it in the bean manage by the validator.

Parameters:
validator - validator to be involved
fieldName - the name of the bean property
value - the actual value to convert
valueClass - the type of the conversion

getScopes

public static EnumSet<NuitonValidatorScope> getScopes(List<BeanValidatorMessage<?>> messages)

getScopesCount

public static EnumMap<NuitonValidatorScope,Integer> getScopesCount(List<BeanValidatorMessage<?>> messages)


Copyright © 2011 CodeLutin. All Rights Reserved.