chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r889343 - in /incubator/chemistry/trunk/chemistry: chemistry-api/src/main/java/org/apache/chemistry/ chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-client/src/main/java/org/apache/chemistry/ato...
Date Thu, 10 Dec 2009 17:36:46 GMT
Author: fguillaume
Date: Thu Dec 10 17:36:34 2009
New Revision: 889343

URL: http://svn.apache.org/viewvc?rev=889343&view=rev
Log:
CMIS-75: refactor SPI "inclusion" parameters into a single parameter

Added:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java   (with props)
Modified:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Rendition.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
    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/connector/Connector.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/DefaultIOProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientConnector.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/IOProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/QueryWriter.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/CMISObjectsCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISQueryFeed.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/test/java/org/apache/chemistry/atompub/server/AtomPubServerTestCase.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java

Added: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java?rev=889343&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java Thu Dec 10 17:36:34 2009
@@ -0,0 +1,102 @@
+/*
+ * 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;
+
+/**
+ * Additional information to include in a response.
+ * <p>
+ * <b>Note</b>: Not all methods taking an {@link Inclusion} parameter will use
+ * all inclusion parameters, consult each method's documentation for details.
+ */
+public class Inclusion {
+
+    /**
+     * The property filter specifying all properties.
+     * <p>
+     * This is a convenience value, but implementations are required to use
+     * {@link String#equals} for comparison, not {@code =}.
+     */
+    public static final String ALL_PROPERTIES = "*";
+
+    /**
+     * Filter indicating which properties must be returned.
+     * <p>
+     * This is either {@code "*"} ({@link Inclusion#ALL_PROPERTIES}) for all
+     * properties, or a comma-separated list of property query names. The
+     * {@code null} value is equivalent to {@code "*"}.
+     */
+    public final String properties;
+
+    /**
+     * Filter indicating which renditions must be returned.
+     * <p>
+     * This is either {@code "*"} ({@link Rendition#FILTER_ALL}), {@code
+     * "cmis:none"} ({@link Rendition#FILTER_NONE}), or a comma-separated list
+     * of either kinds of MIME types (which may have a subtype of {@code "*"}).
+     * The {@code null} value is equivalent to {@code "cmis:none"}.
+     */
+    public final String renditions;
+
+    /**
+     * Which relationships to include.
+     * <p>
+     * Additional relationships may also be returned for each returned object,
+     * according to the value of the parameter. If {@code null}, no
+     * relationships are returned.
+     */
+    public final RelationshipDirection relationships;
+
+    /**
+     * Whether to include allowable actions.
+     */
+    public final boolean allowableActions;
+
+    /**
+     * Whether to include policies.
+     */
+    public final boolean policies;
+
+    /**
+     * Whether to include acls.
+     */
+    public final boolean acls;
+
+    /**
+     * Constructs inclusion information with the given parameters.
+     *
+     * @param properties the properties filter, or {@code null} for all
+     *            properties
+     * @param renditions the renditions filter, or {@code null} for no
+     *            renditions
+     * @param relationships the relationships to include, or {@code null} for no
+     *            relationships
+     * @param allowableActions {@code true} to include allowable actions
+     * @param policies {@code true} to include policies
+     * @param acls {@code true} to include ACLs
+     */
+    public Inclusion(String properties, String renditions,
+            RelationshipDirection relationships, boolean allowableActions,
+            boolean policies, boolean acls) {
+        this.properties = properties;
+        this.renditions = renditions;
+        this.relationships = relationships;
+        this.allowableActions = allowableActions;
+        this.policies = policies;
+        this.acls = acls;
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Inclusion.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Rendition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Rendition.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Rendition.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Rendition.java Thu Dec 10 17:36:34 2009
@@ -34,16 +34,25 @@
 
     /**
      * The rendition filter specifying all renditions.
+     * <p>
+     * This is a convenience value, but implementations are required to use
+     * {@link String#equals} for comparison, not {@code =}.
      */
     String FILTER_ALL = "*";
 
     /**
      * The rendition filter specifying no rendition.
+     * <p>
+     * This is a convenience value, but implementations are required to use
+     * {@link String#equals} for comparison, not {@code =}.
      */
     String FILTER_NONE = "cmis:none";
 
     /**
      * The thumbnail rendition kind.
+     * <p>
+     * This is a convenience value, but implementations are required to use
+     * {@link String#equals} for comparison, not {@code =}.
      */
     String KIND_THUMBNAIL = "cmis:thumbnail";
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java Thu Dec 10 17:36:34 2009
@@ -72,15 +72,16 @@
      *
      * @param folder the folder
      * @param depth the depth, or {@code -1} for all levels
-     * @param filter the properties filter, or {@code null} for all properties
-     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param inclusion the {@link Inclusion#properties properties} and
+     *            {@link Inclusion#allowableActions allowable actions} to
+     *            include in the result
      *
      * @throws FilterNotValidException if the filter is not valid
      * @throws IllegalArgumentException if the object is not a folder or the
      *             depth is invalid
      */
-    List<ObjectEntry> getFolderTree(ObjectId folder, int depth, String filter,
-            boolean includeAllowableActions);
+    List<ObjectEntry> getFolderTree(ObjectId folder, int depth,
+            Inclusion inclusion);
 
     /**
      * Gets the descendants of a folder.
@@ -99,35 +100,28 @@
      * returned.
      * <p>
      * As relationships are not fileable, type cannot be
-     * {@link BaseType#RELATIONSHIP}. However, if includeRelationships is set
-     * then relationships are also returned for each returned object, according
-     * to the value of the parameter.
-     * <p>
-     * If includeAllowableActions is {@code true}, the repository will return
-     * the allowable actions for the current user for each descendant object as
-     * part of the results.
+     * {@link BaseType#RELATIONSHIP}. However, if
+     * {@link Inclusion#relationships} is {@code true} then relationships are
+     * also returned for each returned object, according to the value of the
+     * parameter.
      * <p>
      * When returning more than one level, the objects are nested.
      *
      * @param folder the folder
      * @param depth the depth, or {@code -1} for all levels
-     * @param filter the properties filter, or {@code null} for all properties
-     * @param includeAllowableActions {@code true} to include allowable actions
-     * @param includeRelationships if not {@code null}, which relationships
-     *            should be included as well
-     * @param includeRenditions {@code true} if renditions should be included as
-     *            well
      * @param orderBy an {@code ORDER BY} clause, or {@code null}
-     *
+     * @param inclusion the {@link Inclusion#properties properties},
+     *            {@link Inclusion#allowableActions allowable actions},
+     *            {@link Inclusion#relationships relationships} and
+     *            {@link Inclusion#renditions renditions} to include in the
+     *            result
      * @throws FilterNotValidException if the filter is not valid
      * @throws IllegalArgumentException if the object is not a folder or the
      *             depth is invalid
      */
     // TODO return type for a tree
-    List<ObjectEntry> getDescendants(ObjectId folder, int depth, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy);
+    List<ObjectEntry> getDescendants(ObjectId folder, int depth,
+            String orderBy, Inclusion inclusion);
 
     /**
      * Gets the direct children of a folder.
@@ -142,32 +136,21 @@
      * <p>
      * Ordering is repository-specific, except that if the repository state has
      * not changed then the ordering remains consistent across invocations.
-     * <p>
-     * If includeRelationships is set, relationships are also returned for each
-     * returned object, according to the value of the parameter.
-     * <p>
-     * If includeAllowableActions is {@code true}, the repository will return
-     * the allowable actions for the current user for object as part of the
-     * results.
      *
      * @param folder the folder
-     * @param filter the properties filter, or {@code null} for all properties
-     * @param includeAllowableActions {@code true} to include allowable actions
-     * @param includeRelationships if not {@code null}, which relationships
-     *            should be included as well
-     * @param includeRenditions {@code true} if renditions should be included as
-     *            well
+     * @param inclusion the {@link Inclusion#properties properties},
+     *            {@link Inclusion#allowableActions allowable actions},
+     *            {@link Inclusion#relationships relationships} and
+     *            {@link Inclusion#renditions renditions} to include in the
+     *            result
      * @param orderBy an {@code ORDER BY} clause, or {@code null}
      * @param paging paging information, or {@code null} for a
      *            repository-specific default
-     *
      * @throws FilterNotValidException if the filter is not valid
      * @throws IllegalArgumentException if the object is not a folder
      */
-    ListPage<ObjectEntry> getChildren(ObjectId folder, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy, Paging paging);
+    ListPage<ObjectEntry> getChildren(ObjectId folder, Inclusion inclusion,
+            String orderBy, Paging paging);
 
     /**
      * Gets the parent of a folder.
@@ -207,27 +190,25 @@
      * Gets the list of documents that are checked out that the user has access
      * to.
      * <p>
-     * Most likely this will be the set of documents checked out by the user, bu
-     * the repository may also include checked-out objects that the calling user
-     * has access to, but did not check out.
+     * Most likely this will be the set of documents checked out by the user,
+     * but the repository may also include checked-out objects that the calling
+     * user has access to, but did not check out.
      * <p>
-     * If folder is not {@code null}, then the results include only direct
+     * If folder is not {@code null}, then the result includes only direct
      * children of that folder.
      *
      * @param folder the folder, or {@code null}
-     * @param filter
-     * @param includeAllowableActions
-     * @param includeRelationships if not {@code null}, which relationships
-     *            should be included as well
+     * @param inclusion the {@link Inclusion#properties properties},
+     *            {@link Inclusion#allowableActions allowable actions} and
+     *            {@link Inclusion#relationships relationships} to include in
+     *            the result
      * @param paging paging information, or {@code null} for a
      *            repository-specific default
-     *
      * @throws FilterNotValidException if the filter is not valid
      * @throws IllegalArgumentException if the object is not a folder
      */
     ListPage<ObjectEntry> getCheckedOutDocuments(ObjectId folder,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, Paging paging);
+            Inclusion inclusion, Paging paging);
 
     /*
      * ----- Object Services -----
@@ -329,35 +310,31 @@
      * object.
      *
      * @param object the object
-     * @param filter the properties filter, or {@code null} for all properties
-     * @param includeAllowableActions {@code true} to include allowable actions
-     * @param includeRelationships if not {@code null}, which relationships
-     *            should be included as well
+     * @param inclusion the {@link Inclusion#properties properties},
+     *            {@link Inclusion#allowableActions allowable actions} and
+     *            {@link Inclusion#relationships relationships} to include in
+     *            the result
      * @return the properties of the object, or {@code null} if the object is
      *         not found
      *
      * @throws FilterNotValidException if the filter is not valid
      */
-    ObjectEntry getProperties(ObjectId object, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships);
+    ObjectEntry getProperties(ObjectId object, Inclusion inclusion);
 
     /**
      * Gets the properties of an object, given its path.
      *
      * @param path the object path
-     * @param filter the properties filter, or {@code null} for all properties
-     * @param includeAllowableActions {@code true} to include allowable actions
-     * @param includeRelationships if not {@code null}, which relationships
-     *            should be included as well
+     * @param inclusion the {@link Inclusion#properties properties},
+     *            {@link Inclusion#allowableActions allowable actions} and
+     *            {@link Inclusion#relationships relationships} to include in
+     *            the result
      * @return the properties of the object, or {@code null} if the object is
      *         not found
      *
      * @throws FilterNotValidException if the filter is not valid
      */
-    ObjectEntry getObjectByPath(String path, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships);
+    ObjectEntry getObjectByPath(String path, Inclusion inclusion);
 
     /**
      * Gets the list of associated renditions for an object.
@@ -369,7 +346,8 @@
      * value is equivalent to {@code "cmis:none"}.
      *
      * @param object the object
-     * @param filter a rendition filter, or {@code null} for none
+     * @param inclusion the {@link Inclusion#renditions renditions} to include
+     *            in the result
      * @param paging paging information, or {@code null} for a
      *            repository-specific default
      * @return the list of renditions
@@ -379,7 +357,8 @@
      * @see Rendition#FILTER_ALL
      * @see Rendition#FILTER_NONE
      */
-    List<Rendition> getRenditions(ObjectId object, String filter, Paging paging);
+    List<Rendition> getRenditions(ObjectId object, Inclusion inclusion,
+            Paging paging);
 
     /**
      * Checks if the document has an associated content stream.
@@ -655,22 +634,22 @@
      * to a property or a computed value as specified by the {@code SELECT}
      * clause of the query statement.
      * <p>
-     * If includeAllowableActions is {@code true}, the repository will return
-     * the allowable actions for the current user for each result object in the
-     * output table as an additional multi-valued column containing computed
-     * values of type String, provided that each row in the output table indeed
-     * corresponds to one object (which is true for a query without {@code JOIN}
-     * ). If each row in the output table does not correspond to a specific
-     * object and includeAllowableActions is {@code true}, then an exception
-     * will be thrown.
+     * If {@link Inclusion#allowableActions} is {@code true}, the repository
+     * will return the allowable actions for the current user for each result
+     * object in the output table as an additional multi-valued column
+     * containing computed values of type String, provided that each row in the
+     * output table indeed corresponds to one object (which is true for a query
+     * without {@code JOIN} ). If each row in the output table does not
+     * correspond to a specific object and {@link Inclusion#allowableActions} is
+     * {@code true}, then an exception will be thrown.
      *
      * @param statement the SQL statement
      * @param searchAllVersions {@code true} if all versions (not only that
      *            latest) must be searched
-     * @param includeAllowableActions {@code true} to include allowable actions
-     * @param includeRelationships if not {@code null}, which relationships
-     *            should be included as well
-     * @param renditionFilter a rendition filter, or {@code null}
+     * @param inclusion the {@link Inclusion#allowableActions allowable actions}
+     *            , {@link Inclusion#relationships relationships} and
+     *            {@link Inclusion#renditions renditions} to include in the
+     *            result
      * @param paging paging information, or {@code null} for a
      *            repository-specific default
      * @return the matching objects
@@ -679,9 +658,7 @@
      */
     // TODO returns a result set actually, there may be computed values
     ListPage<ObjectEntry> query(String statement, boolean searchAllVersions,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging);
+            Inclusion inclusion, Paging paging);
 
     /**
      * Gets a list of content changes.
@@ -848,12 +825,13 @@
      * Ordering is repository specific but consistent across requests.
      *
      * @param object the object
-     * @param direction the direction of relationships to include
      * @param typeId the type ID, or {@code null}
      * @param includeSubRelationshipTypes {@code true} if relationships of any
      *            sub-type of typeId are to be returned as well
-     * @param filter the properties filter, or {@code null} for all properties
-     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param inclusion the {@link Inclusion#properties properties},
+     *            {@link Inclusion#relationships relationships direction} and
+     *            {@link Inclusion#allowableActions allowable actions} to
+     *            include in the result
      * @param paging paging information, or {@code null} for a
      *            repository-specific default
      * @return the list of relationships
@@ -861,10 +839,9 @@
      * @throws FilterNotValidException if the filter is not valid
      */
     // TODO rename to getObjectRelationships
-    ListPage<ObjectEntry> getRelationships(ObjectId object,
-            RelationshipDirection direction, String typeId,
-            boolean includeSubRelationshipTypes, String filter,
-            String includeAllowableActions, Paging paging);
+    ListPage<ObjectEntry> getRelationships(ObjectId object, String typeId,
+            boolean includeSubRelationshipTypes, Inclusion inclusion,
+            Paging paging);
 
     /*
      * ----- Policy Services -----

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=889343&r1=889342&r2=889343&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 Thu Dec 10 17:36:34 2009
@@ -40,6 +40,7 @@
 import org.apache.chemistry.ContentStream;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.ObjectId;
@@ -47,7 +48,6 @@
 import org.apache.chemistry.Policy;
 import org.apache.chemistry.Property;
 import org.apache.chemistry.Relationship;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Rendition;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.SPI;
@@ -184,35 +184,31 @@
     /**
      * Accumulates the descendant folders into a list recursively.
      */
-    protected void accumulateFolders(ObjectId folder, int depth, String filter,
-            boolean includeAllowableActions, List<ObjectEntry> list) {
-        List<ObjectEntry> children = getChildren(folder, filter,
-                includeAllowableActions, null, false, null, new Paging(
-                        Integer.MAX_VALUE, 0));
+    protected void accumulateFolders(ObjectId folder, int depth,
+            Inclusion inclusion, List<ObjectEntry> list) {
+        List<ObjectEntry> children = getChildren(folder, inclusion, null,
+                new Paging(Integer.MAX_VALUE, 0));
         for (ObjectEntry child : children) {
             if (child.getBaseType() != BaseType.FOLDER) {
                 continue;
             }
             list.add(child);
             if (depth > 1) {
-                accumulateFolders(child, depth - 1, filter,
-                        includeAllowableActions, list);
+                accumulateFolders(child, depth - 1, inclusion, list);
             }
         }
     }
 
     // TODO use foldertree feed
     public List<ObjectEntry> getFolderTree(ObjectId folder, int depth,
-            String filter, boolean includeAllowableActions) {
+            Inclusion inclusion) {
         List<ObjectEntry> list = new ArrayList<ObjectEntry>();
-        accumulateFolders(folder, depth, filter, includeAllowableActions, list);
+        accumulateFolders(folder, depth, inclusion, list);
         return list;
     }
 
     public List<ObjectEntry> getDescendants(ObjectId folder, int depth,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy) {
+            String orderBy, Inclusion inclusion) {
         // TODO includeRelationship, includeAllowableActions, orderBy
         // TODO filter, includeRenditions
         String href = getObjectEntry(folder).getLink(AtomPub.LINK_DOWN,
@@ -228,10 +224,8 @@
         return resp.getObjectFeed(new ReadContext(this));
     }
 
-    public ListPage<ObjectEntry> getChildren(ObjectId folder, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy, Paging paging) {
+    public ListPage<ObjectEntry> getChildren(ObjectId folder,
+            Inclusion inclusion, String orderBy, Paging paging) {
         // TODO filter, includeRelationship, includeAllowableActions, orderBy
         String href = getObjectEntry(folder).getLink(AtomPub.LINK_DOWN,
                 AtomPub.MEDIA_TYPE_ATOM_FEED);
@@ -290,8 +284,7 @@
     }
 
     public ListPage<ObjectEntry> getCheckedOutDocuments(ObjectId folder,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, Paging paging) {
+            Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
@@ -365,9 +358,8 @@
         throw new UnsupportedOperationException();
     }
 
-    public ObjectEntry getProperties(ObjectId object, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships) {
+    public ObjectEntry getProperties(ObjectId object, Inclusion inclusion) {
+        // TODO inclusion
         APPObjectEntry current = getObjectEntry(object);
         String href = current.getLink(AtomPub.LINK_SELF);
         Response resp = connector.get(new Request(href));
@@ -384,9 +376,8 @@
         return (APPObjectEntry) resp.getObject(new ReadContext(this));
     }
 
-    public ObjectEntry getObjectByPath(String path, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships) {
+    public ObjectEntry getObjectByPath(String path, Inclusion inclusion) {
+        // TODO inclusion
         if (!path.startsWith("/")) {
             throw new IllegalArgumentException("Path must start with / : "
                     + path);
@@ -421,7 +412,7 @@
         throw new UnsupportedOperationException();
     }
 
-    public List<Rendition> getRenditions(ObjectId object, String filter,
+    public List<Rendition> getRenditions(ObjectId object, Inclusion inclusion,
             Paging paging) {
         return Collections.emptyList();
     }
@@ -579,13 +570,10 @@
      */
 
     public ListPage<ObjectEntry> query(String statement,
-            boolean searchAllVersions, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) {
+            boolean searchAllVersions, Inclusion inclusion, Paging paging) {
         String href = repository.getCollectionHref(AtomPubCMIS.COL_QUERY);
         Response resp = connector.postQuery(new Request(href), statement,
-                searchAllVersions, includeAllowableActions,
-                includeRelationships, renditionFilter, paging);
+                searchAllVersions, inclusion, paging);
         if (!resp.isOk()) {
             throw new ContentManagerException(
                     "Remote server returned error code: "
@@ -597,8 +585,8 @@
 
     public Collection<CMISObject> query(String statement,
             boolean searchAllVersions) {
-        ListPage<ObjectEntry> res = query(statement, searchAllVersions, false,
-                null, null, new Paging(-1, 0));
+        ListPage<ObjectEntry> res = query(statement, searchAllVersions, null,
+                null);
         List<CMISObject> objects = new ArrayList<CMISObject>(res.size());
         for (ObjectEntry e : res) {
             objects.add(APPObject.construct((APPObjectEntry) e));
@@ -651,9 +639,8 @@
      */
 
     public ListPage<ObjectEntry> getRelationships(ObjectId object,
-            RelationshipDirection direction, String typeId,
-            boolean includeSubRelationshipTypes, String filter,
-            String includeAllowableActions, Paging paging) {
+            String typeId, boolean includeSubRelationshipTypes,
+            Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java Thu Dec 10 17:36:34 2009
@@ -19,9 +19,9 @@
 import java.io.InputStream;
 import java.util.List;
 
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Paging;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.atompub.client.ContentManagerException;
@@ -69,16 +69,12 @@
             throws ContentManagerException;
 
     Response putQuery(Request req, String query, boolean searchAllVersions,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) throws ContentManagerException;
+            Inclusion inclusion, Paging paging) throws ContentManagerException;
 
     Response postObject(Request req, ObjectEntry entry)
             throws ContentManagerException;
 
     Response postQuery(Request req, String query, boolean searchAllVersions,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) throws ContentManagerException;
+            Inclusion inclusion, Paging paging) throws ContentManagerException;
 
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/DefaultIOProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/DefaultIOProvider.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/DefaultIOProvider.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/DefaultIOProvider.java Thu Dec 10 17:36:34 2009
@@ -18,10 +18,10 @@
  */
 package org.apache.chemistry.atompub.client.connector;
 
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Paging;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.TypeManager;
 import org.apache.chemistry.atompub.client.APPObjectEntryReader;
@@ -79,18 +79,11 @@
     }
 
     public XmlObjectWriter<String> getQueryWriter(boolean searchAllVersions,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) {
+            Inclusion inclusion, Paging paging) {
         QueryWriter queryWriter = new QueryWriter();
         queryWriter.setSearchAllVersions(searchAllVersions);
-        queryWriter.setIncludeAllowableActions(includeAllowableActions);
-        queryWriter.setIncludeRelationships(includeRelationships);
-        queryWriter.setRenditionFilter(renditionFilter);
-        if (paging != null) {
-            queryWriter.setMaxItems(paging.maxItems);
-            queryWriter.setSkipCount(paging.skipCount);
-        }
+        queryWriter.setInclusion(inclusion);
+        queryWriter.setPaging(paging);
         return queryWriter;
     }
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientConnector.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientConnector.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientConnector.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientConnector.java Thu Dec 10 17:36:34 2009
@@ -22,9 +22,9 @@
 import java.io.OutputStream;
 import java.util.List;
 
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Paging;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.atompub.client.ContentManagerException;
@@ -231,12 +231,10 @@
     }
 
     public Response putQuery(Request req, String query,
-            boolean searchAllVersions, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) throws ContentManagerException {
-        return put(req, io.getQueryWriter(searchAllVersions,
-                includeAllowableActions, includeRelationships, renditionFilter,
-                paging), query);
+            boolean searchAllVersions, Inclusion inclusion, Paging paging)
+            throws ContentManagerException {
+        return put(req,
+                io.getQueryWriter(searchAllVersions, inclusion, paging), query);
     }
 
     public Response postObject(Request req, ObjectEntry entry)
@@ -245,12 +243,10 @@
     }
 
     public Response postQuery(Request req, String query,
-            boolean searchAllVersions, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) throws ContentManagerException {
-        return post(req, io.getQueryWriter(searchAllVersions,
-                includeAllowableActions, includeRelationships, renditionFilter,
-                paging), query);
+            boolean searchAllVersions, Inclusion inclusion, Paging paging)
+            throws ContentManagerException {
+        return post(req,
+                io.getQueryWriter(searchAllVersions, inclusion, paging), query);
     }
 
     public static class XmlObjectWriterRequestEntity<T> implements

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/IOProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/IOProvider.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/IOProvider.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/IOProvider.java Thu Dec 10 17:36:34 2009
@@ -17,10 +17,10 @@
  */
 package org.apache.chemistry.atompub.client.connector;
 
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Paging;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.TypeManager;
 import org.apache.chemistry.atompub.client.stax.EntryReader;
@@ -47,8 +47,6 @@
     XmlObjectWriter<ObjectEntry> getObjectEntryWriter();
 
     XmlObjectWriter<String> getQueryWriter(boolean searchAllVersions,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging);
+            Inclusion inclusion, Paging paging);
 
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/QueryWriter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/QueryWriter.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/QueryWriter.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/QueryWriter.java Thu Dec 10 17:36:34 2009
@@ -20,6 +20,8 @@
 import java.io.IOException;
 
 import org.apache.chemistry.CMIS;
+import org.apache.chemistry.Inclusion;
+import org.apache.chemistry.Paging;
 import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.atompub.AtomPubCMIS;
 import org.apache.chemistry.xml.stax.XMLWriter;
@@ -31,53 +33,20 @@
 
     protected boolean searchAllVersions;
 
-    protected boolean includeAllowableActions;
+    protected Inclusion inclusion;
 
-    protected RelationshipDirection includeRelationships;
-
-    protected String renditionFilter;
-
-    protected long maxItems = -1;
-
-    protected long skipCount;
+    protected Paging paging;
 
     public void setSearchAllVersions(boolean searchAllVersions) {
         this.searchAllVersions = searchAllVersions;
     }
 
-    /**
-     * Sets the max number of items to return.
-     * <p>
-     * The default, {@code -1}, means that no max number will be sent
-     *
-     * @param maxItems the max number of items
-     */
-    public void setMaxItems(long maxItems) {
-        this.maxItems = maxItems;
-    }
-
-    /**
-     * Sets the skip count.
-     * <p>
-     * The default is {@code 0}.
-     *
-     * @param skipCount the skip count
-     */
-    public void setSkipCount(long skipCount) {
-        this.skipCount = skipCount;
-    }
-
-    public void setIncludeAllowableActions(boolean includeAllowableActions) {
-        this.includeAllowableActions = includeAllowableActions;
-    }
-
-    public void setIncludeRelationships(
-            RelationshipDirection includeRelationships) {
-        this.includeRelationships = includeRelationships;
+    public void setInclusion(Inclusion inclusion) {
+        this.inclusion = inclusion;
     }
 
-    public void setRenditionFilter(String renditionFilter) {
-        this.renditionFilter = renditionFilter;
+    public void setPaging(Paging paging) {
+        this.paging = paging;
     }
 
     @Override
@@ -92,19 +61,21 @@
         xw.start();
         xw.element(CMIS.STATEMENT).econtent(statement);
         xw.element(CMIS.SEARCH_ALL_VERSIONS).content(searchAllVersions);
-        xw.element(CMIS.INCLUDE_ALLOWABLE_ACTIONS).content(
-                includeAllowableActions);
-        xw.element(CMIS.INCLUDE_RELATIONSHIPS).content(
-                RelationshipDirection.toInclusion(includeRelationships));
-        if (renditionFilter != null) {
-            xw.element(CMIS.RENDITION_FILTER).econtent(renditionFilter);
+        if (inclusion != null) {
+            xw.element(CMIS.INCLUDE_ALLOWABLE_ACTIONS).content(
+                    inclusion.allowableActions);
+            xw.element(CMIS.INCLUDE_RELATIONSHIPS).content(
+                    RelationshipDirection.toInclusion(inclusion.relationships));
+            if (inclusion.renditions != null) {
+                xw.element(CMIS.RENDITION_FILTER).econtent(inclusion.renditions);
+            }
         }
-        if (maxItems > -1) {
-            xw.element(CMIS.MAX_ITEMS).content(maxItems);
+        if (paging != null) {
+            if (paging.maxItems > -1) {
+                xw.element(CMIS.MAX_ITEMS).content(paging.maxItems);
+            }
+            xw.element(CMIS.SKIP_COUNT).content(paging.skipCount);
         }
-        xw.element(CMIS.SKIP_COUNT).content(skipCount);
-        xw.element(CMIS.INCLUDE_ALLOWABLE_ACTIONS).content(
-                includeAllowableActions);
         xw.end();
         xw.end();
     }

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=889343&r1=889342&r2=889343&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 Thu Dec 10 17:36:34 2009
@@ -21,6 +21,7 @@
 import org.apache.abdera.protocol.server.RequestContext;
 import org.apache.abdera.protocol.server.Target;
 import org.apache.abdera.protocol.server.context.ResponseContextException;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.ObjectId;
@@ -67,17 +68,18 @@
             String folderIdString = target.getParameter(AtomPubCMIS.PARAM_FOLDER_ID);
             ObjectId folderId = folderIdString == null ? null
                     : spi.newObjectId(folderIdString);
-            String filter = target.getParameter(AtomPubCMIS.PARAM_FILTER);
+            String properties = target.getParameter(AtomPubCMIS.PARAM_FILTER);
+            boolean allowableActions = getParameter(request,
+                    AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS, false);
+            String incl = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS);
+            RelationshipDirection relationships = RelationshipDirection.fromInclusion(incl);
+            Inclusion inclusion = new Inclusion(properties, null,
+                    relationships, allowableActions, false, false);
             int maxItems = getParameter(request, AtomPubCMIS.PARAM_MAX_ITEMS, 0);
             int skipCount = getParameter(request, AtomPubCMIS.PARAM_SKIP_COUNT,
                     0);
-            boolean includeAllowableActions = getParameter(request,
-                    AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS, false);
-            String incl = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS);
-            RelationshipDirection includeRelationships = RelationshipDirection.fromInclusion(incl);
             ListPage<ObjectEntry> objectEntries = spi.getCheckedOutDocuments(
-                    folderId, filter, includeAllowableActions,
-                    includeRelationships, new Paging(maxItems, skipCount));
+                    folderId, inclusion, new Paging(maxItems, skipCount));
             return objectEntries;
         } finally {
             spi.close();

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=889343&r1=889342&r2=889343&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 Thu Dec 10 17:36:34 2009
@@ -37,6 +37,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.chemistry.ContentAlreadyExistsException;
 import org.apache.chemistry.ContentStream;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.ObjectId;
@@ -88,7 +89,7 @@
         ObjectEntry entry;
         SPI spi = repository.getSPI();
         try {
-            entry = spi.getProperties(spi.newObjectId(id), null, false, null);
+            entry = spi.getProperties(spi.newObjectId(id), null);
         } finally {
             spi.close();
         }
@@ -161,20 +162,19 @@
         try {
             ObjectId objectId = spi.newObjectId(id);
             Target target = request.getTarget();
-            String filter = target.getParameter(AtomPubCMIS.PARAM_FILTER);
-            boolean includeAllowableActions = getParameter(request,
-                    AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS, false);
-            String incl = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS);
-            RelationshipDirection includeRelationships = RelationshipDirection.fromInclusion(incl);
-            // TODO proper renditionFilter use
-            boolean includeRenditions = target.getParameter(AtomPubCMIS.PARAM_RENDITION_FILTER) == null ? false
-                    : true;
             String orderBy = target.getParameter(AtomPubCMIS.PARAM_ORDER_BY);
+            String properties = target.getParameter(AtomPubCMIS.PARAM_FILTER);
+            String renditions = target.getParameter(AtomPubCMIS.PARAM_RENDITION_FILTER);
+            String rel = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS);
+            RelationshipDirection relationships = RelationshipDirection.fromInclusion(rel);
+            boolean allowableActions = getParameter(request,
+                    AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS, false);
+            Inclusion inclusion = new Inclusion(properties, renditions,
+                    relationships, allowableActions, false, false);
             if ("descendants".equals(getType())) {
                 int depth = getParameter(request, AtomPubCMIS.PARAM_DEPTH, 1);
                 List<ObjectEntry> descendants = spi.getDescendants(objectId,
-                        depth, filter, includeAllowableActions,
-                        includeRelationships, includeRenditions, orderBy);
+                        depth, orderBy, inclusion);
                 SimpleListPage<ObjectEntry> page = new SimpleListPage<ObjectEntry>(
                         descendants);
                 page.setHasMoreItems(false);
@@ -186,9 +186,7 @@
                 int skipCount = getParameter(request,
                         AtomPubCMIS.PARAM_SKIP_COUNT, 0);
                 ListPage<ObjectEntry> children = spi.getChildren(objectId,
-                        filter, includeAllowableActions, includeRelationships,
-                        includeRenditions, orderBy, new Paging(maxItems,
-                                skipCount));
+                        inclusion, orderBy, new Paging(maxItems, skipCount));
                 return children;
             }
         } finally {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java Thu Dec 10 17:36:34 2009
@@ -53,6 +53,7 @@
 import org.apache.chemistry.CMISRuntimeException;
 import org.apache.chemistry.ConstraintViolationException;
 import org.apache.chemistry.ContentStream;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.ObjectId;
 import org.apache.chemistry.Property;
@@ -375,7 +376,7 @@
             // AbstractEntityCollectionAdapter#getEntryFromCollectionProvider is
             // package-private...
             Entry entry = request.getAbdera().getFactory().newEntry();
-            ObjectEntry object = spi.getProperties(objectId, null, false, null);
+            ObjectEntry object = spi.getProperties(objectId, null);
             addEntryDetails(request, entry, null, object);
             if (isMediaEntry(object)) {
                 addMediaContent(null, entry, object, request);
@@ -409,8 +410,7 @@
         try {
             // existing object
             String id = getResourceName(request);
-            ObjectEntry object = spi.getProperties(spi.newObjectId(id), null,
-                    false, null);
+            ObjectEntry object = spi.getProperties(spi.newObjectId(id), null);
             if (object == null) {
                 return new EmptyResponseContext(404);
             }
@@ -435,7 +435,7 @@
             // build response
             Entry entry = request.getAbdera().getFactory().newEntry();
             // refetch full object
-            object = spi.getProperties(object, null, false, null);
+            object = spi.getProperties(object, null);
             addEntryDetails(request, entry, null, object);
             if (isMediaEntry(object)) {
                 addMediaContent(null, entry, object, request);
@@ -538,22 +538,22 @@
         SPI spi = repository.getSPI();
         try {
             Target target = request.getTarget();
-            String filter = target.getParameter(AtomPubCMIS.PARAM_FILTER);
-            boolean includeAllowableActions = getParameter(request,
+            String properties = target.getParameter(AtomPubCMIS.PARAM_FILTER);
+            boolean allowableActions = getParameter(request,
                     AtomPubCMIS.PARAM_INCLUDE_ALLOWABLE_ACTIONS, false);
             String incl = target.getParameter(AtomPubCMIS.PARAM_INCLUDE_RELATIONSHIPS);
-            RelationshipDirection includeRelationships = RelationshipDirection.fromInclusion(incl);
+            RelationshipDirection relationships = RelationshipDirection.fromInclusion(incl);
+            Inclusion inclusion = new Inclusion(properties, null,
+                    relationships, allowableActions, false, false);
             if ("path".equals(getType())) {
                 String path = resourceName;
                 if (!path.startsWith("/")) {
                     path = "/" + path;
                 }
-                return spi.getObjectByPath(path, filter,
-                        includeAllowableActions, includeRelationships);
+                return spi.getObjectByPath(path, inclusion);
             } else { // object
                 String id = resourceName;
-                return spi.getProperties(spi.newObjectId(id), filter,
-                        includeAllowableActions, includeRelationships);
+                return spi.getProperties(spi.newObjectId(id), inclusion);
             }
         } finally {
             spi.close();

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISQueryFeed.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISQueryFeed.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISQueryFeed.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISQueryFeed.java Thu Dec 10 17:36:34 2009
@@ -24,10 +24,10 @@
 import org.apache.abdera.protocol.server.TargetType;
 import org.apache.abdera.protocol.server.context.ResponseContextException;
 import org.apache.axiom.om.OMDocument;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Paging;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.SPI;
 import org.apache.chemistry.atompub.AtomPubCMIS;
@@ -46,15 +46,9 @@
 
     protected boolean searchAllVersions;
 
-    protected boolean includeAllowableActions;
+    protected Paging paging;
 
-    protected RelationshipDirection includeRelationships;
-
-    protected String renditionFilter;
-
-    protected int maxItems;
-
-    protected int skipCount;
+    protected Inclusion inclusion;
 
     public CMISQueryFeed(Repository repository) {
         super(AtomPubCMIS.COL_QUERY, "query", null, repository);
@@ -102,11 +96,10 @@
         QueryElement q = new QueryElement(element);
         statement = q.getStatement();
         searchAllVersions = q.getSearchAllVersions();
-        includeAllowableActions = q.getIncludeAllowableActions();
-        includeRelationships = q.getIncludeRelationships();
-        renditionFilter = q.getRenditionFilter();
-        maxItems = q.getMaxItems();
-        skipCount = q.getSkipCount();
+        paging = new Paging(q.getMaxItems(), q.getSkipCount());
+        inclusion = new Inclusion(null, q.getRenditionFilter(),
+                q.getIncludeRelationships(), q.getIncludeAllowableActions(),
+                false, false);
         ResponseContext res = getFeed(request); // calls getEntries
         if (res.getStatus() == HttpStatus.SC_OK) {
             res.setStatus(HttpStatus.SC_CREATED);
@@ -120,9 +113,7 @@
         SPI spi = repository.getSPI();
         try {
             ListPage<ObjectEntry> results = spi.query(statement,
-                    searchAllVersions, includeAllowableActions,
-                    includeRelationships, renditionFilter, new Paging(maxItems,
-                            skipCount));
+                    searchAllVersions, inclusion, paging);
             return results;
         } finally {
             spi.close();

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=889343&r1=889342&r2=889343&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 Thu Dec 10 17:36:34 2009
@@ -40,6 +40,8 @@
 import org.apache.chemistry.ContentStreamPresence;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
+import org.apache.chemistry.Inclusion;
+import org.apache.chemistry.Paging;
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.PropertyType;
 import org.apache.chemistry.RelationshipDirection;
@@ -226,7 +228,7 @@
         method.releaseConnection();
 
         EntityProvider provider = new QueryEntityProvider("SELECT * FROM doc",
-                true, false, null, null, 5, 0);
+                true, null, null);
         resp = client.post(base + "/query", provider);
         assertEquals(HttpStatus.SC_CREATED, resp.getStatus());
         Element res = resp.getDocument().getRoot();
@@ -254,27 +256,16 @@
 
         public boolean searchAllVersions;
 
-        public boolean includeAllowableActions;
+        public Inclusion inclusion;
 
-        public RelationshipDirection includeRelationships;
-
-        public String renditionFilter;
-
-        public int maxItems;
-
-        public int skipCount;
+        public Paging paging;
 
         public QueryEntityProvider(String statement, boolean searchAllVersions,
-                boolean includeAllowableActions,
-                RelationshipDirection includeRelationships,
-                String renditionFilter, int maxItems, int skipCount) {
+                Inclusion inclusion, Paging paging) {
             this.statement = statement;
             this.searchAllVersions = searchAllVersions;
-            this.includeAllowableActions = includeAllowableActions;
-            this.includeRelationships = includeRelationships;
-            this.renditionFilter = renditionFilter;
-            this.maxItems = maxItems;
-            this.skipCount = skipCount;
+            this.inclusion = inclusion;
+            this.paging = paging;
         }
 
         @Override
@@ -292,18 +283,24 @@
             sw.startElement(CMIS.STATEMENT).writeElementText(statement).endElement();
             sw.startElement(CMIS.SEARCH_ALL_VERSIONS).writeElementText(
                     Boolean.toString(searchAllVersions)).endElement();
-            sw.startElement(CMIS.INCLUDE_ALLOWABLE_ACTIONS).writeElementText(
-                    Boolean.toString(includeAllowableActions)).endElement();
-            sw.startElement(CMIS.INCLUDE_RELATIONSHIPS).writeElementText(
-                    RelationshipDirection.toInclusion(includeRelationships)).endElement();
-            if (renditionFilter != null) {
-                sw.startElement(CMIS.RENDITION_FILTER).writeElementText(
-                        renditionFilter).endElement();
+            if (inclusion != null) {
+                sw.startElement(CMIS.INCLUDE_ALLOWABLE_ACTIONS).writeElementText(
+                        Boolean.toString(inclusion.allowableActions)).endElement();
+                sw.startElement(CMIS.INCLUDE_RELATIONSHIPS).writeElementText(
+                        RelationshipDirection.toInclusion(inclusion.relationships)).endElement();
+                if (inclusion.renditions != null) {
+                    sw.startElement(CMIS.RENDITION_FILTER).writeElementText(
+                            inclusion.renditions).endElement();
+                }
+            }
+            if (paging != null) {
+                if (paging.maxItems > -1) {
+                    sw.startElement(CMIS.MAX_ITEMS).writeElementText(
+                            Integer.toString(paging.maxItems)).endElement();
+                }
+                sw.startElement(CMIS.SKIP_COUNT).writeElementText(
+                        Integer.toString(paging.skipCount)).endElement();
             }
-            sw.startElement(CMIS.MAX_ITEMS).writeElementText(
-                    Integer.toString(maxItems)).endElement();
-            sw.startElement(CMIS.SKIP_COUNT).writeElementText(
-                    Integer.toString(skipCount)).endElement();
             sw.endElement(); // query
             sw.endDocument();
         }

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java Thu Dec 10 17:36:34 2009
@@ -46,6 +46,7 @@
 import org.apache.chemistry.ContentStreamPresence;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.ObjectId;
@@ -54,7 +55,6 @@
 import org.apache.chemistry.Property;
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.Relationship;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Rendition;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.SPI;
@@ -161,26 +161,25 @@
     /**
      * Accumulates the descendant folders into a list recursively.
      */
-    protected void accumulateFolders(ObjectId folder, int depth, String filter,
-            boolean includeAllowableActions, List<ObjectEntry> list) {
-        ListPage<ObjectEntry> children = getChildren(folder, filter,
-                includeAllowableActions, null, false, null, null);
+    protected void accumulateFolders(ObjectId folder, int depth,
+            Inclusion inclusion, List<ObjectEntry> list) {
+        ListPage<ObjectEntry> children = getChildren(folder, inclusion, null,
+                null);
         for (ObjectEntry child : children) {
             if (child.getBaseType() != BaseType.FOLDER) {
                 continue;
             }
             list.add(child);
             if (depth > 1) {
-                accumulateFolders(child, depth - 1, filter,
-                        includeAllowableActions, list);
+                accumulateFolders(child, depth - 1, inclusion, list);
             }
         }
     }
 
     public List<ObjectEntry> getFolderTree(ObjectId folder, int depth,
-            String filter, boolean includeAllowableActions) {
+            Inclusion inclusion) {
         List<ObjectEntry> list = new ArrayList<ObjectEntry>();
-        accumulateFolders(folder, depth, filter, includeAllowableActions, list);
+        accumulateFolders(folder, depth, inclusion, list);
         return list;
     }
 
@@ -190,37 +189,28 @@
      * @param includeRenditions TODO
      */
     protected void accumulateDescendants(ObjectId folder, int depth,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy, List<ObjectEntry> list) {
+            Inclusion inclusion, String orderBy, List<ObjectEntry> list) {
         // TODO deal with paging properly
-        List<ObjectEntry> children = getChildren(folder, filter,
-                includeAllowableActions, includeRelationships,
-                includeRenditions, orderBy, null);
+        List<ObjectEntry> children = getChildren(folder, inclusion, orderBy,
+                null);
         for (ObjectEntry child : children) {
             list.add(child);
             if (depth > 1 && child.getBaseType() == BaseType.FOLDER) {
-                accumulateDescendants(child, depth - 1, filter,
-                        includeAllowableActions, includeRelationships,
-                        includeRenditions, orderBy, list);
+                accumulateDescendants(child, depth - 1, inclusion, orderBy,
+                        list);
             }
         }
     }
 
     public List<ObjectEntry> getDescendants(ObjectId folder, int depth,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy) {
+            String orderBy, Inclusion inclusion) {
         List<ObjectEntry> list = new ArrayList<ObjectEntry>();
-        accumulateDescendants(folder, depth, filter, includeAllowableActions,
-                includeRelationships, includeRenditions, orderBy, list);
+        accumulateDescendants(folder, depth, inclusion, orderBy, list);
         return list;
     }
 
-    public ListPage<ObjectEntry> getChildren(ObjectId folder, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy, Paging paging) {
+    public ListPage<ObjectEntry> getChildren(ObjectId folder,
+            Inclusion inclusion, String orderBy, Paging paging) {
         // TODO orderBy
         Set<String> ids = repository.children.get(folder.getId());
         List<ObjectEntry> all = new ArrayList<ObjectEntry>(ids.size());
@@ -303,8 +293,7 @@
     }
 
     public ListPage<ObjectEntry> getCheckedOutDocuments(ObjectId folder,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, Paging paging) {
+            Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
@@ -485,9 +474,7 @@
         throw new UnsupportedOperationException();
     }
 
-    public ObjectEntry getProperties(ObjectId object, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships) {
+    public ObjectEntry getProperties(ObjectId object, Inclusion inclusion) {
         // TODO filter, includeAllowableActions, includeRelationships
         SimpleData data = repository.datas.get(object.getId());
         if (data == null) {
@@ -496,9 +483,7 @@
         return new SimpleObjectEntry(data, this);
     }
 
-    public ObjectEntry getObjectByPath(String path, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships) {
+    public ObjectEntry getObjectByPath(String path, Inclusion inclusion) {
         // TODO filter, includeAllowableActions, includeRelationships
         if (!path.startsWith("/")) {
             throw new IllegalArgumentException("Path must start with / : "
@@ -560,8 +545,8 @@
         }
     }
 
-    public ListPage<Rendition> getRenditions(ObjectId object, String filter,
-            Paging paging) {
+    public ListPage<Rendition> getRenditions(ObjectId object,
+            Inclusion inclusion, Paging paging) {
         return SimpleListPage.emptyList();
     }
 
@@ -740,9 +725,7 @@
      */
 
     public ListPage<ObjectEntry> query(String statement,
-            boolean searchAllVersions, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) {
+            boolean searchAllVersions, Inclusion inclusion, Paging paging) {
         // this implementation doesn't try to be very efficient...
         List<ObjectEntry> all = new ArrayList<ObjectEntry>();
         String tableName = null;
@@ -800,8 +783,8 @@
 
     public Collection<CMISObject> query(String statement,
             boolean searchAllVersions) {
-        ListPage<ObjectEntry> res = query(statement, searchAllVersions, false,
-                null, null, null);
+        ListPage<ObjectEntry> res = query(statement, searchAllVersions, null,
+                null);
         List<CMISObject> objects = new ArrayList<CMISObject>(res.size());
         for (ObjectEntry e : res) {
             objects.add(SimpleObject.construct((SimpleObjectEntry) e));
@@ -854,9 +837,8 @@
      */
 
     public ListPage<ObjectEntry> getRelationships(ObjectId object,
-            RelationshipDirection direction, String typeId,
-            boolean includeSubRelationshipTypes, String filter,
-            String includeAllowableActions, Paging paging) {
+            String typeId, boolean includeSubRelationshipTypes,
+            Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java Thu Dec 10 17:36:34 2009
@@ -40,6 +40,7 @@
 import org.apache.chemistry.ContentStream;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
+import org.apache.chemistry.Inclusion;
 import org.apache.chemistry.ListPage;
 import org.apache.chemistry.NameConstraintViolationException;
 import org.apache.chemistry.ObjectEntry;
@@ -47,7 +48,6 @@
 import org.apache.chemistry.Paging;
 import org.apache.chemistry.Policy;
 import org.apache.chemistry.Relationship;
-import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Rendition;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.SPI;
@@ -138,7 +138,7 @@
     public Collection<CMISObject> query(String statement,
             boolean searchAllVersions) {
         ListPage<ObjectEntry> entries = query(statement, searchAllVersions,
-                false, null, null, new Paging(Integer.MAX_VALUE, 0));
+                null, new Paging(Integer.MAX_VALUE, 0));
         List<CMISObject> objects = new ArrayList<CMISObject>(entries.size());
         for (ObjectEntry entry : entries) {
             // cast entries, they are all JcrFolder or JcrDocument
@@ -261,16 +261,13 @@
     }
 
     public ListPage<ObjectEntry> getCheckedOutDocuments(ObjectId folderId,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, Paging paging) {
+            Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
 
-    public ListPage<ObjectEntry> getChildren(ObjectId folderId, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy, Paging paging) {
+    public ListPage<ObjectEntry> getChildren(ObjectId folderId,
+            Inclusion inclusion, String orderBy, Paging paging) {
 
         try {
             Node node = session.getRootNode();
@@ -280,10 +277,10 @@
                 node = node.getNode(relPath);
             }
             NodeIterator iter;
-            if (filter == null) {
+            if (inclusion == null || inclusion.properties == null) {
                 iter = node.getNodes();
             } else {
-                iter = node.getNodes(filter);
+                iter = node.getNodes(inclusion.properties);
             }
             if (iter.hasNext() && paging != null) {
                 iter.skip(paging.skipCount);
@@ -332,15 +329,13 @@
     }
 
     public List<ObjectEntry> getFolderTree(ObjectId folderId, int depth,
-            String filter, boolean includeAllowableActions) {
+            Inclusion inclusion) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
 
     public List<ObjectEntry> getDescendants(ObjectId folderId, int depth,
-            String filter, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships,
-            boolean includeRenditions, String orderBy) {
+            String orderBy, Inclusion inclusion) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
@@ -356,9 +351,7 @@
         throw new UnsupportedOperationException();
     }
 
-    public ObjectEntry getProperties(ObjectId objectId, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships) {
+    public ObjectEntry getProperties(ObjectId objectId, Inclusion inclusion) {
 
         try {
             String relPath = JcrObjectEntry.getPath(objectId.getId()).substring(
@@ -380,9 +373,7 @@
         return null;
     }
 
-    public ObjectEntry getObjectByPath(String path, String filter,
-            boolean includeAllowableActions,
-            RelationshipDirection includeRelationships) {
+    public ObjectEntry getObjectByPath(String path, Inclusion inclusion) {
         try {
             if (path == null || path.equals("") || path.equals("/")) {
                 return (ObjectEntry) getRootFolder();
@@ -416,14 +407,13 @@
     }
 
     public ListPage<ObjectEntry> getRelationships(ObjectId objectId,
-            RelationshipDirection direction, String typeId,
-            boolean includeSubRelationshipTypes, String filter,
-            String includeAllowableActions, Paging paging) {
+            String typeId, boolean includeSubRelationshipTypes,
+            Inclusion inclusion, Paging paging) {
         return SimpleListPage.emptyList();
     }
 
-    public ListPage<Rendition> getRenditions(ObjectId object, String filter,
-            Paging paging) {
+    public ListPage<Rendition> getRenditions(ObjectId object,
+            Inclusion inclusion, Paging paging) {
         return SimpleListPage.emptyList();
     }
 
@@ -439,9 +429,7 @@
     }
 
     public ListPage<ObjectEntry> query(String statement,
-            boolean searchAllVersions, boolean includeAllowableActions,
-            RelationshipDirection includeRelationships, String renditionFilter,
-            Paging paging) {
+            boolean searchAllVersions, Inclusion inclusion, Paging paging) {
 
         try {
             QueryManager qm = session.getWorkspace().getQueryManager();

Modified: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java?rev=889343&r1=889342&r2=889343&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java Thu Dec 10 17:36:34 2009
@@ -209,57 +209,48 @@
     public void testGetObjectByPath() {
         Folder root = conn.getRootFolder();
         assertEquals(ROOT_FOLDER_NAME, root.getName());
-        assertNotNull(spi.getObjectByPath("/", null, false, null));
-        assertNotNull(spi.getObjectByPath("/folder 1", null, false, null));
-        assertNotNull(spi.getObjectByPath("/folder 1/doc 1", null, false, null));
-        assertNotNull(spi.getObjectByPath("/folder 1/folder 2", null, false,
-                null));
-        assertNotNull(spi.getObjectByPath("/folder 1/folder 2/doc 2", null,
-                false, null));
-        assertNotNull(spi.getObjectByPath("/folder 1/folder 2/doc 3", null,
-                false, null));
-        assertNull(spi.getObjectByPath("/notsuchname", null, false, null));
+        assertNotNull(spi.getObjectByPath("/", null));
+        assertNotNull(spi.getObjectByPath("/folder 1", null));
+        assertNotNull(spi.getObjectByPath("/folder 1/doc 1", null));
+        assertNotNull(spi.getObjectByPath("/folder 1/folder 2", null));
+        assertNotNull(spi.getObjectByPath("/folder 1/folder 2/doc 2", null));
+        assertNotNull(spi.getObjectByPath("/folder 1/folder 2/doc 3", null));
+        assertNull(spi.getObjectByPath("/notsuchname", null));
     }
 
     public void testGetChildren() {
         Folder root = conn.getRootFolder();
-        ListPage<ObjectEntry> page = spi.getChildren(root, null, true, null,
-                false, null, new Paging(20, 0));
+        ListPage<ObjectEntry> page = spi.getChildren(root, null, null, new Paging(20,
+                        0));
         assertEquals(1, page.size());
         assertFalse(page.getHasMoreItems());
         assertEquals(1, page.getNumItems());
 
         ObjectId folder1 = root.getChildren().get(0);
-        page = spi.getChildren(folder1, null, false, null, false, null,
-                new Paging(20, 0));
+        page = spi.getChildren(folder1, null, null, new Paging(20, 0));
         assertEquals(2, page.size());
         assertFalse(page.getHasMoreItems());
         assertEquals(2, page.getNumItems());
 
-        page = spi.getChildren(folder1, null, false, null, false, null,
-                new Paging(1, 0));
+        page = spi.getChildren(folder1, null, null, new Paging(1, 0));
         assertEquals(1, page.size());
         assertTrue(page.getHasMoreItems());
         assertEquals(2, page.getNumItems());
 
-        page = spi.getChildren(folder1, null, false, null, false, null,
-                new Paging(1, 1));
+        page = spi.getChildren(folder1, null, null, new Paging(1, 1));
         assertEquals(1, page.size());
         assertFalse(page.getHasMoreItems());
         assertEquals(2, page.getNumItems());
 
-        page = spi.getChildren(folder1, null, false, null, false, null,
-                new Paging(2, 0));
+        page = spi.getChildren(folder1, null, null, new Paging(2, 0));
         ObjectId folder2 = page.get(0).getTypeId().equals("fold") ? page.get(0)
                 : page.get(1);
-        page = spi.getChildren(folder2, null, false, null, false, null,
-                new Paging(1, 1));
+        page = spi.getChildren(folder2, null, null, new Paging(1, 1));
         assertEquals(1, page.size());
         assertTrue(page.getHasMoreItems());
         assertEquals(3, page.getNumItems());
 
-        page = spi.getChildren(folder2, null, false, null, false, null,
-                new Paging(2, 0));
+        page = spi.getChildren(folder2, null, null, new Paging(2, 0));
         assertEquals(2, page.size());
         assertTrue(page.getHasMoreItems());
         assertEquals(3, page.getNumItems());
@@ -267,14 +258,13 @@
 
     public void testGetFolderTree() {
         Folder root = conn.getRootFolder();
-        List<ObjectEntry> desc = spi.getFolderTree(root, 4, null, false);
+        List<ObjectEntry> desc = spi.getFolderTree(root, 4, null);
         assertEquals(2, desc.size());
     }
 
     public void testGetDescendants() {
         Folder root = conn.getRootFolder();
-        List<ObjectEntry> desc = spi.getDescendants(root, 4, null, false, null,
-                false, null);
+        List<ObjectEntry> desc = spi.getDescendants(root, 4, null, null);
         assertEquals(6, desc.size());
     }
 
@@ -327,8 +317,7 @@
 
     public void testContentStreamSPI() throws Exception {
         // set
-        ObjectEntry ob = spi.getObjectByPath("/folder 1/doc 1", null, false,
-                null);
+        ObjectEntry ob = spi.getObjectByPath("/folder 1/doc 1", null);
         SimpleObjectId id = new SimpleObjectId(ob.getId());
         assertFalse(spi.hasContentStream(id)); // unfetched
         assertFalse(spi.hasContentStream(ob)); // fetched
@@ -434,8 +423,7 @@
     }
 
     public void testUpdateSPI() throws Exception {
-        ObjectEntry ob = spi.getObjectByPath("/folder 1/doc 1", null, false,
-                null);
+        ObjectEntry ob = spi.getObjectByPath("/folder 1/doc 1", null);
         assertEquals("doc 1 title", ob.getValue("title"));
         assertEquals("The doc 1 descr", ob.getValue("description"));
         // update
@@ -443,7 +431,7 @@
         properties.put("description", "new descr");
         spi.updateProperties(ob, null, properties);
         // refetch
-        ob = spi.getProperties(ob, null, false, null);
+        ob = spi.getProperties(ob, null);
         assertEquals("doc 1 title", ob.getValue("title"));
         assertEquals("new descr", ob.getValue("description"));
     }



Mime
View raw message