Split out yang-data-tree-impl
[yangtools.git] / data / yang-data-tree-ri / src / main / java / org / opendaylight / yangtools / yang / data / tree / impl / LogicalOperation.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.data.tree.impl;
9
10 import org.opendaylight.yangtools.yang.data.tree.api.ModificationType;
11
12 /**
13  * Enumeration of all possible node modification states. These are used in
14  * data tree modification context to quickly assess what sort of modification
15  * the node is undergoing. This is a superset of {@link ModificationType}:
16  * where this type represents a logical operation, {@link ModificationType}
17  * represents a physical operation.
18  */
19 enum LogicalOperation {
20     /**
21      * Node is currently unmodified.
22      */
23     NONE,
24
25     /**
26      * A child node, either direct or indirect, has been modified. This means
27      * that the data representation of this node has potentially changed.
28      */
29     TOUCH,
30
31     /**
32      * This node has been placed into the tree, potentially completely replacing
33      * pre-existing contents.
34      */
35     WRITE,
36
37     /**
38      * This node has been deleted along with any of its child nodes.
39      */
40     DELETE,
41
42     /**
43      * Node has been written into the tree, but instead of replacing pre-existing
44      * contents, it has been merged. This means that any incoming nodes which
45      * were present in the tree have been replaced, but their child nodes have
46      * been retained.
47      */
48     MERGE,
49 }