Package br.com.caelum.vraptor.validator.beanvalidation

Examples of br.com.caelum.vraptor.validator.beanvalidation.BeanValidatorContext


    return this;
  }

  public <T> Validator addAll(Set<ConstraintViolation<T>>  errors) {
    for (ConstraintViolation<T> v : errors) {
      String msg = interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale);
      String category = v.getPropertyPath().toString();
      add(new SimpleMessage(category, msg));
      logger.debug("added message {}={} for contraint violation", category, msg);
    }
    return this;
View Full Code Here


  @SuppressWarnings("rawtypes")
  private void validate() {
    Set<ConstraintViolation<T>> violations = validator.validate(this.object);
    for (ConstraintViolation constraintViolation : violations) {
      BeanValidatorContext ctx = new BeanValidatorContext(constraintViolation);
      String msg = interpolator.interpolate(constraintViolation.getMessageTemplate(), ctx, locale);
      reject(constraintViolation.getPropertyPath().toString(), msg);
    }

    if (customValidatorMethod != null) {
View Full Code Here

    return this;
  }

  public <T> Validator addAll(Set<ConstraintViolation<T>>  errors) {
    for (ConstraintViolation<T> v : errors) {
      String msg = interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale);
      String category = v.getPropertyPath().toString();
      add(new SimpleMessage(category, msg));
      logger.debug("added message {}={} for contraint violation", category, msg);
    }
    return this;
View Full Code Here

    return this;
  }

  public <T> Validator addAll(Set<ConstraintViolation<T>>  errors) {
    for (ConstraintViolation<T> v : errors) {
      String msg = interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale);
      String category = v.getPropertyPath().toString();
      add(new SimpleMessage(category, msg));
      logger.debug("added message {}={} for contraint violation", category, msg);
    }
    return this;
View Full Code Here

  }

  @Override
  public <T> Validator addAll(String alias, Set<ConstraintViolation<T>> errors) {
    for (ConstraintViolation<T> v : errors) {
      String msg = interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale);
      String category = v.getPropertyPath().toString();
      if (!isNullOrEmpty(alias)) {
        category = alias + "." + category;
      }
View Full Code Here

    return this;
  }

  public <T> Validator addAll(Set<ConstraintViolation<T>>  errors) {
    for (ConstraintViolation<T> v : errors) {
      String msg = interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale);
      String category = v.getPropertyPath().toString();
      add(new SimpleMessage(category, msg));
      logger.debug("added message {}={} for contraint violation", category, msg);
    }
    return this;
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.validator.beanvalidation.BeanValidatorContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.