Graph modelisation for Path Computation Algorithm
[bgpcep.git] / graph / graph-api / src / main / java / org / opendaylight / graph / ConnectedGraphProvider.java
1 /*
2  * Copyright (c) 2019 Orange.  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
9 package org.opendaylight.graph;
10
11 import java.util.List;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.Graph;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.Graph.DomainScope;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.GraphKey;
15
16 /**
17  * Connected Graph Provider is a new service provided by the Graph feature to manage the Connected Graph.
18  *
19  * <p>
20  * It allows to get, create, add and delete Connected Graph. All associated Graph are automatically
21  * stored in the DataStore.
22  *
23  * @author Olivier Dugeon
24  * @author Philippe Niger
25  *
26  */
27
28 public interface ConnectedGraphProvider {
29
30     /**
31      * Returns Graph for the given graph name.
32      *
33      * @param name Name of the Graph
34      *
35      * @return Graph
36      */
37     Graph getGraph(String name);
38
39     /**
40      * Returns the Graph for the given graph key.
41      *
42      * @param key Unique Graph Identifier
43      *
44      * @return Graph
45      */
46     Graph getGraph(GraphKey key);
47
48     /**
49      * Returns Connected Graph for the given graph name.
50      *
51      * @param name Name of the Graph
52      *
53      * @return Connected Graph
54      */
55     ConnectedGraph getConnectedGraph(String name);
56
57     /**
58      * Returns Connected Graph for the given graph key.
59      *
60      * @param key Unique Graph Identifier
61      *
62      * @return Connected Graph
63      */
64     ConnectedGraph getConnectedGraph(GraphKey key);
65
66     /**
67      * Returns all registered Connected Graphs.
68      *
69      * @return List of Connected Graph
70      */
71     List<ConnectedGraph> getConnectedGraphs();
72
73     /**
74      * Create Connected Graph and associated Graph for given name and Graph Type. The associated Graph is also stored
75      * in the DataStore.
76      *
77      * @param name  Name of the Graph
78      * @param scope Domain scope of the Graph (Intra or Inter domain)
79      *
80      * @return Connected Graph
81      */
82     ConnectedGraph createConnectedGraph(String name, DomainScope scope);
83
84     /**
85      * Add a Graph. This action will automatically create the associated Connected Graph and store is in the DataStore.
86      *
87      * @param graph  Graph to be added
88      *
89      * @return Connected Graph
90      */
91     ConnectedGraph addGraph(Graph graph);
92
93     /**
94      * Remove a Graph. This action will automatically delete the associated Connected Graph and store is in the
95      * DataStore.
96      *
97      * @param key  Graph Identifier
98      *
99      */
100     void deleteGraph(GraphKey key);
101
102 }