Examples of validate()


Examples of org.springframework.ide.eclipse.beans.core.internal.model.validation.rules.NamespaceElementsRule.validate()

      boolean errorFound = false;
      BeanReferenceXmlValidationContextHelper context = new BeanReferenceXmlValidationContextHelper(validator,
          attribute, parent, file, config, contextElement, reporter, reportError);
      String attributeName = attribute.getName();
      context.setCurrentRuleDefinition(ruleDefinition);
      rule.validate(parent, attributeName, context);

      errorFound |= context.getErrorFound();

      if (errorFound) {
        return true;
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.validation.rules.RequiredPropertyRule.validate()

      ruleDefinition = getValidationRule(project, RequiredPropertyRule.class);
      RequiredPropertyRule requiredRule = (RequiredPropertyRule) (ruleDefinition != null ? ruleDefinition
          .getRule() : null);
      if (requiredRule != null) {
        requiredContext.setCurrentRuleDefinition(ruleDefinition);
        requiredRule.validate(parentBean, classContext, null);
      }

      return classContext.getErrorFound() | deprecatedContext.getErrorFound()
          | constructorArgContext.getErrorFound();
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall.validate()

        setError("Select a Boot home directory or zip file");
        return;
      }
      else if (validateHome) {
        IBootInstall install = installFactory.newInstall(urlText.getText(), nameText.getText());
        IStatus status = install.validate();
        if (!status.isOK()) {
          setError(status.getMessage());
        }
        versionText.setText(install.getVersion());
 
View Full Code Here

Examples of org.springframework.ide.eclipse.core.model.validation.IValidator.validate()

        Set<IResource> affectedResources = new LinkedHashSet<IResource>();
        for (IResource resource : resources) {
          affectedResources.addAll(validator.getAffectedResources(resource,
              IncrementalProjectBuilder.INCREMENTAL_BUILD, IResourceDelta.CHANGED));
        }
        validator.validate(affectedResources, IncrementalProjectBuilder.INCREMENTAL_BUILD,
            monitor);
      }
    };
    SafeRunner.run(code);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.internal.model.DefaultRooInstall.validate()

      setError("Select a Roo home directory");
      return;
    }
    else if (validateHome) {
      IRooInstall install = new DefaultRooInstall(homeText.getText(), nameText.getText(), false);
      IStatus status = install.validate();
      if (!status.isOK()) {
        setError(status.getMessage());
      }
      versionText.setText(install.getVersion());
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall.validate()

          setErrorMessage("No Roo installation configured in workspace preferences.");
          setPageComplete(false);
          return;
        }
        else {
          installError = install.validate();
          if (installError != null && !installError.isOK()) {
            setErrorMessage(installError.getMessage());
            setPageComplete(false);
            return;
          }
View Full Code Here

Examples of org.springframework.validation.DataBinder.validate()

    Map<Course , List<FieldError>> executions = new HashMap<Course , List<FieldError>>();
    for(Course course : courses) {
      course.setRegulated(provider.getRegulated());
      DataBinder dataBinder = new DataBinder(course);
      dataBinder.setValidator(validator);
      dataBinder.validate();
      executions.put(course, dataBinder.getBindingResult().getFieldErrors());
      if(!dataBinder.getBindingResult().hasErrors()) {
        this.selectiveCourseStore(course, locale);
      }
    }
View Full Code Here

Examples of org.springframework.validation.Validator.validate()

    public void testApplyCustomValidator() throws Exception {
        Object object = new Object();

        MockControl customValidatorControl = MockControl.createControl(Validator.class);
        Validator customValidator = (Validator)customValidatorControl.getMock();
        customValidator.validate(object, errors);
        configurationControl.expectAndReturn(configuration.getCustomValidator(), customValidator);

        replay();
        validator.applyCustomValidator(configuration, object, errors);
        verify();
View Full Code Here

Examples of org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.validate()

  @Test
  public void testSimpleValidation() throws Exception {
    LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean();
    validator.afterPropertiesSet();
    ValidPerson person = new ValidPerson();
    Set<ConstraintViolation<ValidPerson>> result = validator.validate(person);
    assertEquals(2, result.size());
    for (ConstraintViolation<ValidPerson> cv : result) {
      String path = cv.getPropertyPath().toString();
      if ("name".equals(path) || "address.street".equals(path)) {
        assertTrue(cv.getConstraintDescriptor().getAnnotation() instanceof NotNull);
View Full Code Here

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

        RopRequest bindObject = BeanUtils.instantiateClass(requestType);
        ServletRequestDataBinder dataBinder = new ServletRequestDataBinder(bindObject, "bindObject");
        dataBinder.setConversionService(getFormattingConversionService());
        dataBinder.setValidator(getValidator());
        dataBinder.bind(webRequest);
        dataBinder.validate();
        return dataBinder.getBindingResult();
    }

    private Validator getValidator() {
        if (this.validator == null) {
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.