Examples of ValidationConstraint


Examples of jodd.vtor.ValidationConstraint

  /**
   * Prepares validation messages.
   * Key is either validation constraint class name or violation name.
   */
  public static String resolveValidationMessage(HttpServletRequest request, Violation violation) {
    ValidationConstraint vc = violation.getConstraint();
    String key = vc != null ? vc.getClass().getName() : violation.getName();
    String msg = LocalizationUtil.findMessage(request, key);
    if (msg != null) {
      return beanTemplateParser.parse(msg, violation);
    }
    return null;
View Full Code Here

Examples of org.odftoolkit.odfdom.pkg.ValidationConstraint

    }
    registerProblem(exception, mExpectedFatalError);
  }

  private void registerProblem(SAXParseException exception, Map<ValidationConstraint, Integer> problemOccurances) {
    ValidationConstraint constraint = ((OdfValidationException) exception).getConstraint();
    Integer problemOccurance = problemOccurances.get(constraint);
    if (problemOccurance == null) {
      problemOccurance = 0;
    }
    LOG.log(Level.INFO, "EXPECTED VALIDATION MESSAGE:\"{0}\"", exception.getMessage());
View Full Code Here

Examples of org.odftoolkit.odfdom.pkg.ValidationConstraint

  }

  private void validateProblem(Map<ValidationConstraint, Integer> expectedProblems, String level) {
    Iterator<ValidationConstraint> constraints = expectedProblems.keySet().iterator();
    while (constraints.hasNext()) {
      ValidationConstraint constraint = constraints.next();
      Integer problemOccurance = expectedProblems.get(constraint);
      if (problemOccurance > 0) {
        logMissingConstraint(constraint, level, problemOccurance);
      } else if (problemOccurance < 0) {
        logUnexpectedConstraint(constraint, level, problemOccurance * -1);
 
View Full Code Here

Examples of org.odftoolkit.odfdom.pkg.ValidationConstraint

        boolean bRet = false;
        for (SAXParseException e : m_aExceptionList)
        {
            if (e instanceof OdfValidationException)
            {
                ValidationConstraint aConstraint =
                    ((OdfValidationException) e).getConstraint();
                if (aConstraint instanceof OdfPackageConstraint)
                {
                    switch (((OdfPackageConstraint) aConstraint))
                    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.