chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r881354 - in /incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src: main/java/org/apache/chemistry/atompub/server/CMISProvider.java test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java
Date Tue, 17 Nov 2009 16:19:43 GMT
Author: fguillaume
Date: Tue Nov 17 16:19:43 2009
New Revision: 881354

URL: http://svn.apache.org/viewvc?rev=881354&view=rev
Log:
CMIS-58: fix AtomPub children request with parameters

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/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=881354&r1=881353&r2=881354&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
Tue Nov 17 16:19:43 2009
@@ -84,7 +84,8 @@
         // global workpace collections
         targetBuilder.setTemplate(TargetType.TYPE_COLLECTION,
                 "{target_base}/{collection}{-prefix|/|id}");
-        targetResolver.setPattern("/checkedout", TargetType.TYPE_COLLECTION);
+        targetResolver.setPattern("/checkedout(\\?.*)?",
+                TargetType.TYPE_COLLECTION);
         targetResolver.setPattern("/unfiled", TargetType.TYPE_COLLECTION);
         targetResolver.setPattern("/query",
                 CMISQueryFeed.TARGET_TYPE_CMIS_QUERY);
@@ -93,7 +94,7 @@
         // per-object collections
         targetResolver.setPattern("/parents/([^/?]+)",
                 TargetType.TYPE_COLLECTION, "objectid");
-        targetResolver.setPattern("/children/([^/?]+)",
+        targetResolver.setPattern("/children/([^/?]+)(\\?.*)?",
                 TargetType.TYPE_COLLECTION, "objectid");
         targetResolver.setPattern("/descendants/([^/?]+)(\\?.*)?",
                 TargetType.TYPE_COLLECTION, "objectid");

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=881354&r1=881353&r2=881354&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
Tue Nov 17 16:19:43 2009
@@ -177,6 +177,13 @@
         Element ch = resp.getDocument().getRoot();
         assertNotNull(ch);
 
+        resp = client.get(base + "/children/"
+                + repository.getInfo().getRootFolderId().getId() + "?"
+                + AtomPubCMIS.PARAM_MAX_ITEMS + "=4");
+        assertEquals(200, resp.getStatus());
+        ch = resp.getDocument().getRoot();
+        assertNotNull(ch);
+
         resp = client.get(base + "/object/" + doc3id);
         assertEquals(200, resp.getStatus());
         Element ob = resp.getDocument().getRoot();



Mime
View raw message