Provide Add Path support for all AFI/SAFI
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / RouteEntryDependenciesContainerImpl.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. 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.protocol.bgp.rib.impl;
9
10 import static java.util.Objects.requireNonNull;
11
12 import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
13 import org.opendaylight.protocol.bgp.rib.spi.entry.RouteEntryDependenciesContainer;
14 import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRibRoutingPolicy;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
17 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
18
19 public final class RouteEntryDependenciesContainerImpl implements RouteEntryDependenciesContainer {
20     private final RIBSupport ribSupport;
21     private final TablesKey tablesKey;
22     private final KeyedInstanceIdentifier<Tables, TablesKey> locRibTarget;
23     private final BGPRibRoutingPolicy routingPolicies;
24
25     public RouteEntryDependenciesContainerImpl(
26             final RIBSupport ribSupport,
27             final BGPRibRoutingPolicy routingPolicies,
28             final TablesKey tablesKey,
29             final KeyedInstanceIdentifier<Tables, TablesKey> locRibTarget) {
30         this.ribSupport = requireNonNull(ribSupport);
31         this.tablesKey = requireNonNull(tablesKey);
32         this.routingPolicies = requireNonNull(routingPolicies);
33         this.locRibTarget = requireNonNull(locRibTarget);
34     }
35
36     @Override
37     public RIBSupport getRibSupport() {
38         return this.ribSupport;
39     }
40
41     @Override
42     public TablesKey getLocalTablesKey() {
43         return this.tablesKey;
44     }
45
46     @Override
47     public KeyedInstanceIdentifier<Tables, TablesKey> getLocRibTableTarget() {
48         return this.locRibTarget;
49     }
50
51     @Override
52     public BGPRibRoutingPolicy getRoutingPolicies() {
53         return this.routingPolicies;
54     }
55 }