chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r880913 - in /incubator/chemistry/trunk/chemistry: chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ chemistry-atompub-server/src/main/jav...
Date Mon, 16 Nov 2009 19:15:23 GMT
Author: fguillaume
Date: Mon Nov 16 19:15:22 2009
New Revision: 880913

URL: http://svn.apache.org/viewvc?rev=880913&view=rev
Log:
Better AtomPub descendants link management

Added:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java
  (with props)
Modified:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
Mon Nov 16 19:15:22 2009
@@ -129,7 +129,8 @@
         APPObjectEntry entry = newObjectEntry(typeId);
         if (folder != null) {
             entry.addLink(AtomPub.LINK_UP,
-                    ((APPFolder) folder).entry.getEditLink());
+                    ((APPFolder) folder).entry.getEditLink(),
+                    AtomPub.MEDIA_TYPE_ATOM_ENTRY);
         }
         return new APPDocument(entry, type);
     }
@@ -143,7 +144,8 @@
         if (folder != null) {
             entry._setValue(Property.PARENT_ID, folder.getId());
             entry.addLink(AtomPub.LINK_UP,
-                    ((APPFolder) folder).entry.getEditLink());
+                    ((APPFolder) folder).entry.getEditLink(),
+                    AtomPub.MEDIA_TYPE_ATOM_ENTRY);
         }
         return new APPFolder(entry, type);
     }
@@ -203,40 +205,23 @@
         return list;
     }
 
-    /**
-     * Accumulates the descendants into a list recursively.
-     *
-     * @param includeRenditions TODO
-     */
-    protected void accumulateDescendants(ObjectId folder, int depth,
-            String filter, boolean includeAllowableActions,
-            boolean includeRelationships, boolean includeRenditions,
-            String orderBy, List<ObjectEntry> list) {
-        // TODO deal with paging properly
-        List<ObjectEntry> children = getChildren(folder, filter,
-                includeAllowableActions, includeRelationships,
-                includeRenditions, Integer.MAX_VALUE, 0, orderBy,
-                new boolean[1]);
-        for (ObjectEntry child : children) {
-            list.add(child);
-            if (depth > 1 && child.getBaseType() == BaseType.FOLDER) {
-                accumulateDescendants(child, depth - 1, filter,
-                        includeAllowableActions, includeRelationships,
-                        includeRenditions, orderBy, list);
-            }
-        }
-    }
-
-    // TODO use descendants feed
     public List<ObjectEntry> getDescendants(ObjectId folder, int depth,
             String filter, boolean includeAllowableActions,
             boolean includeRelationships, boolean includeRenditions,
             String orderBy) {
         // TODO includeRelationship, includeAllowableActions, orderBy
-        List<ObjectEntry> list = new ArrayList<ObjectEntry>();
-        accumulateDescendants(folder, depth, filter, includeAllowableActions,
-                includeRelationships, includeRenditions, orderBy, list);
-        return list;
+        // TODO filter, includeRenditions
+        String href = getObjectEntry(folder).getLink(AtomPub.LINK_DOWN,
+                AtomPubCMIS.MEDIA_TYPE_CMIS_TREE);
+        Request req = new Request(href);
+        req.setParameter(AtomPubCMIS.PARAM_DEPTH, Integer.toString(depth));
+        Response resp = connector.get(req);
+        if (!resp.isOk()) {
+            throw new ContentManagerException(
+                    "Remote server returned error code: "
+                            + resp.getStatusCode());
+        }
+        return resp.getObjectFeed(new ReadContext(this));
     }
 
     public List<ObjectEntry> getChildren(ObjectId folder, String filter,
@@ -251,7 +236,8 @@
             skipCount = 0;
         }
 
-        String href = getObjectEntry(folder).getLink(AtomPub.LINK_DOWN);
+        String href = getObjectEntry(folder).getLink(AtomPub.LINK_DOWN,
+                AtomPub.MEDIA_TYPE_ATOM_FEED);
         Response resp = connector.get(new Request(href));
         if (!resp.isOk()) {
             throw new ContentManagerException(
@@ -294,7 +280,8 @@
         if (current.getId().equals(rootId)) {
             return null;
         }
-        String href = current.getLink(AtomPub.LINK_UP);
+        String href = current.getLink(AtomPub.LINK_UP,
+                AtomPub.MEDIA_TYPE_ATOM_ENTRY);
         if (href == null) {
             return null;
         }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java
Mon Nov 16 19:15:22 2009
@@ -27,6 +27,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.regex.Pattern;
 
 import javax.xml.namespace.QName;
 
@@ -60,7 +61,42 @@
 
     protected Map<QName, Boolean> allowableActions;
 
-    protected final List<String> links;
+    protected final List<Link> links;
+
+    public static class Link {
+        public final String rel;
+
+        public final String href;
+
+        public final String type;
+
+        public Link(String rel, String href, String type) {
+            this.rel = rel == null ? "" : rel;
+            this.href = href;
+            this.type = canonicalType(type);
+        }
+
+        public static final Pattern TYPE_EQ = Pattern.compile("type=",
+                Pattern.CASE_INSENSITIVE);
+
+        /**
+         * Simplified version of RFC 2045 media type syntax.
+         */
+        public static String canonicalType(String type) {
+            if (type == null) {
+                return null;
+            }
+            type = type.replace("\"", "");
+            type = type.replace(" ", "");
+            type = TYPE_EQ.matcher(type).replaceAll("type=");
+            return type;
+        }
+
+        @Override
+        public String toString() {
+            return "Link(" + rel + ',' + href + ',' + type + ')';
+        }
+    }
 
     public APPObjectEntry(APPConnection connection,
             Map<String, XmlProperty> properties,
@@ -73,12 +109,11 @@
             allowableActions = Collections.unmodifiableMap(allowableActions);
         }
         this.allowableActions = allowableActions;
-        links = new ArrayList<String>();
+        links = new ArrayList<Link>();
     }
 
-    public void addLink(String rel, String href) {
-        links.add(rel == null ? "" : rel);
-        links.add(href);
+    public void addLink(String rel, String href, String type) {
+        links.add(new Link(rel, href, type));
     }
 
     public String[] getLinks() {
@@ -86,9 +121,19 @@
     }
 
     public String getLink(String rel) {
-        for (int i = 0, len = links.size(); i < len; i += 2) {
-            if (rel.equals(links.get(i))) {
-                return links.get(i + 1);
+        for (Link link : links) {
+            if (rel.equals(link.rel)) {
+                return link.href;
+            }
+        }
+        return null;
+    }
+
+    public String getLink(String rel, String type) {
+        String ctype = Link.canonicalType(type);
+        for (Link link : links) {
+            if (rel.equals(link.rel) && ctype.equals(link.type)) {
+                return link.href;
             }
         }
         return null;

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java
Mon Nov 16 19:15:22 2009
@@ -73,7 +73,8 @@
         if ("link".equals(name)) {
             String rel = reader.getAttributeValue(AtomPub.ATOM_NS, "rel");
             String href = reader.getAttributeValue(AtomPub.ATOM_NS, "href");
-            object.addLink(rel, href);
+            String type = reader.getAttributeValue(AtomPub.ATOM_NS, "type");
+            object.addLink(rel, href, type);
             // } else if ("id".equals(name)) {
             // object.id = new URI(id);
         }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
Mon Nov 16 19:15:22 2009
@@ -58,7 +58,8 @@
         if ("link".equals(reader.getLocalName())) {
             String rel = reader.getAttributeValue(AtomPub.ATOM_NS, "rel");
             String href = reader.getAttributeValue(AtomPub.ATOM_NS, "href");
-            object.addLink(rel, href);
+            String type = reader.getAttributeValue(AtomPub.ATOM_NS, "type");
+            object.addLink(rel, href, type);
         }
     }
 

Added: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java?rev=880913&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java
(added)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java
Mon Nov 16 19:15:22 2009
@@ -0,0 +1,31 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.atompub.client;
+
+import junit.framework.TestCase;
+
+import org.apache.chemistry.atompub.client.APPObjectEntry.Link;
+
+public class LinkTest extends TestCase {
+
+    public void testLink() throws Exception {
+        assertNull(Link.canonicalType(null));
+        assertEquals("foo/bar", Link.canonicalType("foo/bar"));
+        assertEquals("foo/bar;type=gee", Link.canonicalType("foo/bar; TYPE = \"gee\""));
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/LinkTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
Mon Nov 16 19:15:22 2009
@@ -28,6 +28,7 @@
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.SPI;
 import org.apache.chemistry.atompub.AtomPub;
+import org.apache.chemistry.atompub.AtomPubCMIS;
 
 /**
  * CMIS Collection for the checked out documents.
@@ -61,17 +62,17 @@
             throws ResponseContextException {
         SPI spi = repository.getSPI(); // TODO XXX connection leak
         Target target = request.getTarget();
-        ObjectId folderId = target.getParameter(PARAM_FOLDER_ID) == null ? null
-                : spi.newObjectId(target.getParameter(PARAM_FOLDER_ID));
-        String filter = target.getParameter(PARAM_FILTER);
-        int maxItems = target.getParameter(PARAM_MAX_ITEMS) == null ? 0
-                : Integer.parseInt(target.getParameter(PARAM_MAX_ITEMS));
-        int skipCount = target.getParameter(PARAM_SKIP_COUNT) == null ? 0
-                : Integer.parseInt(target.getParameter(PARAM_SKIP_COUNT));
-        boolean includeAllowableActions = target.getParameter(PARAM_ALLOWABLE_ACTIONS) ==
null ? false
-                : Boolean.parseBoolean(target.getParameter(PARAM_ALLOWABLE_ACTIONS));
-        boolean includeRelationships = target.getParameter(PARAM_RELATIONSHIPS) == null ?
false
-                : Boolean.parseBoolean(target.getParameter(PARAM_RELATIONSHIPS));
+        ObjectId folderId = target.getParameter(AtomPubCMIS.PARAM_FOLDER_ID) == null ? null
+                : spi.newObjectId(target.getParameter(AtomPubCMIS.PARAM_FOLDER_ID));
+        String filter = target.getParameter(AtomPubCMIS.PARAM_FILTER);
+        int maxItems = target.getParameter(AtomPubCMIS.PARAM_MAX_ITEMS) == null ? 0
+                : Integer.parseInt(target.getParameter(AtomPubCMIS.PARAM_MAX_ITEMS));
+        int skipCount = target.getParameter(AtomPubCMIS.PARAM_SKIP_COUNT) == null ? 0
+                : Integer.parseInt(target.getParameter(AtomPubCMIS.PARAM_SKIP_COUNT));
+        boolean includeAllowableActions = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS)
== null ? false
+                : Boolean.parseBoolean(target.getParameter(AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS));
+        boolean includeRelationships = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS)
== null ? false
+                : Boolean.parseBoolean(target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS));
         boolean[] hasMoreItems = new boolean[1];
         Collection<ObjectEntry> objectEntries = spi.getCheckedOutDocuments(
                 folderId, filter, includeAllowableActions,

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISChildrenCollection.java
Mon Nov 16 19:15:22 2009
@@ -29,6 +29,7 @@
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.SPI;
 import org.apache.chemistry.atompub.AtomPub;
+import org.apache.chemistry.atompub.AtomPubCMIS;
 
 /**
  * CMIS Collection for the children of an object.
@@ -79,27 +80,27 @@
         SPI spi = repository.getSPI(); // TODO XXX connection leak
         ObjectId objectId = spi.newObjectId(id);
         Target target = request.getTarget();
-        String filter = target.getParameter(PARAM_FILTER);
-        boolean includeAllowableActions = target.getParameter(PARAM_ALLOWABLE_ACTIONS) ==
null ? false
-                : Boolean.parseBoolean(target.getParameter(PARAM_ALLOWABLE_ACTIONS));
-        boolean includeRelationships = target.getParameter(PARAM_RELATIONSHIPS) == null ?
false
-                : Boolean.parseBoolean(target.getParameter(PARAM_RELATIONSHIPS));
+        String filter = target.getParameter(AtomPubCMIS.PARAM_FILTER);
+        boolean includeAllowableActions = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS)
== null ? false
+                : Boolean.parseBoolean(target.getParameter(AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS));
+        boolean includeRelationships = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS)
== null ? false
+                : Boolean.parseBoolean(target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS));
         // TODO proper renditionFilter use
-        boolean includeRenditions = target.getParameter(PARAM_RENDITION_FILTER) == null ?
false
+        boolean includeRenditions = target.getParameter(AtomPubCMIS.PARAM_RENDITION_FILTER)
== null ? false
                 : true;
-        String orderBy = target.getParameter(PARAM_ORDER_BY);
+        String orderBy = target.getParameter(AtomPubCMIS.PARAM_ORDER_BY);
         if ("descendants".equals(getType())) {
-            int depth = target.getParameter(PARAM_DEPTH) == null ? 1
-                    : Integer.parseInt(target.getParameter(PARAM_DEPTH));
+            int depth = target.getParameter(AtomPubCMIS.PARAM_DEPTH) == null ? 1
+                    : Integer.parseInt(target.getParameter(AtomPubCMIS.PARAM_DEPTH));
             List<ObjectEntry> descendants = spi.getDescendants(objectId, depth,
                     filter, includeAllowableActions, includeRelationships,
                     includeRenditions, orderBy);
             return descendants;
         } else {
-            int maxItems = target.getParameter(PARAM_MAX_ITEMS) == null ? 0
-                    : Integer.parseInt(target.getParameter(PARAM_MAX_ITEMS));
-            int skipCount = target.getParameter(PARAM_SKIP_COUNT) == null ? 0
-                    : Integer.parseInt(target.getParameter(PARAM_SKIP_COUNT));
+            int maxItems = target.getParameter(AtomPubCMIS.PARAM_MAX_ITEMS) == null ? 0
+                    : Integer.parseInt(target.getParameter(AtomPubCMIS.PARAM_MAX_ITEMS));
+            int skipCount = target.getParameter(AtomPubCMIS.PARAM_SKIP_COUNT) == null ? 0
+                    : Integer.parseInt(target.getParameter(AtomPubCMIS.PARAM_SKIP_COUNT));
             boolean[] hasMoreItems = new boolean[1];
             List<ObjectEntry> children = spi.getChildren(objectId, filter,
                     includeAllowableActions, includeRelationships,

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCollection.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCollection.java
Mon Nov 16 19:15:22 2009
@@ -13,7 +13,6 @@
  *
  * Authors:
  *     Florent Guillaume, Nuxeo
- *     Amélie Avramo
  */
 package org.apache.chemistry.atompub.server;
 
@@ -36,26 +35,6 @@
 public abstract class CMISCollection<T> extends
         AbstractEntityCollectionAdapter<T> {
 
-    protected static final String PARAM_FILTER = "filter";
-
-    protected static final String PARAM_MAX_ITEMS = "maxItems";
-
-    protected static final String PARAM_SKIP_COUNT = "skipCount";
-
-    protected static final String PARAM_ALLOWABLE_ACTIONS = "includeAllowableActions";
-
-    protected static final String PARAM_RELATIONSHIPS = "includeRelationships";
-
-    protected static final String PARAM_RENDITION_FILTER = "renditionFilter";
-
-    protected static final String PARAM_ORDER_BY = "orderBy";
-
-    protected static final String PARAM_DEPTH = "depth";
-
-    protected static final String PARAM_INCLUDE_PATH_SEGMENT = "includePathSegment";
-
-    protected final static String PARAM_FOLDER_ID = "folderId";
-
     protected final String type;
 
     protected final String name;

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=880913&r1=880912&r2=880913&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 Nov 16 19:15:22 2009
@@ -95,7 +95,7 @@
                 TargetType.TYPE_COLLECTION, "objectid");
         targetResolver.setPattern("/children/([^/?]+)",
                 TargetType.TYPE_COLLECTION, "objectid");
-        targetResolver.setPattern("/descendants/([^/?]+)",
+        targetResolver.setPattern("/descendants/([^/?]+)(\\?.*)?",
                 TargetType.TYPE_COLLECTION, "objectid");
         targetResolver.setPattern("/allversions/([^/?]+)",
                 TargetType.TYPE_COLLECTION, "objectid");

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java?rev=880913&r1=880912&r2=880913&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java
Mon Nov 16 19:15:22 2009
@@ -13,6 +13,7 @@
  *
  * Authors:
  *     Florent Guillaume, Nuxeo
+ *     Amélie Avramo
  */
 package org.apache.chemistry.atompub;
 
@@ -112,6 +113,30 @@
             + "rootdescendants";
 
     /*
+     * ----- AtomPub Link Parameters -----
+     */
+
+    public static final String PARAM_FILTER = "filter";
+
+    public static final String PARAM_MAX_ITEMS = "maxItems";
+
+    public static final String PARAM_SKIP_COUNT = "skipCount";
+
+    public static final String PARAM_ORDER_BY = "orderBy";
+
+    public static final String PARAM_DEPTH = "depth";
+
+    public final static String PARAM_FOLDER_ID = "folderId";
+
+    public static final String PARAM_RENDITION_FILTER = "renditionFilter";
+
+    public static final String PARAM_INCLUDE_ALLOWABLE_ACTIONS = "includeAllowableActions";
+
+    public static final String PARAM_INCLUDE_RELATIONSHIPS = "includeRelationships";
+
+    public static final String PARAM_INCLUDE_PATH_SEGMENT = "includePathSegment";
+
+    /*
      * ----- URI Template Types -----
      */
 



Mime
View raw message