All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.jackrabbit.vault.fs.api.ImportMode Maven / Gradle / Ivy

There is a newer version: 2024.11.18751.20241128T090041Z-241100
Show newest version
/*
 * 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 ModeProperty/Node (at a specific path)
In PackageIn Repository Before InstallationIn Repository After Installation
{@link #REPLACE}non-existingexistingremoved
existingexistingreplaced
existingnon-existingcreated
{@link #MERGE_PROPERTIES}non-existingexistingnot touched
existingexistingnot touched
existingnon-existingcreated
{@link #UPDATE_PROPERTIES}non-existingexistingnot touched
existingexistingreplaced
existingnon-existingcreated
*/ 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