chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r923899 - in /incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src: main/java/org/apache/chemistry/atompub/server/jaxrs/AbderaResource.java test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java
Date Tue, 16 Mar 2010 17:51:59 GMT
Author: fguillaume
Date: Tue Mar 16 17:51:59 2010
New Revision: 923899

URL: http://svn.apache.org/viewvc?rev=923899&view=rev
Log:
CMIS-162: add parents binding to JAX-RS

Modified:
    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/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=923899&r1=923898&r2=923899&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
Tue Mar 16 17:51:59 2010
@@ -276,6 +276,13 @@ public class AbderaResource {
 
     @GET
     @Produces(AtomPub.MEDIA_TYPE_ATOM_FEED)
+    @Path("parents/{objectid}")
+    public Response doGetParents() {
+        return getAbderaFeed();
+    }
+
+    @GET
+    @Produces(AtomPub.MEDIA_TYPE_ATOM_FEED)
     @Path("children/{objectid}")
     public Response doGetChildren() {
         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=923899&r1=923898&r2=923899&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 Mar 16 17:51:59 2010
@@ -253,6 +253,14 @@ public abstract class AtomPubServerTestC
         resp.release();
     }
 
+    public void testParents() throws Exception {
+        ClientResponse resp = client.get(base + "/parents/" + doc2id);
+        assertEquals(HttpStatus.SC_OK, resp.getStatus());
+        Element ch = resp.getDocument().getRoot();
+        assertNotNull(ch);
+        resp.release();
+    }
+
     public void testChildren() throws Exception {
         ClientResponse resp = client.get(base + "/children/" + rootFolderId);
         assertEquals(HttpStatus.SC_OK, resp.getStatus());



Mime
View raw message