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 Mode Property/Node (at a specific path) In Package In Repository Before Installation In Repository After Installation REPLACE
non-existing existing removed existing existing replaced existing non-existing created MERGE_PROPERTIES
non-existing existing not touched existing existing not touched existing non-existing created UPDATE_PROPERTIES
non-existing existing not touched existing existing replaced existing non-existing created
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MERGE
Deprecated.As this behaves inconsistently for the different serialization formats, rather useMERGE_PROPERTIES
.MERGE_PROPERTIES
Existing properties are not touched, new nodes/properties are added, no existing nodes/properties are deleted.REPLACE
Normal behavior.UPDATE
Deprecated.As this behaves inconsistently for the different serialization formats, rather useUPDATE_PROPERTIES
UPDATE_PROPERTIES
Existing properties are replaced, new nodes/properties are added, no existing nodes/properties are deleted.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImportMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static ImportMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 useMERGE_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 useUPDATE_PROPERTIES
Existing properties are replaced (except forjcr: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 modeREPLACE
.
-
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 propertyjcr: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: onlyrep: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 forjcr: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 Detail
-
values
public static ImportMode[] 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 (ImportMode c : ImportMode.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
-