chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r800122 - 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 Sun, 02 Aug 2009 18:11:19 GMT
Author: fguillaume
Date: Sun Aug  2 18:11:18 2009
New Revision: 800122

URL: http://svn.apache.org/viewvc?rev=800122&view=rev
Log:
CMIS-44: added change log support

Added:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeCapability.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeInfo.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeType.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java   (with props)
Modified:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ObjectEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryInfo.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/APPObjectEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractObjectReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/ObjectElement.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectId.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimplePropertyDefinition.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRendition.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrDocument.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrFolder.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java

Added: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeCapability.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeCapability.java?rev=800122&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeCapability.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeCapability.java Sun Aug  2 18:11:18 2009
@@ -0,0 +1,81 @@
+/*
+ * 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;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The level of changes (if any) that the repository exposes via
+ * {@link SPI#getChangeLog}.
+ *
+ * @see SPI#getChangeLog
+ */
+public enum ChangeCapability {
+
+    /**
+     * The repository does not expose any information in the change log.
+     */
+    NONE("none"),
+
+    /**
+     * The change log can return only the object IDs for changed objects in the
+     * repository and an indication of the type of change, not details of the
+     * actual change.
+     */
+    OBJECT_IDS_ONLY("objectidsonly"),
+
+    /**
+     * The change log can return the object IDs for changed objects in the
+     * repository and the details of the actual properties changed.
+     */
+    ALL("all");
+
+    private final String value;
+
+    private ChangeCapability(String value) {
+        this.value = value;
+    }
+
+    private static final Map<String, ChangeCapability> all = new HashMap<String, ChangeCapability>();
+    static {
+        for (ChangeCapability o : values()) {
+            all.put(o.value, o);
+        }
+    }
+
+    public static ChangeCapability get(String value) {
+        ChangeCapability o = all.get(value);
+        if (o == null) {
+            throw new IllegalArgumentException(value);
+        }
+        return o;
+    }
+
+    public static ChangeCapability get(String value, ChangeCapability def) {
+        ChangeCapability o = all.get(value);
+        if (o == null) {
+            o = def;
+        }
+        return o;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

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

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

Propchange: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeCapability.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeInfo.java?rev=800122&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeInfo.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeInfo.java Sun Aug  2 18:11:18 2009
@@ -0,0 +1,42 @@
+/*
+ * 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;
+
+import java.util.Calendar;
+
+/**
+ * Information about a change event returned from
+ * {@link ObjectEntry#getChangeInfo}.
+ *
+ * @see ObjectEntry#getChangeInfo
+ * @see SPI#getChangeLog
+ */
+public interface ChangeInfo {
+
+    /**
+     * Gets the type of change to the object.
+     */
+    ChangeType getType();
+
+    /**
+     * Gets the time of change to the object.
+     */
+    Calendar getDateTime();
+
+    // TODO extensions
+
+}

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

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

Propchange: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeType.java?rev=800122&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeType.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeType.java Sun Aug  2 18:11:18 2009
@@ -0,0 +1,80 @@
+/*
+ * 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;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The type of change represented by a {@link ChangeEvent}.
+ */
+public enum ChangeType {
+
+    /**
+     * The object was created.
+     */
+    CREATED("created"),
+
+    /**
+     * The object was updated.
+     */
+    UPDATED("updated"),
+
+    /**
+     * The object was deleted.
+     */
+    DELETED("deleted"),
+
+    /**
+     * The access control or security policy for the object were changed.
+     */
+    SECURITY("security");
+
+    private final String value;
+
+    private ChangeType(String value) {
+        this.value = value;
+    }
+
+    private static final Map<String, ChangeType> all = new HashMap<String, ChangeType>();
+    static {
+        for (ChangeType o : values()) {
+            all.put(o.value, o);
+        }
+    }
+
+    public static ChangeType get(String value) {
+        ChangeType o = all.get(value);
+        if (o == null) {
+            throw new IllegalArgumentException(value);
+        }
+        return o;
+    }
+
+    public static ChangeType get(String value, ChangeType def) {
+        ChangeType o = all.get(value);
+        if (o == null) {
+            o = def;
+        }
+        return o;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

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

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

Propchange: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ChangeType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ObjectEntry.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ObjectEntry.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ObjectEntry.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/ObjectEntry.java Sun Aug  2 18:11:18 2009
@@ -44,6 +44,16 @@
     BaseType getBaseType();
 
     /**
+     * Gets information about the change to the object.
+     * <p>
+     * This is only available for object entries returned by
+     * {@link SPI#getChangeLog}.
+     *
+     * @see SPI#getChangeLog
+     */
+    ChangeInfo getChangeInfo();
+
+    /**
      * Gets a property value.
      * <p>
      * Returns {@code null} is the property is not set, not fetched or unknown.

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java Sun Aug  2 18:11:18 2009
@@ -77,4 +77,9 @@
      */
     RenditionCapability getRenditionCapability();
 
+    /**
+     * Support for change log.
+     */
+    ChangeCapability getChangeCapability();
+
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryInfo.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryInfo.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryInfo.java Sun Aug  2 18:11:18 2009
@@ -17,6 +17,7 @@
 package org.apache.chemistry;
 
 import java.util.Collection;
+import java.util.Set;
 
 /**
  * Information about a CMIS Repository.
@@ -66,6 +67,22 @@
     RepositoryCapabilities getCapabilities();
 
     /**
+     * The base types for which changes are reported by the change log.
+     */
+    Set<BaseType> getChangeLogBaseTypes();
+
+    /**
+     * Is the change log incomplete (missing older events).
+     */
+    boolean isChangeLogIncomplete();
+
+    /**
+     * The change log token corresponding to the most recent change to any
+     * object in the repository.
+     */
+    String getLatestChangeLogToken();
+
+    /**
      * The related repositories.
      *
      * @return the related repositories, or {@code null} if no information is

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=800122&r1=800121&r2=800122&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 Sun Aug  2 18:11:18 2009
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -144,8 +145,8 @@
      * @param includeAllowableActions {@code true} to include allowable actions
      * @param includeRelationships {@code true} if relationships should be
      *            included as well
-     * @param maxItems the maximum number of objects to returned, or {@code 0}
-     *            for a repository-specific default
+     * @param maxItems the maximum number of objects to return, or {@code 0} for
+     *            a repository-specific default
      * @param skipCount the skip count
      * @param orderBy an {@code ORDER BY} clause, or {@code null}
      * @param hasMoreItems a 1-value boolean array to return a flag stating if
@@ -345,8 +346,8 @@
      *
      * @param object the object
      * @param filter a rendition filter, or {@code null} for none
-     * @param maxItems the maximum number of renditions to returned, or {@code
-     *            0} for a repository-specific default
+     * @param maxItems the maximum number of renditions to return, or {@code 0}
+     *            for a repository-specific default
      * @param skipCount the skip count
      * @return the list of renditions
      *
@@ -582,8 +583,8 @@
      * @param includeAllowableActions {@code true} to include allowable actions
      * @param includeRelationships {@code true} if relationships should be
      *            included as well
-     * @param maxItems the maximum number of objects to returned, or {@code 0}
-     *            for a repository-specific default
+     * @param maxItems the maximum number of objects to return, or {@code 0} for
+     *            a repository-specific default
      * @param skipCount the skip count
      * @param hasMoreItems
      * @return the matching objects
@@ -593,6 +594,39 @@
             boolean includeAllowableActions, boolean includeRelationships,
             int maxItems, int skipCount, boolean[] hasMoreItems);
 
+    /**
+     * Gets a list of content changes.
+     * <p>
+     * Returns all the change events, or only those starting with the provided
+     * changeLogToken.
+     * <p>
+     * This is intended to be used by search crawlers or other applications that
+     * need to efficiently understand what has changed in the repository.
+     * <p>
+     * The content stream is <em>not</em> returned for any change event.
+     * <p>
+     * The latest change log token for a repository can be acquired via
+     * {@link RepositoryInfo#getLatestChangeToken}.
+     * <p>
+     * The return value hasMoreItems is filled if {@code maxItems > 0}.
+     * <p>
+     * The return value lastChangeLogToken contains the change token of the last
+     * change event returned by the iterator.
+     *
+     * @param changeLogToken the change log token, or {@code null}
+     * @param includeProperties {@code true} if values are returned in the
+     *            change events for updated objects
+     * @param maxItems the maximum number of change events to return, or {@code
+     *            0} for a repository-specific default
+     * @return an iterator over the change events
+     *
+     * @see Repository#getInfo
+     * @see RepositoryInfo#getLatestChangeLogToken
+     */
+    Iterator<ObjectEntry> getChangeLog(String changeLogToken,
+            boolean includeProperties, int maxItems, boolean[] hasMoreItems,
+            String[] lastChangeLogToken);
+
     /*
      * ----- Versioning Services -----
      */
@@ -703,8 +737,8 @@
      *            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 maxItems the maximum number of objects to returned, or {@code 0}
-     *            for a repository-specific default
+     * @param maxItems the maximum number of objects to return, or {@code 0} for
+     *            a repository-specific default
      * @param skipCount the skip count
      * @param hasMoreItems a 1-value boolean array to return a flag stating if
      *            there are more items

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=800122&r1=800121&r2=800122&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 Sun Aug  2 18:11:18 2009
@@ -25,6 +25,7 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -515,6 +516,14 @@
         return objects;
     }
 
+    public Iterator<ObjectEntry> getChangeLog(String changeLogToken,
+            boolean includeProperties, int maxItems, boolean[] hasMoreItems,
+            String[] lastChangeLogToken) {
+        hasMoreItems[0] = false;
+        lastChangeLogToken[0] = null;
+        return Collections.<ObjectEntry> emptyList().iterator();
+    }
+
     /*
      * ----- Versioning Services -----
      */

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=800122&r1=800121&r2=800122&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 Sun Aug  2 18:11:18 2009
@@ -29,6 +29,7 @@
 import java.util.Map.Entry;
 
 import org.apache.chemistry.BaseType;
+import org.apache.chemistry.ChangeInfo;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Property;
 import org.apache.chemistry.PropertyDefinition;
@@ -84,6 +85,10 @@
         return href == null ? getLink("self") : href;
     }
 
+    public ChangeInfo getChangeInfo() {
+        return null;
+    }
+
     // -----
 
     public APPConnection getConnection() {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java Sun Aug  2 18:11:18 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.chemistry.atompub.client;
 
+import org.apache.chemistry.ChangeCapability;
 import org.apache.chemistry.JoinCapability;
 import org.apache.chemistry.QueryCapability;
 import org.apache.chemistry.RenditionCapability;
@@ -32,6 +33,8 @@
 
     protected RenditionCapability renditionCapability;
 
+    protected ChangeCapability changeCapability;
+
     protected boolean hasUnfiling;
 
     protected boolean hasMultifiling;
@@ -58,6 +61,10 @@
         return renditionCapability;
     }
 
+    public ChangeCapability getChangeCapability() {
+        return changeCapability;
+    }
+
     public boolean hasMultifiling() {
         return hasMultifiling;
     }
@@ -126,4 +133,8 @@
         this.renditionCapability = renditionCapability;
     }
 
+    public void setChangeCapability(ChangeCapability changeCapability) {
+        this.changeCapability = changeCapability;
+    }
+
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java Sun Aug  2 18:11:18 2009
@@ -18,8 +18,12 @@
 
 import java.net.URI;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
 import java.util.Map;
+import java.util.Set;
 
+import org.apache.chemistry.BaseType;
 import org.apache.chemistry.ObjectId;
 import org.apache.chemistry.RepositoryCapabilities;
 import org.apache.chemistry.RepositoryEntry;
@@ -33,14 +37,18 @@
  */
 public class APPRepositoryInfo implements RepositoryInfo {
 
-    protected Map<String, Object> map;
+    protected final Map<String, Object> map;
 
-    protected RepositoryCapabilities caps;
+    protected final RepositoryCapabilities caps;
+
+    protected final Set<BaseType> changeLogBaseTypes;
 
     public APPRepositoryInfo(RepositoryCapabilities caps,
-            Map<String, Object> map) {
+            Map<String, Object> map, Set<BaseType> changeLogBaseTypes) {
         this.map = map;
         this.caps = caps;
+        this.changeLogBaseTypes = changeLogBaseTypes.isEmpty() ? Collections.<BaseType> emptySet()
+                : Collections.unmodifiableSet(EnumSet.copyOf(changeLogBaseTypes));
     }
 
     public URI getURI() {
@@ -52,6 +60,10 @@
         return (String) map.get(name);
     }
 
+    public boolean getBoolean(String name) {
+        return Boolean.parseBoolean((String) map.get(name));
+    }
+
     public String getId() {
         return getString(CMIS.REPOSITORY_ID.getLocalPart());
     }
@@ -97,6 +109,18 @@
         return caps;
     }
 
+    public Set<BaseType> getChangeLogBaseTypes() {
+        return changeLogBaseTypes;
+    }
+
+    public boolean isChangeLogIncomplete() {
+        return getBoolean(CMIS.CHANGES_INCOMPLETE.getLocalPart());
+    }
+
+    public String getLatestChangeLogToken() {
+        return getString(CMIS.LATEST_CHANGE_LOG_TOKEN.getLocalPart());
+    }
+
     public Collection<RepositoryEntry> getRelatedRepositories() {
         throw new UnsupportedOperationException("Not yet implemented");
     }
@@ -105,4 +129,5 @@
     public String toString() {
         return getName() + " - " + getURI();
     }
+
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractObjectReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractObjectReader.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractObjectReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractObjectReader.java Sun Aug  2 18:11:18 2009
@@ -58,11 +58,13 @@
     protected void readObjectChildElement(ReadContext ctx, StaxReader reader,
             T object) throws XMLStreamException {
         if (reader.getNamespaceURI().equals(CMIS.CMIS_NS)) {
-            if (reader.getLocalName().equals(CMIS.PROPERTIES.getLocalPart())) {
+            String localName = reader.getLocalName();
+            if (localName.equals(CMIS.PROPERTIES.getLocalPart())) {
                 readProperties(ctx, reader, object);
-            } else if (reader.getLocalName().equals(
-                    CMIS.ALLOWABLE_ACTIONS.getLocalPart())) {
+            } else if (localName.equals(CMIS.ALLOWABLE_ACTIONS.getLocalPart())) {
                 readAllowableActions(ctx, reader, object);
+            } else if (localName.equals(CMIS.CHANGE_EVENT_INFO.getLocalPart())) {
+                readChangeEventInfo(ctx, reader, object);
             } else { // unknown tag
                 readOtherCmisElement(ctx, reader, object);
             }
@@ -134,6 +136,11 @@
         // TODO not yet implemented
     }
 
+    protected void readChangeEventInfo(ReadContext ctx, StaxReader reader,
+            T object) throws XMLStreamException {
+        // TODO not yet implemented
+    }
+
     protected void readOtherCmisElement(ReadContext ctx, StaxReader reader,
             T object) throws XMLStreamException {
         // do nothing

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java Sun Aug  2 18:11:18 2009
@@ -20,14 +20,19 @@
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 
+import org.apache.chemistry.BaseType;
+import org.apache.chemistry.ChangeCapability;
 import org.apache.chemistry.JoinCapability;
 import org.apache.chemistry.QueryCapability;
+import org.apache.chemistry.RenditionCapability;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.RepositoryInfo;
 import org.apache.chemistry.atompub.Atom;
@@ -94,6 +99,7 @@
             StaxReader reader) throws XMLStreamException {
         APPRepositoryCapabilities caps = null;
         Map<String, Object> map = new HashMap<String, Object>();
+        Set<BaseType> changeLogBaseTypes = new HashSet<BaseType>();
         ChildrenNavigator nav = reader.getChildren();
         while (nav.next()) {
             String localName = reader.getLocalName();
@@ -122,15 +128,25 @@
                     } else if (localName.equals(CMIS.CAPABILITY_JOIN.getLocalPart())) {
                         caps.setJoinCapability(JoinCapability.get(
                                 reader.getElementText(), JoinCapability.NONE));
+                    } else if (localName.equals(CMIS.CAPABILITY_RENDITIONS.getLocalPart())) {
+                        caps.setRenditionCapability(RenditionCapability.get(
+                                reader.getElementText(),
+                                RenditionCapability.NONE));
+                    } else if (localName.equals(CMIS.CAPABILITY_CHANGES.getLocalPart())) {
+                        caps.setChangeCapability(ChangeCapability.get(
+                                reader.getElementText(),
+                                ChangeCapability.NONE));
+                    } else if (localName.equals(CMIS.CAPABILITY_CHANGES_ON_TYPE.getLocalPart())) {
+                        changeLogBaseTypes.add(BaseType.get(reader.getElementText()));
                     }
                 }
-            } else if (localName.equals("repositorySpecificInformation")) {
+            } else if (localName.equals(CMIS.REPOSITORY_SPECIFIC_INFORMATION.getLocalPart())) {
                 readRepositorySpecificInformation(context, reader);
             } else {
                 map.put(localName, reader.getElementText());
             }
         }
-        return new APPRepositoryInfo(caps, map);
+        return new APPRepositoryInfo(caps, map, changeLogBaseTypes);
     }
 
     protected URITemplate readURITemplate(ReadContext context, StaxReader reader)

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java Sun Aug  2 18:11:18 2009
@@ -26,6 +26,7 @@
 import org.apache.abdera.protocol.server.WorkspaceInfo;
 import org.apache.abdera.protocol.server.context.StreamWriterResponseContext;
 import org.apache.abdera.writer.StreamWriter;
+import org.apache.chemistry.BaseType;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.RepositoryCapabilities;
 import org.apache.chemistry.RepositoryInfo;
@@ -121,7 +122,10 @@
             write(CMIS.VENDOR_NAME, info.getVendorName());
             write(CMIS.PRODUCT_NAME, info.getProductName());
             write(CMIS.PRODUCT_VERSION, info.getProductVersion());
+            write(CMIS.VERSION_SUPPORTED, ATOMPUB_VERSION_SUPPORTED);
             write(CMIS.ROOT_FOLDER_ID, info.getRootFolderId().getId());
+            write(CMIS.CHANGES_INCOMPLETE, info.isChangeLogIncomplete());
+            write(CMIS.LATEST_CHANGE_LOG_TOKEN, info.getLatestChangeLogToken());
 
             sw.startElement(CMIS.CAPABILITIES);
             write(CMIS.CAPABILITY_MULTIFILING, cap.hasMultifiling());
@@ -134,9 +138,14 @@
                     cap.isAllVersionsSearchable());
             write(CMIS.CAPABILITY_QUERY, cap.getQueryCapability().toString());
             write(CMIS.CAPABILITY_JOIN, cap.getJoinCapability().toString());
+            write(CMIS.CAPABILITY_RENDITIONS,
+                    cap.getRenditionCapability().toString());
+            write(CMIS.CAPABILITY_CHANGES, cap.getJoinCapability().toString());
+            for (BaseType t : info.getChangeLogBaseTypes()) {
+                write(CMIS.CAPABILITY_CHANGES_ON_TYPE, t.toString());
+            }
             sw.endElement();
 
-            write(CMIS.VERSION_SUPPORTED, ATOMPUB_VERSION_SUPPORTED);
             write(CMIS.REPOSITORY_SPECIFIC_INFORMATION,
                     info.getRepositorySpecificInformation());
             sw.endElement();

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java Sun Aug  2 18:11:18 2009
@@ -65,6 +65,8 @@
 
     public static final QName ROOT_FOLDER_ID = CMISName("rootFolderId");
 
+    public static final QName LATEST_CHANGE_LOG_TOKEN = CMISName("latestChangeToken"); // TODO-0.63
+
     public static final QName CAPABILITIES = CMISName("capabilities");
 
     public static final QName CAPABILITY_MULTIFILING = CMISName("capabilityMultifiling");
@@ -85,6 +87,14 @@
 
     public static final QName CAPABILITY_JOIN = CMISName("capabilityJoin");
 
+    public static final QName CAPABILITY_RENDITIONS = CMISName("capabilityRenditions");
+
+    public static final QName CAPABILITY_CHANGES = CMISName("capabilityChanges");
+
+    public static final QName CAPABILITY_CHANGES_ON_TYPE = CMISName("capabilityChangesOnType");
+
+    public static final QName CHANGES_INCOMPLETE = CMISName("changesIncomplete");
+
     public static final QName VERSION_SUPPORTED = CMISName("cmisVersionSupported");
 
     public static final QName REPOSITORY_SPECIFIC_INFORMATION = CMISName("repositorySpecificInformation");
@@ -187,6 +197,12 @@
 
     public static final QName ALLOWABLE_ACTIONS = CMISName("allowableActions");
 
+    public static final QName CHANGE_EVENT_INFO = CMISName("changeEventInfo");
+
+    public static final QName CHANGE_TYPE = CMISName("changeType");
+
+    public static final QName CHANGE_TIME = CMISName("changeTime");
+
     public static final QName QUERY = CMISName("query");
 
     public static final QName STATEMENT = CMISName("statement");

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/ObjectElement.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/ObjectElement.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/ObjectElement.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/ObjectElement.java Sun Aug  2 18:11:18 2009
@@ -70,4 +70,6 @@
 
     // TODO allowable actions
 
+    // TODO change event info
+
 }

Added: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java?rev=800122&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java Sun Aug  2 18:11:18 2009
@@ -0,0 +1,43 @@
+/*
+ * 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.impl.simple;
+
+import java.util.Calendar;
+
+import org.apache.chemistry.ChangeInfo;
+import org.apache.chemistry.ChangeType;
+
+public class SimpleChangeInfo implements ChangeInfo {
+
+    protected final ChangeType type;
+
+    protected final Calendar datetime;
+
+    public SimpleChangeInfo(ChangeType type, Calendar datetime) {
+        this.type = type;
+        this.datetime = datetime;
+    }
+
+    public ChangeType getType() {
+        return type;
+    }
+
+    public Calendar getDateTime() {
+        return datetime;
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleChangeInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=800122&r1=800121&r2=800122&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 Sun Aug  2 18:11:18 2009
@@ -23,6 +23,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -671,6 +672,14 @@
         return objects;
     }
 
+    public Iterator<ObjectEntry> getChangeLog(String changeLogToken,
+            boolean includeProperties, int maxItems, boolean[] hasMoreItems,
+            String[] lastChangeLogToken) {
+        hasMoreItems[0] = false;
+        lastChangeLogToken[0] = null;
+        return Collections.<ObjectEntry> emptyList().iterator();
+    }
+
     /*
      * ----- Versioning Services -----
      */

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java Sun Aug  2 18:11:18 2009
@@ -22,6 +22,7 @@
 import java.util.Map;
 
 import org.apache.chemistry.BaseType;
+import org.apache.chemistry.ChangeInfo;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Property;
 
@@ -36,6 +37,8 @@
 
     protected final SimpleConnection connection;
 
+    protected ChangeInfo changeInfo;
+
     protected SimpleObjectEntry(SimpleData data, SimpleConnection connection) {
         this.data = data;
         this.connection = connection;
@@ -53,6 +56,14 @@
         return BaseType.get((String) data.get(Property.BASE_TYPE_ID));
     }
 
+    public ChangeInfo getChangeInfo() {
+        return changeInfo;
+    }
+
+    public void setChangeInfo(ChangeInfo changeInfo) {
+        this.changeInfo = changeInfo;
+    }
+
     public Map<String, Serializable> getValues() {
         return new HashMap<String, Serializable>(data);
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectId.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectId.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectId.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectId.java Sun Aug  2 18:11:18 2009
@@ -23,7 +23,7 @@
  */
 public class SimpleObjectId implements ObjectId {
 
-    private final String id;
+    protected final String id;
 
     public SimpleObjectId(String id) {
         this.id = id;

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimplePropertyDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimplePropertyDefinition.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimplePropertyDefinition.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimplePropertyDefinition.java Sun Aug  2 18:11:18 2009
@@ -29,47 +29,47 @@
 
 public class SimplePropertyDefinition implements PropertyDefinition {
 
-    private final String id;
+    protected final String id;
 
-    private final String localName;
+    protected final String localName;
 
-    private final URI localNamespace;
+    protected final URI localNamespace;
 
-    private final String queryName;
+    protected final String queryName;
 
-    private final String displayName;
+    protected final String displayName;
 
-    private final String description;
+    protected final String description;
 
-    private final boolean inherited;
+    protected final boolean inherited;
 
-    private final PropertyType type;
+    protected final PropertyType type;
 
-    private final boolean multiValued;
+    protected final boolean multiValued;
 
-    private final List<Choice> choices;
+    protected final List<Choice> choices;
 
-    private final boolean openChoice;
+    protected final boolean openChoice;
 
-    private final boolean required;
+    protected final boolean required;
 
-    private final Serializable defaultValue;
+    protected final Serializable defaultValue;
 
-    private final Updatability updatability;
+    protected final Updatability updatability;
 
-    private final boolean queryable;
+    protected final boolean queryable;
 
-    private final boolean orderable;
+    protected final boolean orderable;
 
-    private final int precision;
+    protected final int precision;
 
-    private final Number minValue;
+    protected final Number minValue;
 
-    private final Number maxValue;
+    protected final Number maxValue;
 
-    private final int maxLength;
+    protected final int maxLength;
 
-    private final URI schemaURI;
+    protected final URI schemaURI;
 
     public SimplePropertyDefinition(String id, String localName,
             URI localNamespace, String queryName, String displayName,

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRendition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRendition.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRendition.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRendition.java Sun Aug  2 18:11:18 2009
@@ -1,3 +1,19 @@
+/*
+ * 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.impl.simple;
 
 import java.util.Map;
@@ -7,25 +23,25 @@
 
 public class SimpleRendition implements Rendition {
 
-    private final ObjectId objectId;
+    protected final ObjectId objectId;
 
-    private final String contentStreamId;
+    protected final String contentStreamId;
 
-    private final ObjectId renditionDocumentId;
+    protected final ObjectId renditionDocumentId;
 
-    private final String mimeType;
+    protected final String mimeType;
 
-    private final long length;
+    protected final long length;
 
-    private final String title;
+    protected final String title;
 
-    private final String kind;
+    protected final String kind;
 
-    private final long height;
+    protected final long height;
 
-    private final long width;
+    protected final long width;
 
-    private final Map<String, String> metadata;
+    protected final Map<String, String> metadata;
 
     public SimpleRendition(ObjectId objectId, String contentStreamId,
             ObjectId renditionDocumentId, String mimeType, long length,

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java Sun Aug  2 18:11:18 2009
@@ -27,6 +27,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.chemistry.BaseType;
+import org.apache.chemistry.ChangeCapability;
 import org.apache.chemistry.Connection;
 import org.apache.chemistry.JoinCapability;
 import org.apache.chemistry.ObjectId;
@@ -138,6 +139,18 @@
         return "Chemistry Simple Repository";
     }
 
+    public Set<BaseType> getChangeLogBaseTypes() {
+        return Collections.emptySet();
+    }
+
+    public boolean isChangeLogIncomplete() {
+        return false;
+    }
+
+    public String getLatestChangeLogToken() {
+        return "";
+    }
+
     /*
      * ----- RepositoryCapabilities -----
      */
@@ -182,4 +195,8 @@
         return RenditionCapability.NONE;
     }
 
+    public ChangeCapability getChangeCapability() {
+        return ChangeCapability.NONE;
+    }
+
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java Sun Aug  2 18:11:18 2009
@@ -253,41 +253,41 @@
             PROP_POLICY_NAME, //
             PROP_POLICY_TEXT);
 
-    private final String id;
+    protected final String id;
 
-    private final String localName;
+    protected final String localName;
 
-    private final URI localNamespace;
+    protected final URI localNamespace;
 
-    private final String queryName;
+    protected final String queryName;
 
-    private final String displayName;
+    protected final String displayName;
 
-    private final String parentId;
+    protected final String parentId;
 
-    private final BaseType baseType;
+    protected final BaseType baseType;
 
-    private final String description;
+    protected final String description;
 
-    private final boolean creatable;
+    protected final boolean creatable;
 
-    private final boolean queryable;
+    protected final boolean queryable;
 
-    private final boolean controllable;
+    protected final boolean controllable;
 
-    private final boolean includedInSuperTypeQuery;
+    protected final boolean includedInSuperTypeQuery;
 
-    private final boolean fileable;
+    protected final boolean fileable;
 
-    private final boolean versionable;
+    protected final boolean versionable;
 
-    private final ContentStreamPresence contentStreamAllowed;
+    protected final ContentStreamPresence contentStreamAllowed;
 
-    private final String[] allowedSourceTypes;
+    protected final String[] allowedSourceTypes;
 
-    private final String[] allowedTargetTypes;
+    protected final String[] allowedTargetTypes;
 
-    private final Map<String, PropertyDefinition> propertyDefinitions;
+    protected final Map<String, PropertyDefinition> propertyDefinitions;
 
     public SimpleType(String id, String parentId, String localName,
             URI localNamespace, String queryName, String displayName,

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=800122&r1=800121&r2=800122&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 Sun Aug  2 18:11:18 2009
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -464,4 +465,12 @@
         throw new UnsupportedOperationException();
     }
 
+    public Iterator<ObjectEntry> getChangeLog(String changeLogToken,
+            boolean includeProperties, int maxItems, boolean[] hasMoreItems,
+            String[] lastChangeLogToken) {
+        hasMoreItems[0] = false;
+        lastChangeLogToken[0] = null;
+        return Collections.<ObjectEntry> emptyList().iterator();
+    }
+
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrDocument.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrDocument.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrDocument.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrDocument.java Sun Aug  2 18:11:18 2009
@@ -17,7 +17,6 @@
 package org.apache.chemistry.jcr;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.Map;
@@ -26,6 +25,7 @@
 import javax.jcr.RepositoryException;
 
 import org.apache.chemistry.BaseType;
+import org.apache.chemistry.ChangeInfo;
 import org.apache.chemistry.ContentStream;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
@@ -150,4 +150,9 @@
     public BaseType getBaseType() {
         return BaseType.DOCUMENT;
     }
+
+    public ChangeInfo getChangeInfo() {
+        return null;
+    }
+
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrFolder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrFolder.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrFolder.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrFolder.java Sun Aug  2 18:11:18 2009
@@ -16,7 +16,6 @@
  */
 package org.apache.chemistry.jcr;
 
-import java.io.InputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -30,6 +29,7 @@
 
 import org.apache.chemistry.BaseType;
 import org.apache.chemistry.CMISObject;
+import org.apache.chemistry.ChangeInfo;
 import org.apache.chemistry.ContentStream;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
@@ -140,10 +140,13 @@
         return BaseType.FOLDER;
     }
 
+    public ChangeInfo getChangeInfo() {
+        return null;
+    }
+
     public ContentStream getContentStream(String contentStreamId) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
 
-
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java Sun Aug  2 18:11:18 2009
@@ -18,7 +18,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.HashMap;

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java?rev=800122&r1=800121&r2=800122&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java Sun Aug  2 18:11:18 2009
@@ -23,6 +23,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
@@ -31,6 +32,7 @@
 import javax.jcr.nodetype.NodeTypeManager;
 
 import org.apache.chemistry.BaseType;
+import org.apache.chemistry.ChangeCapability;
 import org.apache.chemistry.Connection;
 import org.apache.chemistry.JoinCapability;
 import org.apache.chemistry.ObjectId;
@@ -176,6 +178,18 @@
         return this;
     }
 
+    public Set<BaseType> getChangeLogBaseTypes() {
+        return Collections.emptySet();
+    }
+
+    public boolean isChangeLogIncomplete() {
+        return false;
+    }
+
+    public String getLatestChangeLogToken() {
+        return "";
+    }
+
     public String getDescription() {
         return getName();
     }
@@ -222,6 +236,10 @@
         return RenditionCapability.NONE;
     }
 
+    public ChangeCapability getChangeCapability() {
+        return ChangeCapability.NONE;
+    }
+
     public boolean hasMultifiling() {
         return true;
     }



Mime
View raw message