chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r926031 - in /incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src: main/java/org/apache/chemistry/atompub/server/ main/java/org/apache/chemistry/atompub/server/jaxrs/ test/java/org/apache/chemistry/atompub/server/
Date Mon, 22 Mar 2010 11:11:02 GMT
Author: fguillaume
Date: Mon Mar 22 11:11:02 2010
New Revision: 926031

URL: http://svn.apache.org/viewvc?rev=926031&view=rev
Log:
CMIS-171: fix AtomPub typedescendants link processing

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/jaxrs/AbderaResource.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java?rev=926031&r1=926030&r2=926031&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java
Mon Mar 22 11:11:02 2010
@@ -109,6 +109,8 @@ public class CMISProvider extends Abstra
                 TargetType.TYPE_COLLECTION, "objectid");
         targetResolver.setPattern("/typechildren/([^/?]+)(\\?.*)?",
                 TargetType.TYPE_COLLECTION, "typeid");
+        targetResolver.setPattern("/typedescendants(\\?.*)?",
+                TargetType.TYPE_COLLECTION);
         targetResolver.setPattern("/typedescendants/([^/?]+)(\\?.*)?",
                 TargetType.TYPE_COLLECTION, "typeid");
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/jaxrs/AbderaResource.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/jaxrs/AbderaResource.java?rev=926031&r1=926030&r2=926031&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/jaxrs/AbderaResource.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/jaxrs/AbderaResource.java
Mon Mar 22 11:11:02 2010
@@ -262,6 +262,14 @@ public class AbderaResource {
     @GET
     // TODO produces tree
     @Produces(AtomPub.MEDIA_TYPE_ATOM_FEED)
+    @Path("typedescendants")
+    public Response doGetTypeDescendantsAll() {
+        return getAbderaFeed();
+    }
+
+    @GET
+    // TODO produces tree
+    @Produces(AtomPub.MEDIA_TYPE_ATOM_FEED)
     @Path("typedescendants/{typeid}")
     public Response doGetTypeDescendants() {
         return getAbderaFeed();

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java?rev=926031&r1=926030&r2=926031&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java
Mon Mar 22 11:11:02 2010
@@ -231,6 +231,13 @@ public abstract class AtomPubServerTestC
         el = resp.getDocument().getRoot();
         assertNotNull(el);
         resp.release();
+
+        resp = client.get(base + "/typedescendants");
+        assertEquals(HttpStatus.SC_OK, resp.getStatus());
+        el = resp.getDocument().getRoot();
+        assertNotNull(el);
+        resp.release();
+
         resp = client.get(base + "/typedescendants/doc");
         assertEquals(HttpStatus.SC_OK, resp.getStatus());
         el = resp.getDocument().getRoot();



Mime
View raw message