Merge "Add support for enums as configuration attributes in config and netconf subsys...
[controller.git] / opendaylight / config / yang-test / src / main / java / org / opendaylight / controller / config / yang / test / impl / NetconfTestImplModule.java
1 /**
2  * Generated file
3
4  * Generated from: yang module name: config-test-impl  yang module local name: impl-netconf
5  * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6  * Generated at: Fri Sep 27 13:02:28 CEST 2013
7  *
8  * Do not modify this file unless it is present under src/main directory
9  */
10 package org.opendaylight.controller.config.yang.test.impl;
11
12
13 import com.google.common.collect.Lists;
14
15 import java.util.List;
16
17 /**
18 *
19 */
20 public final class NetconfTestImplModule
21         extends
22         org.opendaylight.controller.config.yang.test.impl.AbstractNetconfTestImplModule {
23
24     public NetconfTestImplModule(
25             org.opendaylight.controller.config.api.ModuleIdentifier name,
26             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
27         super(name, dependencyResolver);
28     }
29
30     public NetconfTestImplModule(
31             org.opendaylight.controller.config.api.ModuleIdentifier name,
32             org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
33             NetconfTestImplModule oldModule, java.lang.AutoCloseable oldInstance) {
34         super(name, dependencyResolver, oldModule, oldInstance);
35     }
36
37     @Override
38     public void validate() {
39         super.validate();
40         // Add custom validation for module attributes here.
41     }
42
43     @Override
44     public java.lang.AutoCloseable createInstance() {
45         return registerRuntimeBeans();
46     }
47
48     private NetconfTestImplRuntimeRegistration registerRuntimeBeans() {
49         NetconfTestImplRuntimeRegistration reg = getRootRuntimeBeanRegistratorWrapper().register(new NetconfTestImplRuntimeMXBean() {
50
51             @Override
52             public Long getCreatedSessions() {
53                 return getSimpleLong();
54             }
55
56             @Override
57             public Asdf getAsdf() {
58                 final Asdf asdf = new Asdf();
59                 asdf.setSimpleString("asdf");
60                 return asdf;
61             }
62
63             @Override
64             public String noArg(final String arg1) {
65                 return arg1.toUpperCase();
66             }
67
68         });
69
70         for (int i = 0; i < getSimpleShort(); i++) {
71             final int finalI = i;
72
73             reg.register(new InnerRunningDataAdditionalRuntimeMXBean() {
74                 @Override
75                 public Integer getSimpleInt3() {
76                     return getSimpleTest();
77                 }
78
79                 @Override
80                 public Deep4 getDeep4() {
81                     final Deep4 d = new Deep4();
82                     d.setBoool(false);
83                     return d;
84                 }
85
86                 @Override
87                 public String getSimpleString() {
88                     return Integer.toString(finalI);
89                 }
90
91                 @Override
92                 public void noArgInner() {
93                 }
94             });
95
96             InnerRunningDataRuntimeRegistration innerReg = reg.register(new InnerRunningDataRuntimeMXBean() {
97                 @Override
98                 public Integer getSimpleInt3() {
99                     return finalI;
100                 }
101
102                 @Override
103                 public Deep2 getDeep2() {
104                     return new Deep2();
105                 }
106             });
107
108             for (int j = 0; j < getSimpleShort(); j++) {
109                 final int finalJ = j;
110                 innerReg.register(new InnerInnerRunningDataRuntimeMXBean() {
111                     @Override
112                     public List<NotStateBean> getNotStateBean() {
113                         NotStateBean b1 = new NotStateBean();
114                         b1.setElement("not state");
115                         return Lists.newArrayList(b1);
116                     }
117
118                     @Override
119                     public Integer getSimpleInt3() {
120                         return finalJ;
121                     }
122
123                     @Override
124                     public Deep3 getDeep3() {
125                         return new Deep3();
126                     }
127
128                     @Override
129                     public List<String> getListOfStrings() {
130                         return Lists.newArrayList("l1", "l2");
131                     }
132
133                     @Override
134                     public List<RetValList> listOutput() {
135                         return Lists.newArrayList(new RetValList());
136                     }
137
138                     @Override
139                     public Boolean noArgInnerInner(Integer integer, Boolean aBoolean) {
140                         return aBoolean;
141                     }
142
143                     @Override
144                     public RetValContainer containerOutput() {
145                         return new RetValContainer();
146                     }
147
148                     @Override
149                     public List<String> leafListOutput() {
150                         return Lists.newArrayList("1", "2");
151                     }
152                 });
153             }
154         }
155
156         return reg;
157     }
158
159 }