Examples of ValidationException


Examples of enterprise.web.tookit.exception.ValidationException

  private final void validarExistenciaEmailUsuario(final String email) throws ValidationException {
    try {
      final UserBeanRemote userBean = this.getServiceUserBean();

      if (userBean.emailExist(email)) {
        throw new ValidationException("E-mail de usu�rio ja existente.");
      }
    } catch (NamingException e) {
      throw new ValidationException("Erro durante a verificacao da existencia do e-mail do usuario", e);
    }
  }
View Full Code Here

Examples of eu.maydu.gwt.validation.client.ValidationException

  private void throwValidationException(String propertyName, String message) throws ValidationException {
    InvalidValueSerializable iv = new InvalidValueSerializable();
    iv.setMessage(message);
    iv.setPropertyName(propertyName);
    if(this.throwOnFirstError) {
      ValidationException ex = new ValidationException();
      ex.getInvalidValues().add(iv);
      throw ex;
    }else {
      invalidPool.add(iv);
    }
  }
View Full Code Here

Examples of exceptions.ValidationException

  }
 
  @Catch(ValidationException.class)
    public static void manageValidationException(Throwable throwable) {
    response.status = StatusCode.BAD_REQUEST;
    ValidationException validationException = (ValidationException) throwable;
    Map<String, String> errorsMap = new HashMap<String, String>();
    for(play.data.validation.Error error : validationException.getErrors()) {
      if(error.getKey().contains(".")) {
        errorsMap.put(error.getKey().substring(error.getKey().indexOf(".")+1),
            error.message());
       
      }
View Full Code Here

Examples of gov.nist.scap.xccdf.ValidationException

        XmlOptions options = new XmlOptions();
        options.setLoadLineNumbers();
        try {
      return sourceContext.getSourceContent().getXmlBeansInstance().getXmlObject().validate(options);
    } catch (XmlException e) {
      throw new ValidationException(e);
    } catch (IOException e) {
      throw new ValidationException(e);
    }
    }
View Full Code Here

Examples of graphjx.structure.ValidationException

    public final Model process(Model model) throws ValidationException {
        if (!model.isValidated()) {
            model.validate();
        }
        if (!model.isValidated()) {
            throw new ValidationException("Cannot validate model");
        }

        Model m = doProcess(model);

        return m;
View Full Code Here

Examples of io.crate.exceptions.ValidationException

        this.inputs = inputs;
        this.overwrites = toNestedStringObjectMap(overwrites);
        try {
            this.uri = new URI(uri);
        } catch (URISyntaxException e) {
            throw new ValidationException(String.format("Invalid uri '%s'", uri), e);
        }
        if (this.uri.getScheme() == null || this.uri.getScheme().equals("file")) {
            this.output = new OutputFile(this.uri, settings);
        } else if (this.uri.getScheme().equalsIgnoreCase("s3")) {
            this.output = new OutputS3(this.uri, settings);
View Full Code Here

Examples of javango.forms.ValidationException

      super(fieldFactory);
    }
     
      public void clean_subject() throws ValidationException {
      if ("wrong".equals(getCleanedData().get("subject"))) {
        throw new ValidationException("Subject is wrong!!");
      }
    }
View Full Code Here

Examples of javax.validation.ValidationException

  
   private static class MockValidator implements Validator
   {
      public BeanDescriptor getConstraintsForClass(Class<?> clazz)
      {
         throw new ValidationException("NYI");
      }
View Full Code Here

Examples of javax.xml.bind.ValidationException

       
            //ValidatableObject vo = Util.toValidatableObject(o);
            ValidatableObject vo = jaxbContext.getGrammarInfo().castToValidatableObject(o);
           
            if(vo==null)
                throw new ValidationException(
                    Messages.format( Messages.NOT_VALIDATABLE ) );
       
            EventInterceptor ei = new EventInterceptor(eventHandler);
            ValidationContext context = new ValidationContext(jaxbContext,ei,validateId);
            context.validate(vo);
            context.reconcileIDs();
           
            return !ei.hadError();
        } catch( SAXException e ) {
            // we need a consistent mechanism to convert SAXException into JAXBException
            Exception nested = e.getException();
            if( nested != null ) {
                throw new ValidationException( nested );
            } else {
                throw new ValidationException( e );
            }
            //return false;
        }
    }
View Full Code Here

Examples of net.buffalo.request.ValidationException

    throw new UnsupportedOperationException("Not implemented yet!");
  }

  public void validate(HttpServletRequest request, HttpServletResponse response) throws ValidationException {
    if (!RequestContext.getContext().getHttpRequest().getMethod().equals("POST")) {
      throw new ValidationException("Upload support http POST only!");
    }
  }
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.