Enum ImportMode

java.lang.Object
java.lang.Enum<ImportMode>
org.apache.jackrabbit.vault.fs.api.ImportMode
All Implemented Interfaces:
Serializable, Comparable<ImportMode>

public enum ImportMode extends Enum<ImportMode>
ImportMode is used to define how importing content is applied to the existing content in the repository.
"Import Mode Effects"
Import ModeProperty/Node (at a specific path)
In PackageIn Repository Before InstallationIn Repository After Installation
REPLACEnon-existingexistingremoved
existingexistingreplaced
existingnon-existingcreated
MERGE_PROPERTIESnon-existingexistingnot touched
existingexistingnot touched
existingnon-existingcreated
UPDATE_PROPERTIESnon-existingexistingnot touched
existingexistingreplaced
existingnon-existingcreated
  • Enum Constant Details

    • REPLACE

      public static final ImportMode REPLACE
      Normal behavior. Existing content is replaced completely by the imported content, i.e. is overridden or deleted accordingly.
    • MERGE

      @Deprecated public static final ImportMode MERGE
      Deprecated.
      As this behaves inconsistently for the different serialization formats, rather use MERGE_PROPERTIES.
      Existing content is not modified, i.e. only new content is added and none is deleted or modified.

      Only considered for

      • Binaries: they will never be imported if the parent node has this import mode.
      • Authorizable nodes: only rep:members of existing authorizables is updated, no other property on those node types is added/modified.
      • Simple files: i.e. they will never be imported in case the repo has this file already.
      • Other docview files: It will ignore them in case the docview's root node does already exist in the repo (both full coverage and .content.xml). It skips non-existing child nodes/properties in the docview as well.
    • UPDATE

      @Deprecated public static final ImportMode UPDATE
      Deprecated.
      As this behaves inconsistently for the different serialization formats, rather use UPDATE_PROPERTIES
      Existing properties are replaced (except for jcr:primaryType), new properties and nodes are added and no existing properties or nodes are deleted. Only affects authorizable nodes (not their child nodes). Other nodes are imported in mode REPLACE.
    • MERGE_PROPERTIES

      public static final ImportMode MERGE_PROPERTIES
      Existing properties are not touched, new nodes/properties are added, no existing nodes/properties are deleted. The only existing property potentially touched is the multi-value property jcr:mixinType which is extended with the values from the imported content. As the primary type is never changed import will skip new properties/nodes which are not allowed by the node type definition of primary + mixin types. Authorizable nodes: only rep:members of existing authorizables is updated, no other property on those node types is added/modified.
    • UPDATE_PROPERTIES

      public static final ImportMode UPDATE_PROPERTIES
      Existing properties are replaced, new nodes/properties are added, no existing nodes/properties are deleted. Existing multi-value properties are replaced completely and not extended except for jcr:mixinType which is extended with the values from the imported content. As the primary type is never changed import will skip new properties/child nodes which are not allowed by the node type definition of primary + mixin types.
  • Method Details

    • values

      public static ImportMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ImportMode 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 name
      NullPointerException - if the argument is null