You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2025/03/17 16:53:16 UTC
(jackrabbit-filevault) branch JCRVLT-753 created (now f62fc895)
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a change to branch JCRVLT-753
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
at f62fc895 JCRVLT-753: warn about potential constraint violations for FORCE_REMOVE_CONFLICTING_ID
This branch includes the following new commits:
new f62fc895 JCRVLT-753: warn about potential constraint violations for FORCE_REMOVE_CONFLICTING_ID
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(jackrabbit-filevault) 01/01: JCRVLT-753: warn about potential constraint violations for FORCE_REMOVE_CONFLICTING_ID
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch JCRVLT-753
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
commit f62fc895af0f150f7d67e6ba3ea39b48f4244ef3
Author: Julian Reschke <re...@apache.org>
AuthorDate: Mon Mar 17 17:52:59 2025 +0100
JCRVLT-753: warn about potential constraint violations for FORCE_REMOVE_CONFLICTING_ID
---
.../java/org/apache/jackrabbit/vault/fs/api/IdConflictPolicy.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/IdConflictPolicy.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/IdConflictPolicy.java
index 7449607d..2a9b15d0 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/IdConflictPolicy.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/IdConflictPolicy.java
@@ -29,7 +29,12 @@ public enum IdConflictPolicy {
/** Create a new ID for the imported node (for all referenceable nodes), this may break existing references in the package. This fails if a referenced node is overwritten by a node with a different id */
CREATE_NEW_ID,
/** Remove the node with the conflicting id along with its references (even if outside the filters). This goes beyond {@link ImportUUIDBehavior#IMPORT_UUID_COLLISION_REMOVE_EXISTING}, as it also does not only resolve UUID collisions but also replacements of referenceable nodes with different ids.
- * Use with care, as this may remove references outside the filter. */
+ * <p>
+ * Use with care, as this may remove references outside the filter.
+ * <p>
+ * <em>Note:</em> if the node with the conflicting id happens to be a mandatory child node,
+ * that operation may fail with a {@link javax.jcr.nodetype.ConstraintViolationException}.
+ */
FORCE_REMOVE_CONFLICTING_ID,
/** Assign the newly imported conflicting node a new id in case the conflicting existing node does not have the same parent (i.e. is no sibling).
* If the newly imported node is a sibling of the existing conflicting one either remove the existing node with the conflicting id but keep its references (in case the conflicting one is contained in the filter)