chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1494098 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src: main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ test/java/org/apache/chemistry/opencmis/inmemory/
Date Tue, 18 Jun 2013 11:00:04 GMT
Author: jens
Date: Tue Jun 18 11:00:04 2013
New Revision: 1494098

URL: http://svn.apache.org/r1494098
Log:
InMemory: CMIS 1.1 fix  that PWC is not latest version or latest major version

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.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/storedobj/impl/DocumentVersionImpl.java?rev=1494098&r1=1494097&r2=1494098&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
Tue Jun 18 11:00:04 2013
@@ -165,6 +165,8 @@ public class DocumentVersionImpl extends
         List<DocumentVersion> allVers = fContainer.getAllVersions();
         boolean isLatestVersion;
         isLatestVersion = allVers.get(allVers.size() - 1).equals(this);
+        if (isPwc())
+        	isLatestVersion = false; // CMIS 1.1 forbids it for PWC
         return isLatestVersion;
     }
 
@@ -182,7 +184,7 @@ public class DocumentVersionImpl extends
             }
         }
 
-        boolean isLatestMajorVersion = latestMajor == this;
+        boolean isLatestMajorVersion = latestMajor == this && !isPwc(); // CMIS 1.1
forbids it for PWC
         return isLatestMajorVersion;
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java?rev=1494098&r1=1494097&r2=1494098&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
Tue Jun 18 11:00:04 2013
@@ -514,7 +514,8 @@ public class VersioningTest extends Abst
         PropertyBoolean pdb = (PropertyBoolean) props.get(PropertyIds.IS_LATEST_VERSION);
         assertNotNull(pdb);
         boolean bVal = pdb.getFirstValue();
-        assertTrue(bVal); 
+        if (versioningState != VersioningState.CHECKEDOUT)
+        	assertTrue(bVal); 
 
         pdb = (PropertyBoolean) props.get(PropertyIds.IS_MAJOR_VERSION);
         assertNotNull(pdb);



Mime
View raw message