Package org.hibernate.validator.resourceloading

Examples of org.hibernate.validator.resourceloading.PlatformResourceBundleLocator$GetClassLoader


    validationBootstrapParameters.setProvider( provider );
  }

  private ConfigurationImpl() {
    this.validationBootstrapParameters = new ValidationBootstrapParameters();
    this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES );
    this.defaultMessageInterpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator );
    this.defaultTraversableResolver = new DefaultTraversableResolver();
    this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl();
    this.defaultParameterNameProvider = new DefaultParameterNameProvider();
  }
View Full Code Here


  public void messagesRetrievedFromSpecificBundle() {
    Validator validator = Validation.byDefaultProvider()
        .configure()
        .messageInterpolator(
            new ResourceBundleMessageInterpolator(
                new PlatformResourceBundleLocator( "MyMessages" )
            )
        )
        .buildValidatorFactory()
        .getValidator();
View Full Code Here

  public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
    defaultLocale = Locale.getDefault();

    if ( userResourceBundleLocator == null ) {
      this.userResourceBundleLocator = new PlatformResourceBundleLocator( USER_VALIDATION_MESSAGES );
    }
    else {
      this.userResourceBundleLocator = userResourceBundleLocator;
    }

    this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( DEFAULT_VALIDATION_MESSAGES );
    this.cachingEnabled = cacheMessages;

    if ( cachingEnabled ) {
      this.resolvedMessages = new ConcurrentReferenceHashMap<LocalizedMessage, String>(
          DEFAULT_INITIAL_CAPACITY,
View Full Code Here

    validationBootstrapParameters.setProvider( provider );
  }

  private ConfigurationImpl() {
    this.validationBootstrapParameters = new ValidationBootstrapParameters();
    this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES );
    this.defaultTraversableResolver = new DefaultTraversableResolver();
    this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl();
    this.defaultParameterNameProvider = new DefaultParameterNameProvider();
    this.defaultMessageInterpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator );
  }
View Full Code Here

    validationBootstrapParameters.setProvider( provider );
  }

  private ConfigurationImpl() {
    this.validationBootstrapParameters = new ValidationBootstrapParameters();
    this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES );
    this.defaultTraversableResolver = new DefaultTraversableResolver();
    this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl();
    this.defaultParameterNameProvider = new DefaultParameterNameProvider();
    this.defaultMessageInterpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator );
  }
View Full Code Here

  public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
    defaultLocale = Locale.getDefault();

    if ( userResourceBundleLocator == null ) {
      this.userResourceBundleLocator = new PlatformResourceBundleLocator( USER_VALIDATION_MESSAGES );
    }
    else {
      this.userResourceBundleLocator = userResourceBundleLocator;
    }

    this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( DEFAULT_VALIDATION_MESSAGES );
    this.cacheMessages = cacheMessages;
  }
View Full Code Here

  public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
    defaultLocale = Locale.getDefault();

    if ( userResourceBundleLocator == null ) {
      this.userResourceBundleLocator = new PlatformResourceBundleLocator( USER_VALIDATION_MESSAGES );
    }
    else {
      this.userResourceBundleLocator = userResourceBundleLocator;
    }

    this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( DEFAULT_VALIDATION_MESSAGES );
    this.cacheMessages = cacheMessages;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.resourceloading.PlatformResourceBundleLocator$GetClassLoader

Copyright © 2018 www.massapicom. 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.