@Override public void afterPropertiesSet() { if (this.validatorFactory == null) { this.validatorFactory = Validation.buildDefaultValidatorFactory(); } ValidatorContext validatorContext = this.validatorFactory.usingContext(); MessageInterpolator targetInterpolator = this.messageInterpolator; if (targetInterpolator == null) { targetInterpolator = this.validatorFactory.getMessageInterpolator(); } validatorContext.messageInterpolator(new LocaleContextMessageInterpolator(targetInterpolator)); if (this.traversableResolver != null) { validatorContext.traversableResolver(this.traversableResolver); } setTargetValidator(validatorContext.getValidator()); }
public void afterPropertiesSet() { if (this.validatorFactory == null) { this.validatorFactory = Validation.buildDefaultValidatorFactory(); } ValidatorContext validatorContext = this.validatorFactory.usingContext(); MessageInterpolator targetInterpolator = this.messageInterpolator; if (targetInterpolator == null) { targetInterpolator = this.validatorFactory.getMessageInterpolator(); } validatorContext.messageInterpolator(new LocaleContextMessageInterpolator(targetInterpolator)); if (this.traversableResolver != null) { validatorContext.traversableResolver(this.traversableResolver); } setTargetValidator(validatorContext.getValidator()); }
@Override public ValidatorContext constraintValidatorFactory( final ConstraintValidatorFactory constraintValidatorfactory) { if (constraintValidatorfactory == null) { this.constraintValidatorfactoryEntry = this.factoryConstraintValidatorfactory; } else { this.constraintValidatorfactoryEntry = constraintValidatorfactory; } return this; }
@Override public ValidatorContext parameterNameProvider( final ParameterNameProvider pparameterNameProvider) { if (pparameterNameProvider == null) { this.parameterNameProviderEntry = this.factoryParameterNameProvider; } else { this.parameterNameProviderEntry = pparameterNameProvider; } return this; }
@Override public ValidatorContext usingContext() { Assert.notNull(this.validatorFactory, "No target ValidatorFactory set"); return this.validatorFactory.usingContext(); }
@Override public ValidatorContext usingContext() { return validatorContext; }
@Override public ValidatorContext addValueExtractor(final ValueExtractor<?> extractor) { throw new UnsupportedOperationException("GWT Validation does not support addValueExtractor()."); }
@Override public final ValidatorContext usingContext() { return new GwtValidatorContext(this); }
public ValidatorContext usingContext() { return this.validatorFactory.usingContext(); }
/** * {@inheritDoc} */ public ValidatorContext usingContext() { return validatorFactory.usingContext(); }
@Override public ValidatorContext usingContext() { return factory().usingContext(); }
@Override public ValidatorContext usingContext() { return delegate().usingContext(); }
@Override public ValidatorContext usingContext() { return new CustomValidatorContext(); }
@Override public ValidatorContext constraintValidatorFactory(final ConstraintValidatorFactory factory) { return null; }