org.apache.jackrabbit.vault.fs.api.ImportMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-sdk-api Show documentation
Show all versions of aem-sdk-api Show documentation
The Adobe Experience Manager SDK
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.vault.fs.api;
/**
* {@code 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
* {@link #REPLACE} non-existing existing removed
* existing existing replaced
* existing non-existing created
* {@link #MERGE_PROPERTIES} non-existing existing not touched
* existing existing not touched
* existing non-existing created
* {@link #UPDATE_PROPERTIES} non-existing existing not touched
* existing existing replaced
* existing non-existing created
*
*/
public enum ImportMode {
/**
* Normal behavior. Existing content is replaced completely by the imported
* content, i.e. is overridden or deleted accordingly.
*/
REPLACE,
/**
* 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 {@code 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.
*
*
* @deprecated As this behaves inconsistently for the different serialization formats, rather use {@link #MERGE_PROPERTIES}.
*/
@Deprecated()
MERGE,
/**
* Existing properties are replaced (except for {@code 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 {@link #REPLACE}.
* @deprecated As this behaves inconsistently for the different serialization formats, rather use {@link #UPDATE_PROPERTIES}
*/
@Deprecated()
UPDATE,
/**
* 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 {@code 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 {@code rep:members} of existing authorizables is updated, no other property on those node types is added/modified.
*/
MERGE_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 {@code 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.
*/
UPDATE_PROPERTIES
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy