jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1762273 - /jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
Date Mon, 26 Sep 2016 06:23:41 GMT
Author: tripod
Date: Mon Sep 26 06:23:41 2016
New Revision: 1762273

URL: http://svn.apache.org/viewvc?rev=1762273&view=rev
Log:
JCRVLT-128 System maintained cache nodes should be ignored

Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java?rev=1762273&r1=1762272&r2=1762273&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
Mon Sep 26 06:23:41 2016
@@ -1133,7 +1133,14 @@ public class DocViewSAXImporter extends
                         } else {
                             if (wspFilter.getImportMode(path) == ImportMode.REPLACE) {
                                 importInfo.onDeleted(path);
-                                child.remove();
+                                // check if child is not protected
+                                if (child.getDefinition().isProtected()) {
+                                    log.info("Refuse to delete protected child node: {}",
path);
+                                } else if (child.getDefinition().isMandatory()) {
+                                    log.info("Refuse to delete mandatory child node: {}",
path);
+                                } else {
+                                    child.remove();
+                                }
                             }
                         }
                     } else if (aclHandling == AccessControlHandling.CLEAR



Mime
View raw message