cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1545766 - in /cxf/trunk: core/src/main/java/org/apache/cxf/validation/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/ systests/jaxrs/src/test/java/org/...
Date Tue, 26 Nov 2013 18:32:25 GMT
Author: sergeyb
Date: Tue Nov 26 18:32:25 2013
New Revision: 1545766

URL: http://svn.apache.org/r1545766
Log:
[CXF-5309] Adding 'Bean' to most of CXF classes supporting Bean Validation

Added:
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationFeature.java
      - copied, changed from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationFeature.java
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationInInterceptor.java
      - copied, changed from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationInInterceptor.java
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationOutInterceptor.java
      - copied, changed from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationOutInterceptor.java
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java
      - copied, changed from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationFeature.java
      - copied, changed from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationFeature.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInInterceptor.java
      - copied, changed from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInvoker.java
      - copied, changed from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInvoker.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationOutInterceptor.java
      - copied, changed from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationOutInterceptor.java
Removed:
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationFeature.java
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationInInterceptor.java
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationOutInterceptor.java
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationFeature.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInvoker.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationOutInterceptor.java
Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSClientServerValidationTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSPerRequestValidationTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/spring/BookStoreWithValidation.java
    cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_spring_validation/WEB-INF/beans.xml

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java?rev=1545766&r1=1545765&r2=1545766&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
(original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
Tue Nov 26 18:32:25 2013
@@ -40,7 +40,7 @@ public abstract class AbstractValidation
     private static final Logger LOG = LogUtils.getL7dLogger(AbstractValidationInterceptor.class);
     
     private Object serviceObject;
-    private volatile ValidationProvider provider;
+    private volatile BeanValidationProvider provider;
     
     public AbstractValidationInterceptor(String phase) {
         super(phase);
@@ -50,7 +50,7 @@ public abstract class AbstractValidation
         this.serviceObject = object;
     }
     
-    public void setProvider(ValidationProvider provider) {
+    public void setProvider(BeanValidationProvider provider) {
         this.provider = provider;
     }
     
@@ -116,13 +116,13 @@ public abstract class AbstractValidation
                                              final Method method, final List<Object>
arguments);
 
 
-    protected ValidationProvider getProvider(Message message) {
+    protected BeanValidationProvider getProvider(Message message) {
         if (provider == null) {
-            Object prop = message.getContextualProperty(ValidationProvider.class.getName());
+            Object prop = message.getContextualProperty(BeanValidationProvider.class.getName());
             if (prop != null) {
-                provider = (ValidationProvider)prop;    
+                provider = (BeanValidationProvider)prop;    
             } else {
-                provider = new ValidationProvider();
+                provider = new BeanValidationProvider();
             }
         }
         return provider;

Copied: cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationFeature.java
(from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationFeature.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationFeature.java?p2=cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationFeature.java&p1=cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationFeature.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationFeature.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationFeature.java Tue
Nov 26 18:32:25 2013
@@ -23,11 +23,11 @@ import org.apache.cxf.feature.AbstractFe
 import org.apache.cxf.interceptor.InterceptorProvider;
 
 
-public class ValidationFeature extends AbstractFeature {
+public class BeanValidationFeature extends AbstractFeature {
 
     @Override
     protected void initializeProvider(InterceptorProvider provider, Bus bus) {
-        provider.getInInterceptors().add(new ValidationInInterceptor());
-        provider.getOutInterceptors().add(new ValidationOutInterceptor());
+        provider.getInInterceptors().add(new BeanValidationInInterceptor());
+        provider.getOutInterceptors().add(new BeanValidationOutInterceptor());
     }
 }

Copied: cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationInInterceptor.java
(from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationInInterceptor.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationInInterceptor.java?p2=cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationInInterceptor.java&p1=cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationInInterceptor.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationInInterceptor.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationInInterceptor.java
Tue Nov 26 18:32:25 2013
@@ -26,13 +26,13 @@ import javax.validation.ValidationExcept
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 
-public class ValidationInInterceptor extends AbstractValidationInterceptor {
+public class BeanValidationInInterceptor extends AbstractValidationInterceptor {
     static final String INPUT_VALIDATION_FAILED = "input.validation.failed";
     
-    public ValidationInInterceptor() {
+    public BeanValidationInInterceptor() {
         super(Phase.PRE_INVOKE);
     }
-    public ValidationInInterceptor(String phase) {
+    public BeanValidationInInterceptor(String phase) {
         super(phase);
     }
 
@@ -41,9 +41,9 @@ public class ValidationInInterceptor ext
                                     final Method method, final List<Object> arguments)
{
         if (arguments.size() > 0) {
             try {
-                ValidationProvider provider = getProvider(message);
+                BeanValidationProvider provider = getProvider(message);
                 provider.validateParameters(resourceInstance, method, unwrapArgs(arguments).toArray());
-                message.getExchange().put(ValidationProvider.class, provider);
+                message.getExchange().put(BeanValidationProvider.class, provider);
             } catch (ValidationException ex) {
                 message.getExchange().put(INPUT_VALIDATION_FAILED, true);
                 throw ex;

Copied: cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationOutInterceptor.java
(from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationOutInterceptor.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationOutInterceptor.java?p2=cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationOutInterceptor.java&p1=cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationOutInterceptor.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationOutInterceptor.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationOutInterceptor.java
Tue Nov 26 18:32:25 2013
@@ -25,12 +25,12 @@ import org.apache.cxf.common.util.Proper
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 
-public class ValidationOutInterceptor extends AbstractValidationInterceptor {
+public class BeanValidationOutInterceptor extends AbstractValidationInterceptor {
     private boolean enforceOnlyBeanConstraints;
-    public ValidationOutInterceptor() {
+    public BeanValidationOutInterceptor() {
         super(Phase.PRE_MARSHAL);
     }
-    public ValidationOutInterceptor(String phase) {
+    public BeanValidationOutInterceptor(String phase) {
         super(phase);
     }
     
@@ -38,9 +38,10 @@ public class ValidationOutInterceptor ex
     protected void handleValidation(final Message message, final Object resourceInstance,
                                     final Method method, final List<Object> arguments)
{
         if (arguments.size() == 1
-            && !PropertyUtils.isTrue(message.getExchange().get(ValidationInInterceptor.INPUT_VALIDATION_FAILED)))
{
+            && !PropertyUtils.isTrue(message.getExchange().get(
+                BeanValidationInInterceptor.INPUT_VALIDATION_FAILED))) {
             Object entity = unwrapEntity(arguments.get(0));
-            ValidationProvider theProvider = getOutProvider(message);
+            BeanValidationProvider theProvider = getOutProvider(message);
             if (isEnforceOnlyBeanConstraints()) {
                 theProvider.validateReturnValue(entity);    
             } else {
@@ -53,8 +54,8 @@ public class ValidationOutInterceptor ex
         return entity;
     }
     
-    protected ValidationProvider getOutProvider(Message message) {
-        ValidationProvider provider = message.getExchange().get(ValidationProvider.class);
+    protected BeanValidationProvider getOutProvider(Message message) {
+        BeanValidationProvider provider = message.getExchange().get(BeanValidationProvider.class);
         return provider == null ? getProvider(message) : provider;
     }
     

Copied: cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java
(from r1545635, cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java?p2=cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java&p1=cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationProvider.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/validation/ValidationProvider.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/validation/BeanValidationProvider.java Tue
Nov 26 18:32:25 2013
@@ -35,12 +35,12 @@ import javax.validation.executable.Execu
 
 import org.apache.cxf.common.logging.LogUtils;
 
-public class ValidationProvider {
-    private static final Logger LOG = LogUtils.getL7dLogger(ValidationProvider.class);
+public class BeanValidationProvider {
+    private static final Logger LOG = LogUtils.getL7dLogger(BeanValidationProvider.class);
     
     private final ValidatorFactory factory;
     
-    public ValidationProvider() {
+    public BeanValidationProvider() {
         try {
             factory = Validation.buildDefaultValidatorFactory();
         } catch (final ValidationException ex) {
@@ -49,11 +49,11 @@ public class ValidationProvider {
         }
     }
     
-    public ValidationProvider(ParameterNameProvider parameterNameProvider) {
+    public BeanValidationProvider(ParameterNameProvider parameterNameProvider) {
         this(new ValidationConfiguration(parameterNameProvider));
     }
     
-    public ValidationProvider(ValidationConfiguration cfg) {
+    public BeanValidationProvider(ValidationConfiguration cfg) {
         try {
             Configuration<?> factoryCfg = Validation.byDefaultProvider().configure();
             initFactoryConfig(factoryCfg, cfg);
@@ -64,24 +64,24 @@ public class ValidationProvider {
         }
     }
     
-    public ValidationProvider(ValidatorFactory factory) {
+    public BeanValidationProvider(ValidatorFactory factory) {
         if (factory == null) {
             throw new NullPointerException("Factory is null");
         }
         this.factory = factory;
     }
     
-    public ValidationProvider(ValidationProviderResolver resolver) {
+    public BeanValidationProvider(ValidationProviderResolver resolver) {
         this(resolver, null);
     }
     
-    public <T extends Configuration<T>> ValidationProvider(
+    public <T extends Configuration<T>> BeanValidationProvider(
         ValidationProviderResolver resolver,
         Class<javax.validation.spi.ValidationProvider<T>> providerType) {
         this(resolver, providerType, null);
     }
     
-    public <T extends Configuration<T>> ValidationProvider(
+    public <T extends Configuration<T>> BeanValidationProvider(
         ValidationProviderResolver resolver,
         Class<javax.validation.spi.ValidationProvider<T>> providerType,
         ValidationConfiguration cfg) {

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationFeature.java
(from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationFeature.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationFeature.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationFeature.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationFeature.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationFeature.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationFeature.java
Tue Nov 26 18:32:25 2013
@@ -23,11 +23,11 @@ import org.apache.cxf.feature.AbstractFe
 import org.apache.cxf.interceptor.InterceptorProvider;
 
 
-public class JAXRSValidationFeature extends AbstractFeature {
+public class JAXRSBeanValidationFeature extends AbstractFeature {
 
     @Override
     protected void initializeProvider(InterceptorProvider provider, Bus bus) {
-        provider.getInInterceptors().add(new JAXRSValidationInInterceptor());
-        provider.getOutInterceptors().add(new JAXRSValidationOutInterceptor());
+        provider.getInInterceptors().add(new JAXRSBeanValidationInInterceptor());
+        provider.getOutInterceptors().add(new JAXRSBeanValidationOutInterceptor());
     }
 }

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInInterceptor.java
(from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInInterceptor.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInInterceptor.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInInterceptor.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInInterceptor.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInInterceptor.java
Tue Nov 26 18:32:25 2013
@@ -25,13 +25,14 @@ import javax.ws.rs.container.ContainerRe
 
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
-import org.apache.cxf.validation.ValidationInInterceptor;
+import org.apache.cxf.validation.BeanValidationInInterceptor;
 
 
-public class JAXRSValidationInInterceptor extends ValidationInInterceptor implements ContainerRequestFilter
{
-    public JAXRSValidationInInterceptor() {
+public class JAXRSBeanValidationInInterceptor extends BeanValidationInInterceptor 
+    implements ContainerRequestFilter {
+    public JAXRSBeanValidationInInterceptor() {
     }
-    public JAXRSValidationInInterceptor(String phase) {
+    public JAXRSBeanValidationInInterceptor(String phase) {
         super(phase);
     }
 

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInvoker.java
(from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInvoker.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInvoker.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInvoker.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInvoker.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationInvoker.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationInvoker.java
Tue Nov 26 18:32:25 2013
@@ -28,18 +28,18 @@ import org.apache.cxf.jaxrs.utils.JAXRSU
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageContentsList;
-import org.apache.cxf.validation.ValidationProvider;
+import org.apache.cxf.validation.BeanValidationProvider;
 
 
-public class JAXRSValidationInvoker extends JAXRSInvoker {
-    private volatile ValidationProvider provider;
+public class JAXRSBeanValidationInvoker extends JAXRSInvoker {
+    private volatile BeanValidationProvider provider;
     private boolean validateServiceObject = true;
     
     @Override
     public Object invoke(Exchange exchange, final Object serviceObject, Method m, List<Object>
params) {
         Message message = JAXRSUtils.getCurrentMessage();
         
-        ValidationProvider theProvider = getProvider(message);
+        BeanValidationProvider theProvider = getProvider(message);
         
         if (isValidateServiceObject()) {
             theProvider.validateBean(serviceObject);
@@ -65,19 +65,19 @@ public class JAXRSValidationInvoker exte
         return response;
     }
     
-    protected ValidationProvider getProvider(Message message) {
+    protected BeanValidationProvider getProvider(Message message) {
         if (provider == null) {
-            Object prop = message.getContextualProperty(ValidationProvider.class.getName());
+            Object prop = message.getContextualProperty(BeanValidationProvider.class.getName());
             if (prop != null) {
-                provider = (ValidationProvider)prop;    
+                provider = (BeanValidationProvider)prop;    
             } else {
-                provider = new ValidationProvider();
+                provider = new BeanValidationProvider();
             }
         }
         return provider;
     }
     
-    public void setProvider(ValidationProvider provider) {
+    public void setProvider(BeanValidationProvider provider) {
         this.provider = provider;
     }
 

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationOutInterceptor.java
(from r1545635, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationOutInterceptor.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationOutInterceptor.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationOutInterceptor.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationOutInterceptor.java&r1=1545635&r2=1545766&rev=1545766&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSValidationOutInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/JAXRSBeanValidationOutInterceptor.java
Tue Nov 26 18:32:25 2013
@@ -27,14 +27,14 @@ import javax.ws.rs.core.Response;
 
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
-import org.apache.cxf.validation.ValidationOutInterceptor;
+import org.apache.cxf.validation.BeanValidationOutInterceptor;
 
 
-public class JAXRSValidationOutInterceptor extends ValidationOutInterceptor
+public class JAXRSBeanValidationOutInterceptor extends BeanValidationOutInterceptor
     implements ContainerResponseFilter {
-    public JAXRSValidationOutInterceptor() {
+    public JAXRSBeanValidationOutInterceptor() {
     }
-    public JAXRSValidationOutInterceptor(String phase) {
+    public JAXRSBeanValidationOutInterceptor(String phase) {
         super(phase);
     }
     

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSClientServerValidationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSClientServerValidationTest.java?rev=1545766&r1=1545765&r2=1545766&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSClientServerValidationTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSClientServerValidationTest.java
Tue Nov 26 18:32:25 2013
@@ -30,13 +30,14 @@ import org.apache.cxf.jaxrs.JAXRSServerF
 import org.apache.cxf.jaxrs.interceptor.JAXRSOutExceptionMapperInterceptor;
 import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
 import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
+import org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInInterceptor;
+import org.apache.cxf.jaxrs.validation.JAXRSBeanValidationOutInterceptor;
 import org.apache.cxf.jaxrs.validation.JAXRSParameterNameProvider;
-import org.apache.cxf.jaxrs.validation.JAXRSValidationInInterceptor;
-import org.apache.cxf.jaxrs.validation.JAXRSValidationOutInterceptor;
 import org.apache.cxf.jaxrs.validation.ValidationExceptionMapper;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.validation.ValidationProvider;
+import org.apache.cxf.validation.BeanValidationInInterceptor;
+import org.apache.cxf.validation.BeanValidationProvider;
 
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -57,14 +58,14 @@ public class JAXRSClientServerValidation
             sf.setProvider(new ValidationExceptionMapper());
 
             sf.setAddress("http://localhost:" + PORT + "/");
-            JAXRSValidationInInterceptor in = new JAXRSValidationInInterceptor();
-            in.setProvider(new ValidationProvider(new JAXRSParameterNameProvider()));
+            BeanValidationInInterceptor in = new JAXRSBeanValidationInInterceptor();
+            in.setProvider(new BeanValidationProvider(new JAXRSParameterNameProvider()));
             sf.setInInterceptors(Arrays.< Interceptor< ? extends Message > >asList(
                 in));
              
             sf.setOutInterceptors(Arrays.< Interceptor< ? extends Message > >asList(
                 new JAXRSOutExceptionMapperInterceptor(),
-                new JAXRSValidationOutInterceptor()));
+                new JAXRSBeanValidationOutInterceptor()));
 
             sf.create();
         }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSPerRequestValidationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSPerRequestValidationTest.java?rev=1545766&r1=1545765&r2=1545766&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSPerRequestValidationTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/JAXRSPerRequestValidationTest.java
Tue Nov 26 18:32:25 2013
@@ -23,7 +23,7 @@ import javax.ws.rs.core.Response.Status;
 
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
-import org.apache.cxf.jaxrs.validation.JAXRSValidationInvoker;
+import org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInvoker;
 import org.apache.cxf.jaxrs.validation.ValidationExceptionMapper;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
@@ -42,7 +42,7 @@ public class JAXRSPerRequestValidationTe
             sf.setProvider(new ValidationExceptionMapper());
 
             sf.setAddress("http://localhost:" + PORT + "/");
-            sf.setInvoker(new JAXRSValidationInvoker());
+            sf.setInvoker(new JAXRSBeanValidationInvoker());
 
             sf.create();
         }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/spring/BookStoreWithValidation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/spring/BookStoreWithValidation.java?rev=1545766&r1=1545765&r2=1545766&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/spring/BookStoreWithValidation.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/validation/spring/BookStoreWithValidation.java
Tue Nov 26 18:32:25 2013
@@ -27,13 +27,13 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.cxf.systest.jaxrs.validation.BookWithValidation;
-import org.apache.cxf.validation.ValidationProvider;
+import org.apache.cxf.validation.BeanValidationProvider;
 
 @Path("/bookstore/")
 public class BookStoreWithValidation {
-    private ValidationProvider provider;
+    private BeanValidationProvider provider;
      
-    public void setProvider(ValidationProvider provider) {
+    public void setProvider(BeanValidationProvider provider) {
         this.provider = provider;
     }
     

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_spring_validation/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_spring_validation/WEB-INF/beans.xml?rev=1545766&r1=1545765&r2=1545766&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_spring_validation/WEB-INF/beans.xml
(original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_spring_validation/WEB-INF/beans.xml
Tue Nov 26 18:32:25 2013
@@ -44,7 +44,7 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
     </jaxrs:server>
     
     <bean id="exceptionMapper" class="org.apache.cxf.jaxrs.validation.ValidationExceptionMapper"/>
-    <bean id="validationProvider" class="org.apache.cxf.validation.ValidationProvider">
+    <bean id="validationProvider" class="org.apache.cxf.validation.BeanValidationProvider">
         <constructor-arg name="parameterNameProvider">
             <bean id="parameterNameProvider" class="org.apache.cxf.jaxrs.validation.JAXRSParameterNameProvider"
/>
         </constructor-arg>
@@ -53,10 +53,10 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
     <bean id="bookStoreWithValidation" class="org.apache.cxf.systest.jaxrs.validation.spring.BookStoreWithValidation">
        <property name="provider" ref="validationProvider" />
     </bean>       
-    <bean id="validationInInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSValidationInInterceptor">
+    <bean id="validationInInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInInterceptor">
         <property name="provider" ref="validationProvider" />
     </bean>
-    <bean id="validationOutInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSValidationOutInterceptor">
+    <bean id="validationOutInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationOutInterceptor">
         <property name="provider" ref="validationProvider" />
     </bean>    
 </beans>



Mime
View raw message