chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1724075 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
Date Mon, 11 Jan 2016 16:14:15 GMT
Author: jens
Date: Mon Jan 11 16:14:15 2016
New Revision: 1724075

URL: http://svn.apache.org/viewvc?rev=1724075&view=rev
Log:
InMemory: fix bug, update change token when content is updated

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java?rev=1724075&r1=1724074&r2=1724075&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
Mon Jan 11 16:14:15 2016
@@ -268,6 +268,11 @@ public class InMemoryObjectServiceImpl e
 
         ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
         objectStore.setContent(so, null);
+        if (null != changeToken) {
+            String changeTokenVal = so.getChangeToken();
+            LOG.debug("deleteContentStream(), new change token is: " + changeTokenVal);
+            changeToken.setValue(changeTokenVal);
+        }
         LOG.debug("stop deleteContentStream()");
     }
 
@@ -601,6 +606,11 @@ public class InMemoryObjectServiceImpl e
         ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
         objStore.setContent(so, contentStream);
         so.updateSystemBasePropertiesWhenModified(null, context.getUsername());
+        if (null != changeToken) {
+            String changeTokenVal = so.getChangeToken();
+            LOG.debug("setContentStream(), new change token is: " + changeTokenVal);
+            changeToken.setValue(changeTokenVal);
+        }
         LOG.debug("stop setContentStream()");
     }
 
@@ -797,6 +807,11 @@ public class InMemoryObjectServiceImpl e
         ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
         objStore.appendContent(so, contentStream);
         so.updateSystemBasePropertiesWhenModified(null, context.getUsername());
+        if (null != changeToken) {
+            String changeTokenVal = so.getChangeToken();
+            LOG.debug("appendContentStream(), new change token is: " + changeTokenVal);
+            changeToken.setValue(changeTokenVal);
+        }
     }
 
     public List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(CallContext
context, String repositoryId,



Mime
View raw message