aclBuilder.aces( acl.getAces() );
@Override public Void call() throws Exception { RepositoryFile aclNode = getAclNode( fileToAddAclFor ); if ( acl == null ) { if ( aclNode != null ) { unifiedRepository.deleteFile( aclNode.getId(), true, Messages.getInstance().getString( "AclNodeHelper.WARN_0001_REMOVE_ACL_NODE", aclNode.getPath() ) ); } // ignore if no ACL node is present. } else { if ( aclNode == null ) { // Create ACL Node with reference to given file. aclNode = createAclNode( fileToAddAclFor ); } // Update ACL on file. RepositoryFileAcl existing = unifiedRepository.getAcl( aclNode.getId() ); RepositoryFileAcl updated = new RepositoryFileAcl.Builder( existing ) .aces( acl.getAces() ) .build(); unifiedRepository.updateAcl( updated ); } return null; } } );