You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2012/08/08 14:34:49 UTC
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
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();
}