Examples of validate()


Examples of com.mycila.xmltool.XMLTag.validate()

    }

    HeaderStyles add(URL styleLocation) {
        notNull(styleLocation, "Style location");
        XMLTag tag = XMLDoc.from(styleLocation, false);
        ValidationResult res = tag.validate(HEADER_STYLES_SCHEMA);
        if (res.hasError()) {
            throw new LicenseManagerException("Style definition at '" + styleLocation + "' is not valid: " + res.getErrorMessages()[0]);
        }
        final String ns = tag.getPefix("http://mycila.com/license/styles/1.0");
        tag.forEachChild(new CallBack() {
View Full Code Here

Examples of com.netflix.genie.common.model.Application.validate()

        if (StringUtils.isBlank(updateApp.getId())) {
            updateApp.setId(id);
        }
        LOG.debug("Called with app " + updateApp.toString());
        final Application app = this.em.merge(updateApp);
        app.validate();
        return app;
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

Examples of com.netflix.genie.common.model.Cluster.validate()

        //Set the id if it's not set so we can merge
        if (StringUtils.isBlank(updateCluster.getId())) {
            updateCluster.setId(id);
        }
        final Cluster cluster = this.em.merge(updateCluster);
        cluster.validate();
        return cluster;
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

Examples of com.netflix.genie.common.model.Command.validate()

        if (StringUtils.isBlank(updateCommand.getId())) {
            updateCommand.setId(id);
        }
        LOG.debug("Called to update command with id " + id + " " + updateCommand.toString());
        final Command command = this.em.merge(updateCommand);
        command.validate();
        return command;
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

Examples of com.opensymphony.xwork.validator.DefaultActionValidatorManager.validate()

  }
 
  @SuppressWarnings("unchecked")
  public void testValidationURLMissing() throws Exception{
    DefaultActionValidatorManager validator = new DefaultActionValidatorManager();
    validator.validate(action, "create");
    assertTrue(action.hasFieldErrors());
    Map<String, Object> errors = action.getFieldErrors();
    assertEquals(1, errors.size());
  }
 
View Full Code Here

Examples of com.opensymphony.xwork2.ActionSupport.validate()

    invalidFieldNames=null;
    actionValidator=null;
    */
    if (invalidValuesFromRequest.isEmpty()) {
      log.debug("Full Hibernate Plugin Validation found no erros.");
      actionAs.validate();
      if (actionAs.hasActionErrors() || actionAs.hasFieldErrors()) {
        log.debug("Full Hibernate Plugin found custom validation errors: "+actionAs.getFieldErrors()+" "+actionAs.getActionErrors());
        return actionAs.input();
      }
      else {
View Full Code Here

Examples of com.opensymphony.xwork2.Validateable.validate()

                }
                exception = e;
            }

            if (alwaysInvokeValidate) {
                validateable.validate();
            }

            if (exception != null) {
                // rethrow if something is wrong while doing validateXXX / validateDoXXX
                throw exception;
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ActionValidatorManager.validate()

    boolean errorsFound = false;
   
    for(Booking booking : bookings)
    {
      try {
        validator.validate(booking, "");
      } catch (ValidationException e) {
        addActionError("Booking for '" + booking.getName() + "' was invalid - "+e.getMessage());
        errorsFound = true;
        e.printStackTrace();
      }
View Full Code Here

Examples of com.opensymphony.xwork2.validator.DefaultActionValidatorManager.validate()

    boolean errorsFound = false;
   
    for(Booking booking : bookings)
    {
      try {
        validator.validate(booking, "");
      } catch (ValidationException e) {
        addActionError("Booking for '" + booking.getName() + "' was invalid - "+e.getMessage());
        errorsFound = true;
        e.printStackTrace();
      }
View Full Code Here

Examples of com.opensymphony.xwork2.validator.validators.EmailValidator.validate()

        EmailValidator validator = new EmailValidator();
        validator.setValidatorContext(new DelegatingValidatorContext(action));
        validator.setFieldName("myEmail");
        validator.setDefaultMessage("invalid email");
        validator.setValueStack(ActionContext.getContext().getValueStack());
        validator.validate(action);

        return (action.getFieldErrors().size() == 0);
    }

    public boolean verifyEmailValidityWithExpression(final String email, final String expression) throws Exception {
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.