Enum IdConflictPolicy
- java.lang.Object
-
- java.lang.Enum<IdConflictPolicy>
-
- org.apache.jackrabbit.vault.fs.api.IdConflictPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<IdConflictPolicy>
public enum IdConflictPolicy extends Enum<IdConflictPolicy>
Defines the handling of IDs on import.Note:
CREATE_NEW_ID
affects imports of nodes without id conflicts as well.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CREATE_NEW_ID
Create a new ID for the imported node (for all referenceable nodes), this may break existing references in the package.FAIL
Default handling, fail in case of unresolvable conflicts.FORCE_REMOVE_CONFLICTING_ID
Remove the node with the conflicting id along with its references (even if outside the filters).LEGACY
Assign the newly imported conflicting node a new id in case the conflicting existing node does not have the same parent (i.e.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IdConflictPolicy
valueOf(String name)
Returns the enum constant of this type with the specified name.static IdConflictPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FAIL
public static final IdConflictPolicy FAIL
Default handling, fail in case of unresolvable conflicts. Conflicts are automatically resolved in case the conflicting UUID and all its references are inside the package filter.
-
CREATE_NEW_ID
public static final IdConflictPolicy CREATE_NEW_ID
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
-
FORCE_REMOVE_CONFLICTING_ID
public static final IdConflictPolicy FORCE_REMOVE_CONFLICTING_ID
Remove the node with the conflicting id along with its references (even if outside the filters). This goes beyondImportUUIDBehavior.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.
-
LEGACY
public static final IdConflictPolicy LEGACY
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) or skip the to be imported node (and continue with importing its children as if they were below the existing one). This was the policy which was always used in FileVault prior version 3.5.2.- Since:
- 3.6.2
-
-
Method Detail
-
values
public static IdConflictPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IdConflictPolicy c : IdConflictPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IdConflictPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-