Package jodd.vtor

Examples of jodd.vtor.Violation


  /**
   * Adds action violation.
   */
  protected void addViolation(String name, Object invalidValue) {
    prepareValidator();
    vtor.addViolation(new Violation(name, this, invalidValue));
  }
View Full Code Here


    if (violations == null) {
      return StringPool.EMPTY;
    }
    StringBuilder sb = new StringBuilder().append('[');
    for (int i = 0, violationsSize = violations.size(); i < violationsSize; i++) {
      Violation violation = violations.get(i);
      if (i != 0) {
        sb.append(',');
      }
      sb.append('{');
      sb.append("\"name\":\"").append(violation.getName()).append('"').append(',');
      sb.append("\"msg\":\"").append(resolveValidationMessage(request, violation)).append('"');
      sb.append('}');
    }
    sb.append(']');
    return sb.toString();
View Full Code Here

TOP

Related Classes of jodd.vtor.Violation

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.