chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r917541 - in /incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework: AbstractCmisTestCase.java AbstractSimpleReadWriteTests.java
Date Mon, 01 Mar 2010 14:21:31 GMT
Author: fmui
Date: Mon Mar  1 14:21:31 2010
New Revision: 917541

URL: http://svn.apache.org/viewvc?rev=917541&view=rev
Log:
CMIS-141: ACLPropagation is now fetched from ACL capabilities

Modified:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractCmisTestCase.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractSimpleReadWriteTests.java

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractCmisTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractCmisTestCase.java?rev=917541&r1=917540&r2=917541&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractCmisTestCase.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractCmisTestCase.java
Mon Mar  1 14:21:31 2010
@@ -21,15 +21,11 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
 import java.io.InputStream;
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
@@ -42,6 +38,7 @@
 import org.apache.opencmis.commons.api.ExtensionsData;
 import org.apache.opencmis.commons.api.PropertyDefinition;
 import org.apache.opencmis.commons.api.TypeDefinition;
+import org.apache.opencmis.commons.enums.AclPropagation;
 import org.apache.opencmis.commons.enums.CapabilityAcl;
 import org.apache.opencmis.commons.enums.CapabilityChanges;
 import org.apache.opencmis.commons.enums.CapabilityQuery;
@@ -422,6 +419,21 @@
     return (relType != null);
   }
 
+  /**
+   * Returns the AclPropagation from the ACL capabilities.
+   */
+  protected AclPropagation getAclPropagation() {
+    RepositoryInfoData repository = getRepositoryInfo();
+
+    assertNotNull(repository.getRepositoryCapabilities());
+
+    if (repository.getAclCapabilities().getAclPropagation() == null) {
+      return AclPropagation.REPOSITORYDETERMINED;
+    }
+
+    return repository.getAclCapabilities().getAclPropagation();
+  }
+
   // ---- helpers ----
 
   /**

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractSimpleReadWriteTests.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractSimpleReadWriteTests.java?rev=917541&r1=917540&r2=917541&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractSimpleReadWriteTests.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/test/java/org/apache/opencmis/client/provider/framework/AbstractSimpleReadWriteTests.java
Mon Mar  1 14:21:31 2010
@@ -121,7 +121,7 @@
           Collections.singletonList(ace));
 
       AccessControlList newAcl = getProvider().getAclService().applyAcl(getTestRepositoryId(),
-          docId, acl, null, AclPropagation.REPOSITORYDETERMINED, null);
+          docId, acl, null, getAclPropagation(), null);
       assertNotNull(newAcl);
 
       AccessControlList readAcl = getProvider().getAclService().getAcl(getTestRepositoryId(),



Mime
View raw message