Unification of broker concepts implementations
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / DataChange.java
1 /*
2  * Copyright (c) 2013 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.common.api.data;
9
10 import java.util.Map;
11 import java.util.Set;
12
13 // FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
14 // import org.opendaylight.yangtools.concepts.Path;
15
16 public interface DataChange<P/* extends Path<P> */, D> {
17
18     /**
19      * Returns a map of paths and newly created objects
20      * 
21      * @return map of paths and newly created objects
22      */
23     Map<P, D> getCreatedOperationalData();
24
25     /**
26      * Returns a map of paths and newly created objects
27      * 
28      * @return map of paths and newly created objects
29      */
30     Map<P, D> getCreatedConfigurationData();
31
32     /**
33      * Returns a map of paths and respective updated objects after update.
34      * 
35      * Original state of the object is in
36      * {@link #getOriginalOperationalData()}
37      * 
38      * @return map of paths and newly created objects
39      */
40     Map<P, D> getUpdatedOperationalData();
41
42     /**
43      * Returns a map of paths and respective updated objects after update.
44      * 
45      * Original state of the object is in
46      * {@link #getOriginalConfigurationData()}
47      * 
48      * @return map of paths and newly created objects
49      */
50     Map<P, D> getUpdatedConfigurationData();
51
52     /**
53      * Returns a set of paths of removed objects.
54      * 
55      * Original state of the object is in
56      * {@link #getOriginalConfigurationData()}
57      * 
58      * @return map of paths and newly created objects
59      */
60     Set<P> getRemovedConfigurationData();
61
62     /**
63      * Returns a set of paths of removed objects.
64      * 
65      * Original state of the object is in
66      * {@link #getOriginalOperationalData()}
67      * 
68      * @return map of paths and newly created objects
69      */
70     Set<P> getRemovedOperationalData();
71
72     /**
73      * Return a map of paths and original state of updated and removed objectd.
74      * 
75      * @return map of paths and original state of updated and removed objectd.
76      */
77     Map<P, D> getOriginalConfigurationData();
78
79     /**
80      * Return a map of paths and original state of updated and removed objectd.
81      * 
82      * @return map of paths and original state of updated and removed objectd.
83      */
84     Map<P, D> getOriginalOperationalData();
85
86     /**
87      * Returns a original subtree of data, which starts at the path
88      * where listener was registered.
89      * 
90      */
91     D getOriginalConfigurationSubtree();
92
93     /**
94      * Returns a original subtree of data, which starts at the path
95      * where listener was registered.
96      * 
97      */
98     D getOriginalOperationalSubtree();
99
100     /**
101      * Returns a new subtree of data, which starts at the path
102      * where listener was registered.
103      * 
104      */
105     D getUpdatedConfigurationSubtree();
106
107     /**
108      * Returns a new subtree of data, which starts at the path
109      * where listener was registered.
110      * 
111      */
112     D getUpdatedOperationalSubtree();
113
114 }