Examples of ValidationException


Examples of bear.core.except.ValidationException

            CommandLineResult<?> run = result;

            Predicate<String> errorPredicate = or(contains("404 Not Found"), contains("ERROR"));

            if(errorPredicate.apply(run.output)){
                throw new ValidationException("Error during download of " + url +
                    ": " + find(on('\n').split(run.output), errorPredicate));
            }
            return result.getResult();
        }
View Full Code Here

Examples of br.com.caelum.vraptor.validator.ValidationException

    }
    result.include("errors", errors);
    if (Info.isOldComponent(resource.getResource())) {
      info.setResult("invalid");
      result.use(Results.page()).forward();
      throw new ValidationException(new ArrayList<Message>());
    } else {
      return viewsFactory.instanceFor(view, new ArrayList<Message>());
    }
  }
View Full Code Here

Examples of br.com.procempa.modus.services.ValidationException

          if (!String.valueOf(senhaField.getPassword()).equals(
              String.valueOf(senhaRetypeField.getPassword()))) {
            Validation validation = new Validation(
                "Senha n�o confere. Por favor, redigite.");
            throw new ValidationException(validation);
          }

          Logger.info("Iniciando a persistencia");
          usuario = UsuarioDataServices.persist(usuario);
          Logger.info("Persistencia realizada com sucesso");
View Full Code Here

Examples of br.net.woodstock.rockframework.domain.validator.jpa.ValidationException

  }

  @Override
  public Collection<ValidationResult> validate(final Object entity) {
    if (entity == null) {
      throw new ValidationException(this.getMessage(AbstractEntityValidator.MESSAGE_INVALID_OBJECT));
    }

    BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(entity.getClass()).getBeanDescriptor();
    Collection<ValidationResult> collection = new ArrayList<ValidationResult>();
    for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
View Full Code Here

Examples of br.net.woodstock.rockframework.persistence.validator.jpa.ValidationException

  }

  @Override
  public Collection<ValidationResult> validate(final Object entity) {
    if (entity == null) {
      throw new ValidationException(this.getMessage(AbstractEntityValidator.MESSAGE_INVALID_OBJECT));
    }

    BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(entity.getClass()).getBeanDescriptor();
    Collection<ValidationResult> collection = new ArrayList<ValidationResult>();
    for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
View Full Code Here

Examples of ca.uhn.hl7v2.validation.ValidationException

            @Override
            public ValidationException[] test(Message msg) {
                ADT_A01 a01 = (ADT_A01)msg;
                if (a01.getPID().getAdministrativeSex().getValue() == null) {
                    ValidationException[] e = new ValidationException[1];
                    e[0] = new ValidationException("No gender provided!");
                    return e;
                }
                return VALIDATION_OK;
            }
View Full Code Here

Examples of cero.games.ValidationException

    return null;
  }

  public void validateGame(Game game) throws ValidationException {
    if (game.getPlayers().size() < 1)
      throw new ValidationException(
          "You can't play a game with no player !");
    // I suppose there are no games we can't be used in, apart from stupid
    // cases like this one
  }
View Full Code Here

Examples of com.addthis.codec.Codec.ValidationException

                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if (value.getClass() == String.class && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

Examples of com.addthis.codec.validation.ValidationException

                throw new CodecExceptionLineNumber(ex, dstInfo);
            }
            return;
        }
        if (!validate(value)) {
            Exception ex = new ValidationException("invalid field value '" + value +
                "' for " + this.getName() + " in " + dst, getName());
            throw new CodecExceptionLineNumber(ex, valInfo);
        }
        try {
            if ((value.getClass() == String.class) && isInterned()) {
                value = ((String) value).intern();
            }
            field.set(dst, value);
        } catch (Exception ex) {
            throw new CodecExceptionLineNumber(ex.getMessage(), valInfo);
        }
    }
View Full Code Here

Examples of com.alphacsp.cit.validators.ValidationException

        scriptLanucher.addCommand(getExecutableName());
        Process process = scriptLanucher.exec();
        String output = ProcessUtils.readOutput(process).trim();
        int exitCode = process.exitValue();
        if (exitCode != 0 || output.length() == 0) {
            throw new ValidationException("Executable " + getExecutableName() + " was not found!");
        }
        return output;
    }
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.