cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1491746 - in /cxf/branches/2.7.x-fixes: ./ distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs...
Date Tue, 11 Jun 2013 11:28:55 GMT
Author: sergeyb
Date: Tue Jun 11 11:28:55 2013
New Revision: 1491746

URL: http://svn.apache.org/r1491746
Log:
Merged revisions 1490431,1491745 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1490431 | sergeyb | 2013-06-06 21:33:07 +0100 (Thu, 06 Jun 2013) | 1 line
  
  Minor updates to get a demo working
........
  r1491745 | sergeyb | 2013-06-11 12:24:49 +0100 (Tue, 11 Jun 2013) | 1 line
  
  [CXF-5065] Setting subresource parent before the subresource gets evaluated
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
    cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
    cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1490431,1491745

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java?rev=1491746&r1=1491745&r2=1491746&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
(original)
+++ cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
Tue Jun 11 11:28:55 2013
@@ -23,6 +23,7 @@ import java.util.Map;
 
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
+import javax.ws.rs.Produces;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
@@ -30,6 +31,7 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.core.Response;
 
 @Path("/customerservice/")
+@Produces("text/xml")
 public class CustomerService {
     long currentId = 123;
     Map<Long, Customer> customers = new HashMap<Long, Customer>();

Modified: cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java?rev=1491746&r1=1491745&r2=1491746&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
(original)
+++ cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
Tue Jun 11 11:28:55 2013
@@ -23,6 +23,7 @@ import java.util.Map;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
 
 import javax.xml.bind.annotation.XmlRootElement;
 

Modified: cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java?rev=1491746&r1=1491745&r2=1491746&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
(original)
+++ cxf/branches/2.7.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
Tue Jun 11 11:28:55 2013
@@ -38,7 +38,7 @@ public class Server {
         new Server();
         System.out.println("Server ready...");
 
-        Thread.sleep(5 * 60 * 1000);
+        Thread.sleep(5 * 6000 * 1000);
         System.out.println("Server exiting");
         System.exit(0);
     }

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java?rev=1491746&r1=1491745&r2=1491746&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
Tue Jun 11 11:28:55 2013
@@ -146,10 +146,9 @@ public class ClassResourceInfo extends B
         SubresourceKey key = new SubresourceKey(typedClass, instanceClass);
         ClassResourceInfo cri = subResources.get(key);
         if (cri == null) {
-            cri = ResourceUtils.createClassResourceInfo(typedClass, instanceClass, false,
resolveContexts,
+            cri = ResourceUtils.createClassResourceInfo(typedClass, instanceClass, this,
false, resolveContexts,
                                                         getBus());
             if (cri != null) {
-                cri.setParent(this);
                 subResources.putIfAbsent(key, cri);
             }
         }
@@ -172,9 +171,6 @@ public class ClassResourceInfo extends B
         subResources.putIfAbsent(new SubresourceKey(cri.getResourceClass(), 
                                             cri.getServiceClass()),
                                  cri);
-        if (cri != this) {
-            cri.setParent(this);
-        }
     }
     
     public Collection<ClassResourceInfo> getSubResources() {
@@ -276,7 +272,7 @@ public class ClassResourceInfo extends B
         }
     }
 
-    void setParent(ClassResourceInfo parent) {
+    public void setParent(ClassResourceInfo parent) {
         this.parent = parent;
     }
 }

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java?rev=1491746&r1=1491745&r2=1491746&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Tue Jun 11 11:28:55 2013
@@ -232,7 +232,17 @@ public final class ResourceUtils {
                                                             boolean root, 
                                                             boolean enableStatic,
                                                             Bus bus) {
+        return createClassResourceInfo(rClass, sClass, null, root, enableStatic, bus);
+    }
+    
+    public static ClassResourceInfo createClassResourceInfo(final Class<?> rClass,

+                                                            final Class<?> sClass,
+                                                            ClassResourceInfo parent,
+                                                            boolean root, 
+                                                            boolean enableStatic,
+                                                            Bus bus) {
         ClassResourceInfo cri = new ClassResourceInfo(rClass, sClass, root, enableStatic,
bus);
+        cri.setParent(parent);
 
         if (root) {
             URITemplate t = URITemplate.createTemplate(cri.getPath());
@@ -261,7 +271,7 @@ public final class ResourceUtils {
                         ClassResourceInfo subCri = cri.findResource(subClass, subClass);
                         if (subCri == null) {
                             subCri = subClass == cri.getServiceClass() ? cri
-                                     : createClassResourceInfo(subClass, subClass, false,
enableStatic,
+                                     : createClassResourceInfo(subClass, subClass, cri, false,
enableStatic,
                                                                cri.getBus());
                         }
                         

Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java?rev=1491746&r1=1491745&r2=1491746&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
Tue Jun 11 11:28:55 2013
@@ -66,6 +66,7 @@ public interface BookSubresource {
     
     @POST
     @Path("/subresource3")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     Book getTheBook3(@FormParam("id") String id,
                      @FormParam("name") List<String> nameParts) throws BookNotFoundFault;
     



Mime
View raw message