X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Ftest%2Fimpl%2FNetconfTestImplModule.java;h=ecbf4aba33c436b9354f4c4abe0a674de258745c;hp=ae86d42d8ebd18458aa69f80d47024bbbdd4c131;hb=9c9d6e69da3aff2d0576d8c15ea0fa0692595b6d;hpb=d431c454a362865e1b504ecc87f199836403b0e8 diff --git a/opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/NetconfTestImplModule.java b/opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/NetconfTestImplModule.java index ae86d42d8e..ecbf4aba33 100644 --- a/opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/NetconfTestImplModule.java +++ b/opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/NetconfTestImplModule.java @@ -1,159 +1,29 @@ -/** - * Generated file - - * Generated from: yang module name: config-test-impl yang module local name: impl-netconf - * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - * Generated at: Fri Sep 27 13:02:28 CEST 2013 - * - * Do not modify this file unless it is present under src/main directory - */ -package org.opendaylight.controller.config.yang.test.impl; - - -import com.google.common.collect.Lists; - -import java.util.List; - -/** +/* +* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * +* This program and the accompanying materials are made available under the +* terms of the Eclipse Public License v1.0 which accompanies this distribution, +* and is available at http://www.eclipse.org/legal/epl-v10.html */ -public final class NetconfTestImplModule - extends - org.opendaylight.controller.config.yang.test.impl.AbstractNetconfTestImplModule { - - public NetconfTestImplModule( - org.opendaylight.controller.config.api.ModuleIdentifier name, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(name, dependencyResolver); +package org.opendaylight.controller.config.yang.test.impl; +public class NetconfTestImplModule extends org.opendaylight.controller.config.yang.test.impl.AbstractNetconfTestImplModule { + public NetconfTestImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + super(identifier, dependencyResolver); } - public NetconfTestImplModule( - org.opendaylight.controller.config.api.ModuleIdentifier name, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - NetconfTestImplModule oldModule, java.lang.AutoCloseable oldInstance) { - super(name, dependencyResolver, oldModule, oldInstance); + public NetconfTestImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.test.impl.NetconfTestImplModule oldModule, java.lang.AutoCloseable oldInstance) { + super(identifier, dependencyResolver, oldModule, oldInstance); } @Override - public void validate() { - super.validate(); - // Add custom validation for module attributes here. + public void customValidation() { + // add custom validation form module attributes here. } @Override public java.lang.AutoCloseable createInstance() { - return registerRuntimeBeans(); - } - - private NetconfTestImplRuntimeRegistration registerRuntimeBeans() { - NetconfTestImplRuntimeRegistration reg = getRootRuntimeBeanRegistratorWrapper().register(new NetconfTestImplRuntimeMXBean() { - - @Override - public Long getCreatedSessions() { - return getSimpleLong(); - } - - @Override - public Asdf getAsdf() { - final Asdf asdf = new Asdf(); - asdf.setSimpleString("asdf"); - return asdf; - } - - @Override - public String noArg(final String arg1) { - return arg1.toUpperCase(); - } - - }); - - for (int i = 0; i < getSimpleShort(); i++) { - final int finalI = i; - - reg.register(new InnerRunningDataAdditionalRuntimeMXBean() { - @Override - public Integer getSimpleInt3() { - return getSimpleTest(); - } - - @Override - public Deep4 getDeep4() { - final Deep4 d = new Deep4(); - d.setBoool(false); - return d; - } - - @Override - public String getSimpleString() { - return Integer.toString(finalI); - } - - @Override - public void noArgInner() { - } - }); - - InnerRunningDataRuntimeRegistration innerReg = reg.register(new InnerRunningDataRuntimeMXBean() { - @Override - public Integer getSimpleInt3() { - return finalI; - } - - @Override - public Deep2 getDeep2() { - return new Deep2(); - } - }); - - for (int j = 0; j < getSimpleShort(); j++) { - final int finalJ = j; - innerReg.register(new InnerInnerRunningDataRuntimeMXBean() { - @Override - public List getNotStateBean() { - NotStateBean b1 = new NotStateBean(); - b1.setElement("not state"); - return Lists.newArrayList(b1); - } - - @Override - public Integer getSimpleInt3() { - return finalJ; - } - - @Override - public Deep3 getDeep3() { - return new Deep3(); - } - - @Override - public List getListOfStrings() { - return Lists.newArrayList("l1", "l2"); - } - - @Override - public List listOutput() { - return Lists.newArrayList(new RetValList()); - } - - @Override - public Boolean noArgInnerInner(Integer integer, Boolean aBoolean) { - return aBoolean; - } - - @Override - public RetValContainer containerOutput() { - return new RetValContainer(); - } - - @Override - public List leafListOutput() { - return Lists.newArrayList("1", "2"); - } - }); - } - } +return NetconfTestImplModuleUtil.registerRuntimeBeans(this); - return reg; } }