use of org.jboss.resteasy.plugins.validation.GeneralValidatorImpl in project syndesis by syndesisio.
the class ValidatorContextResolver method getContext.
@Override
public GeneralValidator getContext(final Class<?> type) {
final ResourceBundleLocator resourceBundleLocator = new PlatformResourceBundleLocator("messages");
final MessageInterpolator messageInterpolator = new ResourceBundleMessageInterpolator(resourceBundleLocator);
final Configuration<?> config = Validation.byDefaultProvider().configure().messageInterpolator(messageInterpolator);
final BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
final boolean isExecutableValidationEnabled = bootstrapConfiguration.isExecutableValidationEnabled();
final Set<ExecutableType> defaultValidatedExecutableTypes = bootstrapConfiguration.getDefaultValidatedExecutableTypes();
return new GeneralValidatorImpl(validatorFactory, isExecutableValidationEnabled, defaultValidatedExecutableTypes);
}
Aggregations