Bug 1003: Restconf - remove whitespace on input
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / spi / TreeNode.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.controller.md.sal.dom.store.impl.tree.spi;
9
10 import org.opendaylight.controller.md.sal.dom.store.impl.tree.StoreTreeNode;
11 import org.opendaylight.yangtools.concepts.Identifiable;
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14
15 /*
16  * A very basic data tree node. It has a version (when it was last modified),
17  * a subtree version (when any of its children were modified) and some read-only
18  * data.
19  */
20 public interface TreeNode extends Identifiable<PathArgument>, StoreTreeNode<TreeNode> {
21     /**
22      * Get the data node version.
23      *
24      * @return Current data node version.
25      */
26     Version getVersion();
27
28     /**
29      * Get the subtree version.
30      *
31      * @return Current subtree version.
32      */
33     Version getSubtreeVersion();
34
35     /**
36      * Get a read-only view of the underlying data.
37      *
38      * @return Unmodifiable view of the underlying data.
39      */
40     NormalizedNode<?, ?> getData();
41
42     /**
43      * Get a mutable, isolated copy of the node.
44      *
45      * @return Mutable copy
46      */
47     MutableTreeNode mutable();
48 }