Bug-731: Fixed few major Sonar warnings
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / controller / config / yang / bgp / rib / impl / RIBImplModule.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 /**
9  * Generated file
10
11  * Generated from: yang module name: bgp-rib-impl  yang module local name: rib-impl
12  * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
13  * Generated at: Wed Nov 06 13:02:32 CET 2013
14  *
15  * Do not modify this file unless it is present under src/main directory
16  */
17 package org.opendaylight.controller.config.yang.bgp.rib.impl;
18
19 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
20 import org.opendaylight.protocol.bgp.rib.impl.RIBImpl;
21 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
22
23 /**
24  *
25  */
26 public final class RIBImplModule extends org.opendaylight.controller.config.yang.bgp.rib.impl.AbstractRIBImplModule {
27
28     private static final String IS_NOT_SET = "is not set.";
29
30     public RIBImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier name,
31             final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
32         super(name, dependencyResolver);
33     }
34
35     public RIBImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier name,
36             final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, final RIBImplModule oldModule,
37             final java.lang.AutoCloseable oldInstance) {
38         super(name, dependencyResolver, oldModule, oldInstance);
39     }
40
41     @Override
42     public void customValidation() {
43         JmxAttributeValidationException.checkNotNull(getExtensions(), IS_NOT_SET, extensionsJmxAttribute);
44         JmxAttributeValidationException.checkNotNull(getRibId(), IS_NOT_SET, ribIdJmxAttribute);
45         JmxAttributeValidationException.checkNotNull(getLocalAs(), IS_NOT_SET, localAsJmxAttribute);
46         JmxAttributeValidationException.checkNotNull(getBgpId(), IS_NOT_SET, bgpIdJmxAttribute);
47         JmxAttributeValidationException.checkNotNull(getTcpReconnectStrategy(), IS_NOT_SET, tcpReconnectStrategyJmxAttribute);
48         JmxAttributeValidationException.checkNotNull(getSessionReconnectStrategy(), IS_NOT_SET, sessionReconnectStrategyJmxAttribute);
49         JmxAttributeValidationException.checkNotNull(getLocalTable(), IS_NOT_SET, localTableJmxAttribute);
50     }
51
52     @Override
53     public java.lang.AutoCloseable createInstance() {
54         return new RIBImpl(getRibId(), new AsNumber(getLocalAs()), getBgpId(), getExtensionsDependency(), getBgpDispatcherDependency(), getTcpReconnectStrategyDependency(), getSessionReconnectStrategyDependency(), getDataProviderDependency(), getLocalTableDependency());
55     }
56 }