Examples of validate()


Examples of org.springframework.web.bind.WebDataBinder.validate()

          Annotation[] annotations = parameter.getParameterAnnotations();
          for (Annotation annot : annotations) {
            if (annot.annotationType().getSimpleName().startsWith("Valid")) {
              WebDataBinder binder = binderFactory.createBinder(request, arg, partName);
              Object hints = AnnotationUtils.getValue(annot);
              binder.validate(hints instanceof Object[] ? (Object[]) hints : new Object[] {hints});
              BindingResult bindingResult = binder.getBindingResult();
              if (bindingResult.hasErrors()) {
                throw new MethodArgumentNotValidException(parameter, bindingResult);
              }
            }
View Full Code Here

Examples of org.springframework.webflow.validation.ValidationHelper.validate()

      logger.debug("Validating model");
    }
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, getModelExpression()
        .getExpressionString(), expressionParser, messageCodesResolver, mappingResults, validationHintResolver);
    helper.setValidator(this.validator);
    helper.validate();
  }

  private static class PropertyNotFoundError implements MappingResultsCriteria {
    public boolean test(MappingResult result) {
      return result.isError() && "propertyNotFound".equals(result.getCode());
View Full Code Here

Examples of org.springframework.xml.validation.XmlValidator.validate()

    @Test
    public void testValidate() throws Exception {
        XmlValidator validator =
                XmlValidatorFactory.createValidator(getSoapSchemas(), XmlValidatorFactory.SCHEMA_W3C_XML);
        SAXParseException[] errors = validator.validate(soapMessage.getEnvelope().getSource());
        if (errors.length > 0) {
            fail(StringUtils.arrayToCommaDelimitedString(errors));
        }
    }
View Full Code Here

Examples of org.springmodules.validation.bean.BeanValidator.validate()

        person.setPassword("pa");
        person.setConfirmPassword("pa1");

        BindException errors = new BindException(person, "person");
        BeanValidator validator = new BeanValidator(loader);
        validator.validate(person, errors);

        assertEquals(1, errors.getGlobalErrorCount());

    }
}
View Full Code Here

Examples of org.springmodules.validation.valang.predicates.ValidationRule.validate()

        } else {
            tmpTarget = target;
        }
        for (Iterator iter = rules.iterator(); iter.hasNext();) {
            ValidationRule rule = (ValidationRule) iter.next();
            rule.validate(tmpTarget, errors);
        }
        return !errors.hasErrors();
    }

    public void testParser1SimpleRule() {
View Full Code Here

Examples of org.strecks.form.controller.DelegatingForm.validate()

    DelegatingForm delegatingForm = FormTestUtils.getDelegatingForm(form);
    form.setDateField("duff value");

    try
    {
      delegatingForm.validate(null, null);
      Assert.fail();
    }
    catch (ApplicationConfigurationException e)
    {
      Assert.assertEquals(e.getMessage(),
View Full Code Here

Examples of org.switchyard.validate.Validator.validate()

    }

    @Test(expected=SwitchYardException.class)
    public void test_invalid_schemafile() throws IOException, SAXException {
        Validator validator = getValidator("sw-config-invalid-schemafile.xml");
        ValidationResult result = validator.validate(new DefaultMessage().setContent("<order type='A' />"));
    }

    @Test
    public void test_valid_xml() throws IOException, SAXException {
        Validator validator = getValidator("sw-config-xmlv-01.xml");
View Full Code Here

Examples of org.teiid.query.validator.UpdateValidator.validate()

        String deletePlan = qmi.getDeletePlan(virtualGroup.getMetadataID());
        String insertPlan = qmi.getInsertPlan(virtualGroup.getMetadataID());

              List<ElementSymbol> elements = ResolverUtil.resolveElementsInGroup(virtualGroup, qmi);
          UpdateValidator validator = new UpdateValidator(qmi, determineType(insertPlan), determineType(updatePlan), determineType(deletePlan));
        validator.validate(result, elements);
          UpdateInfo info = validator.getUpdateInfo();
          cachedNode.setUpdateInfo(info);
      }
          qmi.addToMetadataCache(virtualGroup.getMetadataID(), cacheString, cachedNode);
        }
View Full Code Here

Examples of org.telluriumsource.module.SignUpModule.validate()

    @Test
    public void testValidate(){
        SignUpModule sum = new SignUpModule();
        sum.defineUi();
        sum.validate("SignUp");
    }

    @Test
    public void testDiagnose(){
        SignUpModule sum = new SignUpModule();
View Full Code Here

Examples of org.uscxml.Interpreter.validate()

      "    <transition target=\"don\" cond=\"%sf\" />" +
      " </state>" +
      " <final />" +
      "</scxml>";
      Interpreter interpreter = Interpreter.fromXML(xml);
      IssueList issues = interpreter.validate();
      for (int i = 0; i < issues.size(); i++) {
        System.out.println(issues.get(i));
      }
           
    } catch (InterpreterException e) {
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.