Examples of validate()


Examples of org.springframework.beans.factory.support.AbstractBeanDefinition.validate()

  public void validate(IBean bean, IBeansValidationContext context,
      IProgressMonitor monitor) {
    AbstractBeanDefinition bd = (AbstractBeanDefinition) ((Bean) bean)
        .getBeanDefinition();
    try {
      bd.validate();
    } catch (BeanDefinitionValidationException e) {
      context.error(bean, "INVALID_BEAN_DEFINITION",
          "Invalid bean definition: " + e.getMessage());
    }
  }
View Full Code Here

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

        if (formProperty != null && validator instanceof RichValidator) {
          validationResults.addAllMessages(((RichValidator) validator)
              .validate(getFormObject(), formProperty));
        }
        else {
          validationResults.addAllMessages(validator.validate(getFormObject()));
        }
        validationResults.addAllMessages(additionalValidationResults);
        validationResultsModel.updateValidationResults(validationResults);
      }
    }
View Full Code Here

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

    BeansValidationContextHelper context = new BeansValidationContextHelper(attribute, parent, contextElement,
        project, reporter, validator, QuickfixProcessorFactory.ALIAS, false, reportError, config);

    if (aliasRule != null) {
      aliasRule.validate(beanAlias, context, null);
    }

    return context.getErrorFound();
  }
}
View Full Code Here

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

      BeansValidationContextHelper classContext = new BeansValidationContextHelper(attribute, parent,
          contextElement, project, reporter, validator, QuickfixProcessorFactory.CLASS, false, reportError,
          config);

      classContext.setCurrentRuleDefinition(ruleDefinition);
      classRule.validate(parentBean, classContext, null);

      BeansValidationContextHelper deprecatedContext = new BeansValidationContextHelper(attribute, parent,
          contextElement, project, reporter, validator, QuickfixProcessorFactory.DEPRECATED, false,
          reportError, config);
      ruleDefinition = getValidationRule(project, BeanDeprecationRule.class);
View Full Code Here

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

      ruleDefinition = getValidationRule(project, BeanConstructorArgumentRule.class);
      BeanConstructorArgumentRule argRule = (BeanConstructorArgumentRule) (ruleDefinition != null ? ruleDefinition
          .getRule() : null);
      if (argRule != null) {
        constructorArgContext.setCurrentRuleDefinition(ruleDefinition);
        argRule.validate(parentBean, constructorArgContext, null);
      }

      BeansValidationContextHelper requiredContext = new BeansValidationContextHelper(attribute, parent,
          contextElement, project, reporter, validator, QuickfixProcessorFactory.REQUIRED_PROPERTY, false,
          reportError, config);
View Full Code Here

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

    context = new BeansValidationContextHelper(attribute, parent, config, project, reporter, validator,
        QuickfixProcessorFactory.DEPRECATED, false, reportError, config);

    if (deprecationRule != null) {
      context.setCurrentRuleDefinition(depracationRuleDefinition);
      deprecationRule.validate(parentBean, context, null);
    }

    return context.getErrorFound();

  }
View Full Code Here

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

      }

      BeansValidationContextHelper context = new BeansValidationContextHelper(attribute, parent, contextElement,
          project, reporter, validator, QuickfixProcessorFactory.FACTORY_BEAN, false, reportError, config);
      context.setCurrentRuleDefinition(ruleDefinition);
      rule.validate(parentBean, context, null);

      if (context.getErrorFound()) {
        return true;
      }
    }
View Full Code Here

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

              mergedClassName), new ValidationProblemAttribute("METHOD", attribute.getNodeValue()));
    }

    if (initDestroyMethodRule != null) {
      context.setCurrentRuleDefinition(initRuleDefinition);
      initDestroyMethodRule.validate(parentBean, context, null);
    }

    if (context.getErrorFound()) {
      return true;
    }
View Full Code Here

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

        project, reporter, validator, QuickfixProcessorFactory.PROPERTY, false, reportError, config);
    BeanPropertyHelper property = new BeanPropertyHelper(parent, file, parentBean);

    if (propertyRule != null) {
      context.setCurrentRuleDefinition(propertyRuleDefinition);
      propertyRule.validate(property, context, null);
    }

    if (context.getErrorFound()) {
      return true;
    }
View Full Code Here

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

      BeanReferenceValidationContextHelper context = new BeanReferenceValidationContextHelper(attribute, parent,
          contexlElement, project, reporter, validator, QuickfixProcessorFactory.REF, false, reportError,
          config);
      context.setCurrentRuleDefinition(ruleDefinition);
      refRule.validate(modelElement, context, null);

      if (context.getErrorFound()) {
        return true;
      }
    }
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.