Examples of validate()


Examples of org.apache.cocoon.precept.Preceptor.validate()


    final protected Collection validate(Map objectModel, String instanceId) throws InvalidXPathSyntaxException, NoSuchNodeException {
        Instance instance = getInstance(objectModel, instanceId);
        Preceptor preceptor = instance.getPreceptor();
        Collection violations = preceptor.validate(instance, null);
        return (violations);
    }


    final protected Collection validate(Map objectModel, String instanceId, String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException {
View Full Code Here

Examples of org.apache.cocoon.validation.Validator.validate()

      int i = 0;
      SortedSet violations = null;
      for (; i < 100; i++)
      {
        // perform validation
        violations = validator.validate( tbean );
      }
      time = System.currentTimeMillis () - time;
      System.out.println( "\nValidation performance:");
      System.out.println( " validate() executed " + i + " times for a total of " + time + " ms");
      System.out.println( "Avarage validation time: " + (time/i) + " ms " );
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.validate()

    public ValidationError validate(Object value, ExpressionContext expressionContext) {
        Iterator validationRulesIt = validationRules.iterator();
        while (validationRulesIt.hasNext()) {
            ValidationRule validationRule = (ValidationRule)validationRulesIt.next();
            ValidationError result = validationRule.validate(value, expressionContext);
            if (result != null)
                return result;
        }
        return null;
    }
View Full Code Here

Examples of org.apache.cocoon.woody.formmodel.Form.validate()

        FormDefinition formDefinition = formManager.getFormDefinition(resolver.resolveURI(formSource));
        Form form = (Form)formDefinition.createInstance();

        Request request = ObjectModelHelper.getRequest(objectModel);
        form.readFromRequest(request, Locale.US);
        boolean validationSuccess = form.validate(Locale.US);
        request.setAttribute(formAttribute, form);

        if (validationSuccess)
            return Collections.EMPTY_MAP;
        else
View Full Code Here

Examples of org.apache.cocoon.woody.validation.WidgetValidator.validate()

            } else {
                // Iterate on local validators
                Iterator iter = this.validators.iterator();
                while(iter.hasNext()) {
                    WidgetValidator validator = (WidgetValidator)iter.next();
                    if (!validator.validate(this, context)) {
                        return false;
                    }
                }
                // All local iterators successful
                return true;
View Full Code Here

Examples of org.apache.commons.cli2.Option.validate()

        for (final Iterator i = options.iterator(); i.hasNext();) {
            final Option option = (Option) i.next();

            // if the child option is required then validate it
            if (option.isRequired()) {
                option.validate(commandLine);
            }

            if (option instanceof Group) {
                option.validate(commandLine);
            }
View Full Code Here

Examples of org.apache.commons.httpclient.cookie.CookieSpec.validate()

            }
            if (cookies != null) {
                for (int j = 0; j < cookies.length; j++) {
                    Cookie cookie = cookies[j];
                    try {
                        parser.validate(
                          conn.getHost(),
                          conn.getPort(),
                          getPath(),
                          conn.isSecure(),
                          cookie);
View Full Code Here

Examples of org.apache.commons.scaffold.util.BizRequest.validate()

                }

                // Validate our business request
                if (messages.isEmpty()) {
                    messages.add(
                        bizRequest.validate(mapping.getAttribute()));
                }
                if (messages.isEmpty()) {

                    setBizRequest(bizRequest);
                }
View Full Code Here

Examples of org.apache.commons.validator.Validator.validate()

    validator.setParameter(Validator.BEAN_PARAM, testBean);
    validator.setParameter(Globals.ERRORS_KEY, errors);

    // Get results of the validation.
    try {
      validator.validate();
    } catch (final ValidatorException e) {
      fail();
    }
    return errors;
  }
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxwsServiceBuilder.validate()

        JAXBDataBinding dataBinding = new JAXBDataBinding();
        dataBinding.setExtraClass(JaxbUtils.findExtraClasses(clazz));
        builder.setDataBinding(dataBinding);
        builder.setServiceClass(clazz);

        builder.validate();
        String soapNS = getSoapNS(clazz);
        builder.setTransportId(soapNS);
        builder.setBus(getBus());
        builder.setBindingId(soapNS);
        return builder;
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.