Java 类org.glassfish.jersey.server.validation.ValidationConfig 实例源码

项目:rebase-server    文件:ValidationConfigurationContextResolver.java   
@Override
public ValidationConfig getContext(final Class<?> type) {
    return new ValidationConfig()
        .constraintValidatorFactory(
            resourceContext.getResource(InjectingConstraintValidatorFactory.class))
        .parameterNameProvider(new RebaseParameterNameProvider());
}
项目:gitplex-mit    文件:ValidationConfigurationContextResolver.java   
@Override
public ValidationConfig getContext(final Class<?> type) {
    ValidatorFactory factory = AppLoader.getInstance(ValidatorFactory.class);
    ValidationConfig config = new ValidationConfig();
    config.constraintValidatorFactory(factory.getConstraintValidatorFactory());
    config.messageInterpolator(factory.getMessageInterpolator());
    config.parameterNameProvider(factory.getParameterNameProvider());
    config.traversableResolver(factory.getTraversableResolver());
    return config;
}
项目:azeroth    文件:ValidationContextResolver.java   
@Override
public ValidationConfig getContext(final Class<?> type) {
    final ValidationConfig config = new ValidationConfig();
    config.constraintValidatorFactory(
        resourceContext.getResource(InjectingConstraintValidatorFactory.class));
    config.parameterNameProvider(new CustomParameterNameProvider());
    return config;
}
项目:parsec-libraries    文件:ValidationConfigurationContextResolver.java   
/** Get a context. */
@Override
public ValidationConfig getContext(Class<?> type) {
    final ValidationConfig config = new ValidationConfig();
    config.constraintValidatorFactory(resourceContext.getResource(InjectingConstraintValidatorFactory.class));
    CachingParanamer paranamer = new CachingParanamer(new CustomAnnotationParanamer());
    config.parameterNameProvider(new ParanamerParameterNameProvider(paranamer));
    return config;
}
项目:jeesuite-libs    文件:ValidationContextResolver.java   
@Override
public ValidationConfig getContext(final Class<?> type) {
    final ValidationConfig config = new ValidationConfig();
    config.constraintValidatorFactory(resourceContext.getResource(InjectingConstraintValidatorFactory.class));
    config.parameterNameProvider(new CustomParameterNameProvider());
    return config;
}
项目:jim    文件:ValidationConfigurationContextResolver.java   
@Override
public ValidationConfig getContext(final Class<?> type) {
    final ValidationConfig config = new ValidationConfig();
    config.constraintValidatorFactory(resourceContext.getResource(InjectingConstraintValidatorFactory.class));
    config.parameterNameProvider(new CustomParameterNameProvider());
    return config;
}
项目:antioch    文件:ValidationConfigurationContextResolver.java   
@Override
public ValidationConfig getContext(Class<?> type) {
  return new ValidationConfig() //
      // .messageInterpolator(new ResourceBundleMessageInterpolator(//
      // new PlatformResourceBundleLocator("ValidationMessages")))
      .constraintValidatorFactory(resourceContext.getResource(InjectingConstraintValidatorFactory.class));
}
项目:ameba    文件:ValidationFeature.java   
@Override
public ValidationConfig getContext(final Class<?> type) {
    return new ValidationConfig()
            .constraintValidatorFactory(resourceContext.getResource(InjectingConstraintValidatorFactory.class))
            .parameterNameProvider(new ParanamerParameterNameProvider())
            .messageInterpolator(
                    new ResourceBundleMessageInterpolator(
                            buildBundleLocator(VALIDATION_MESSAGE_BUNDLE_NAME),
                            buildBundleLocator(Messages.BUNDLE_NAME),
                            mode.isProd()
                    )
            );
}
项目:sinavi-jfw    文件:ValidationConfigurationContextResolver.java   
/**
 * {@inheritDoc}
 */
@Override
public ValidationConfig getContext(final Class<?> type) {
    final ValidationConfig config = new ValidationConfig();
    config.constraintValidatorFactory(resourceContext.getResource(InjectingConstraintValidatorFactory.class));
    config.parameterNameProvider(new CustomParameterNameProvider());
    config.messageInterpolator(new DefaultMessageInterpolator(Validation.buildDefaultValidatorFactory().getMessageInterpolator()));
    return config;
}
项目:zekke-webapp    文件:WebServiceConfig.java   
/**
 * {@inheritDoc}
 */
@Override
public ValidationConfig getContext(Class<?> type) {
    return new ValidationConfig()
            .messageInterpolator(
                    // TODO: ResourceBundleMessageInterpolator always return default messages
                    new ResourceBundleMessageInterpolator(
                            new PlatformResourceBundleLocator(Messages.RESOURCE_BUNDLE_BASE_NAME)));
}
项目:jaxrs-beanvalidation-javaee7    文件:ValidationConfigurationContextResolver.java   
/**
 * Get a context of type {@code ValidationConfig} that is applicable to the supplied type.
 *
 * @param type the class of object for which a context is desired
 * @return a context for the supplied type or {@code null} if a context for the supplied type is not available from
 *         this provider.
 */
@Override
public ValidationConfig getContext(Class<?> type) {
    final ValidationConfig config = new ValidationConfig();

    config.setMessageInterpolator(new LocaleSpecificMessageInterpolator(Validation.byDefaultProvider().configure()
            .getDefaultMessageInterpolator()));
    config.setParameterNameProvider(new CustomParameterNameProvider());

    return config;
}