Class NodeStateCopier.Builder

  • Enclosing class:
    NodeStateCopier

    public static class NodeStateCopier.Builder
    extends java.lang.Object
    The NodeStateCopier.Builder allows configuring a NodeState copy operation with includePaths, excludePaths and mergePaths.
    Include paths can define which paths should be copied from the source to the target.
    Exclude paths allow restricting which paths should be copied. This is especially useful when there are individual nodes in an included path that should not be copied.
    By default copying will remove items that already exist in the target but do not exist in the source. If this behaviour is undesired that is where merge paths come in.
    Merge paths dictate in which parts of the tree the copy operation should be additive, i.e. the content from source is merged with the content in the target. Nodes that are present in the target but not in the source are then not deleted. However, in the case where nodes are present in both the source and the target, the node from the source is copied with its properties and any properties previously present on the target's node are lost.
    Finally, using one of the copy methods, NodeStores or NodeStates can be copied.