Package javax.validation

Examples of javax.validation.Configuration.addMapping()


    }

    if (this.mappingLocations != null) {
      for (Resource location : this.mappingLocations) {
        try {
          configuration.addMapping(location.getInputStream());
        }
        catch (IOException ex) {
          throw new IllegalStateException("Cannot read mapping resource: " + location);
        }
      }
View Full Code Here


    }

    if (this.mappingLocations != null) {
      for (Resource location : this.mappingLocations) {
        try {
          configuration.addMapping(location.getInputStream());
        }
        catch (IOException ex) {
          throw new IllegalStateException("Cannot read mapping resource: " + location);
        }
      }
View Full Code Here

    }

    if (this.mappingLocations != null) {
      for (Resource location : this.mappingLocations) {
        try {
          configuration.addMapping(location.getInputStream());
        }
        catch (IOException ex) {
          throw new IllegalStateException("Cannot read mapping resource: " + location);
        }
      }
View Full Code Here

    }

    if (this.mappingLocations != null) {
      for (Resource location : this.mappingLocations) {
        try {
          configuration.addMapping(location.getInputStream());
        }
        catch (IOException ex) {
          throw new IllegalStateException("Cannot read mapping resource: " + location);
        }
      }
View Full Code Here

  @TestForIssue(jiraKey = "HV-920")
  public void url_validator_using_regexp_only_can_be_configured_via_xml() {
    Configuration config = ValidatorUtil.getConfiguration();

    InputStream mappingStream = URLValidatorTest.class.getResourceAsStream( "mapping.xml" );
    config.addMapping( mappingStream );

    DelegatingConstraintValidatorFactory constraintValidatorFactory = new DelegatingConstraintValidatorFactory(
        config.getDefaultConstraintValidatorFactory()
    );
    config.constraintValidatorFactory( constraintValidatorFactory );
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.