incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r930274 - in /incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice: ConfigurationStateProvider.java ValidationModule.java
Date Fri, 02 Apr 2010 14:07:15 GMT
Author: simonetripodi
Date: Fri Apr  2 14:07:14 2010
New Revision: 930274

URL: http://svn.apache.org/viewvc?rev=930274&view=rev
Log:
let's try without BootstrapState reference first...

Modified:
    incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
    incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java

Modified: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java?rev=930274&r1=930273&r2=930274&view=diff
==============================================================================
--- incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
(original)
+++ incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
Fri Apr  2 14:07:14 2010
@@ -19,7 +19,6 @@ package org.apache.bval.extentions.guice
 import javax.validation.ConstraintValidatorFactory;
 import javax.validation.MessageInterpolator;
 import javax.validation.TraversableResolver;
-import javax.validation.spi.BootstrapState;
 import javax.validation.spi.ConfigurationState;
 import javax.validation.spi.ValidationProvider;
 
@@ -40,8 +39,8 @@ public final class ConfigurationStatePro
     private final ConfigurationImpl configurationState;
 
     @Inject
-    public ConfigurationStateProvider(BootstrapState aState, ValidationProvider<?>
aProvider) {
-        this.configurationState = new ConfigurationImpl(aState, aProvider);
+    public ConfigurationStateProvider(ValidationProvider<?> aProvider) {
+        this.configurationState = new ConfigurationImpl(null, aProvider);
     }
 
     @Inject

Modified: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java?rev=930274&r1=930273&r2=930274&view=diff
==============================================================================
--- incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java
(original)
+++ incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java
Fri Apr  2 14:07:14 2010
@@ -22,6 +22,7 @@ import javax.validation.TraversableResol
 import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
 import javax.validation.spi.ConfigurationState;
+import javax.validation.spi.ValidationProvider;
 
 import org.apache.bval.constraints.AssertFalseValidator;
 import org.apache.bval.constraints.AssertTrueValidator;
@@ -60,6 +61,7 @@ import org.apache.bval.constraints.SizeV
 import org.apache.bval.constraints.SizeValidatorForCollection;
 import org.apache.bval.constraints.SizeValidatorForMap;
 import org.apache.bval.constraints.SizeValidatorForString;
+import org.apache.bval.jsr303.ApacheValidationProvider;
 import org.apache.bval.jsr303.DefaultMessageInterpolator;
 import org.apache.bval.jsr303.resolver.DefaultTraversableResolver;
 
@@ -121,6 +123,7 @@ public final class ValidationModule exte
         this.bind(MessageInterpolator.class).to(DefaultMessageInterpolator.class).in(Scopes.SINGLETON);
         this.bind(TraversableResolver.class).to(DefaultTraversableResolver.class).in(Scopes.SINGLETON);
         this.bind(ConstraintValidatorFactory.class).to(GuiceAwareConstraintValidatorFactory.class);
+        this.bind(ValidationProvider.class).to(ApacheValidationProvider.class).in(Scopes.SINGLETON);
         this.bind(ConfigurationState.class).toProvider(ConfigurationStateProvider.class);
         this.bind(ValidatorFactory.class).toProvider(ValidatorFactoryProvider.class);
         this.bind(Validator.class).toProvider(ValidatorProvider.class);



Mime
View raw message