chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1370748 - /chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java
Date Wed, 08 Aug 2012 12:34:49 GMT
Author: fmui
Date: Wed Aug  8 12:34:48 2012
New Revision: 1370748

URL: http://svn.apache.org/viewvc?rev=1370748&view=rev
Log:
CMIS-517: Local binding: use sort applyAcl() directly

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java?rev=1370748&r1=1370747&r2=1370748&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java
Wed Aug  8 12:34:48 2012
@@ -20,15 +20,10 @@
  */
 package org.apache.chemistry.opencmis.client.bindings.spi.local;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
-import org.apache.chemistry.opencmis.commons.data.Ace;
 import org.apache.chemistry.opencmis.commons.data.Acl;
 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlListImpl;
 import org.apache.chemistry.opencmis.commons.server.CmisService;
 import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
 import org.apache.chemistry.opencmis.commons.spi.AclService;
@@ -69,19 +64,7 @@ public class AclServiceImpl extends Abst
         CmisService service = getService(repositoryId);
 
         try {
-            Acl currentAcl = service.getAcl(repositoryId, objectId, false, null);
-
-            List<Ace> removeAces = new ArrayList<Ace>();
-            if (currentAcl.getAces() != null) {
-                for (Ace ace : currentAcl.getAces()) {
-                    if (ace.isDirect()) {
-                        removeAces.add(ace);
-                    }
-                }
-            }
-
-            return service.applyAcl(repositoryId, objectId, aces, new AccessControlListImpl(removeAces),
-                    AclPropagation.OBJECTONLY, null);
+            return service.applyAcl(repositoryId, objectId, aces, AclPropagation.OBJECTONLY);
         } finally {
             service.close();
         }



Mime
View raw message