Examples of ValidationContext


Examples of ca.uhn.hl7v2.validation.ValidationContext

      if (theFactory == null) {
        theFactory = new DefaultModelClassFactory();
      }
     
        myFactory = theFactory;
        ValidationContext validationContext;
    try {
      validationContext = ValidationContextFactory.getContext();
    } catch (ValidationException e) {
      log.warn("Failed to get a validation context from the " +
          "ValidationContextFactory", e);
View Full Code Here

Examples of ca.uhn.hl7v2.validation.ValidationContext

     */   
    public void setValue(String theValue) throws DataTypeException {
        Message message = getMessage();

        if (message != null) {
            ValidationContext context = message.getValidationContext();
            String version = message.getVersion();

            if (context != null) {
                PrimitiveTypeRule[] rules = context.getPrimitiveRules(version, getName(), this);
       
                for (int i = 0; i < rules.length; i++) {
                    theValue = rules[i].correct(theValue);
                    if (!rules[i].test(theValue)) {
                        throw new DataTypeException("Failed validation rule for value \"" + theValue + "\": " + rules[i].getDescription());
View Full Code Here

Examples of com.consol.citrus.validation.context.ValidationContext

        Assert.assertEquals(action.getFaultDetails().size(), 1L);
        Assert.assertEquals(action.getFaultDetails().get(0), "FaultDetail");
       
        Assert.assertEquals(((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().size(), 1L);
       
        ValidationContext xmlValidationContext = ((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().get(0);
        Assert.assertTrue(xmlValidationContext instanceof XmlMessageValidationContext);
        Assert.assertTrue(((XmlMessageValidationContext)xmlValidationContext).isSchemaValidationEnabled());
        Assert.assertEquals(((XmlMessageValidationContext)xmlValidationContext).getSchemaRepository(), "fooSchemaRepository");
        Assert.assertNull(((XmlMessageValidationContext)xmlValidationContext).getSchema());
       
View Full Code Here

Examples of com.emitrom.lienzo.client.core.shape.json.validators.ValidationContext

        {
            return null;
        }
        try
        {
            ValidationContext ctx = new ValidationContext();

            ctx.setValidate(validate);

            ctx.setStopOnError(true); // bail if an error is encountered

            return fromJSON(json, ctx);
        }
        catch (ValidationException e)
        {
View Full Code Here

Examples of de.innovationgate.wga.modules.options.ValidationContext

   
    /**
     * Creates a validation context for option validations
     */
    public ValidationContext createValidationContext(WGAConfiguration configCopy) {
        return new ValidationContext(this, configCopy);
    }
View Full Code Here

Examples of fr.imag.adele.apam.maven.plugin.validation.ValidationContext

            /*
             * Validate components, we validate first the most abstract components so that if there are cross-references
             * among components in the same build we detect errors soon and avoid cascaded errors
             */

            ValidationContext context  = new ValidationContext(new RepositoryChain(projectRepository,acr));
        Validator validator      = new Validator(projectRepository.getClasspath(),context);
       
            ErrorReport validatorResult = new ErrorReport(getLog());
           
      for (ComponentDeclaration component : components) {
View Full Code Here

Examples of net.sourceforge.pebble.web.validation.ValidationContext

    } else if (!blogEntry.isCommentsEnabled()) {
      return new CommentConfirmationView();
    }

    comment = createComment(request, blogEntry);
    ValidationContext context = validateComment(comment);

    // are we previewing or adding the comment?
    String previewButton = I18n.getMessage(blog, "comment.previewButton");

    ContentDecoratorContext decoratorContext = new ContentDecoratorContext();
    decoratorContext.setView(ContentDecoratorContext.DETAIL_VIEW);
    decoratorContext.setMedia(ContentDecoratorContext.HTML_PAGE);

    Comment decoratedComment = (Comment)comment.clone();
    blog.getContentDecoratorChain().decorate(decoratorContext, decoratedComment);
    getModel().put("decoratedComment", decoratedComment);
    getModel().put("undecoratedComment", comment);
    getModel().put("rememberMe", rememberMe);
    getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
    getModel().put(Constants.COMMENT_KEY, comment);
    request.getSession().setAttribute("rememberMe", request.getParameter("rememberMe"));

    if (submitType == null || submitType.equalsIgnoreCase(previewButton) || context.hasErrors()) {
      return new CommentFormView();
    } else {
      CommentConfirmationStrategy strategy = blog.getCommentConfirmationStrategy();

      Comment clonedComment = (Comment)comment.clone();
View Full Code Here

Examples of org.apache.geronimo.validator.ValidationContext

        super(definition);
    }

    public ValidationContext validate() {
        if (context == null) {
            context = new ValidationContext(definition.getQName().toString());
            walkTree();
        }
        return context;
    }
View Full Code Here

Examples of org.apache.geronimo.validator.ValidationContext

        }
        return context;
    }

    public boolean isValid() {
        ValidationContext context = validate();
        return !context.hasFailures() && !context.hasErrors();
    }
View Full Code Here

Examples of org.apache.openejb.config.ValidationContext

        this.moduleType = moduleType;
    }

    public ValidationContext validate() {
        if (context == null) {
            context = new ValidationContext(moduleType, definition.getQName().toString());
            walkTree();
        }
        return context;
    }
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.