javax.validation.ValidationProviderResolver Java Examples

The following examples show how to use javax.validation.ValidationProviderResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BeanValidationProvider.java    From cxf with Apache License 2.0 5 votes vote down vote up
public <T extends Configuration<T>, U extends ValidationProvider<T>> BeanValidationProvider(
    ValidationProviderResolver resolver,
    Class<U> providerType,
    ValidationConfiguration cfg) {
    try {
        Configuration<?> factoryCfg = providerType != null
            ? Validation.byProvider(providerType).providerResolver(resolver).configure()
            : Validation.byDefaultProvider().providerResolver(resolver).configure();
        initFactoryConfig(factoryCfg, cfg);
        factory = factoryCfg.buildValidatorFactory();
    } catch (final ValidationException ex) {
        LOG.severe("Bean Validation provider can not be found, no validation will be performed");
        throw ex;
    }
}
 
Example #2
Source File: SubstituteValidatorFactories.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Substitute
private static ValidationProviderResolver resolveValidationProviderResolver(
        boolean osgi,
        ValidationProviderResolver validationProviderResolver) {
    return validationProviderResolver;
}
 
Example #3
Source File: BeanValidationProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
public BeanValidationProvider(ValidationProviderResolver resolver) {
    this(resolver, null);
}
 
Example #4
Source File: BeanValidationProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
public <T extends Configuration<T>, U extends ValidationProvider<T>> BeanValidationProvider(
    ValidationProviderResolver resolver,
    Class<U> providerType) {
    this(resolver, providerType, null);
}
 
Example #5
Source File: LocalValidatorFactoryBean.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Specify a JSR-303 {@link ValidationProviderResolver} for bootstrapping the
 * provider of choice, as an alternative to {@code META-INF} driven resolution.
 * @since 4.3
 */
public void setValidationProviderResolver(ValidationProviderResolver validationProviderResolver) {
	this.validationProviderResolver = validationProviderResolver;
}
 
Example #6
Source File: LocalValidatorFactoryBean.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Specify a JSR-303 {@link ValidationProviderResolver} for bootstrapping the
 * provider of choice, as an alternative to {@code META-INF} driven resolution.
 * @since 4.3
 */
public void setValidationProviderResolver(ValidationProviderResolver validationProviderResolver) {
	this.validationProviderResolver = validationProviderResolver;
}
 
Example #7
Source File: LocalValidatorFactoryBean.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Specify a JSR-303 {@link ValidationProviderResolver} for bootstrapping the
 * provider of choice, as an alternative to {@code META-INF} driven resolution.
 * @since 4.3
 */
public void setValidationProviderResolver(ValidationProviderResolver validationProviderResolver) {
	this.validationProviderResolver = validationProviderResolver;
}