caa792da48f46b0052047610bab92f9ceda80319
[hc2vpp.git] /
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210;
18
19 import io.fd.honeycomb.v3po.impl.NorthboundFacadeHoneycombDOMBroker;
20 import org.opendaylight.controller.sal.core.api.AbstractProvider;
21 import org.opendaylight.controller.sal.core.api.Broker;
22 import org.opendaylight.controller.sal.core.api.model.SchemaService;
23
24 public class V3poModule extends
25         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.AbstractV3poModule {
26
27     public V3poModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
28                       org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
29         super(identifier, dependencyResolver);
30     }
31
32     public V3poModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
33                       org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
34                       org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.V3poModule oldModule,
35                       java.lang.AutoCloseable oldInstance) {
36         super(identifier, dependencyResolver, oldModule, oldInstance);
37     }
38
39     @Override
40     public void customValidation() {
41         // add custom validation form module attributes here
42     }
43
44     @Override
45     public java.lang.AutoCloseable createInstance() {
46
47         final Broker.ProviderSession providerSession =
48             getDomBrokerDependency().registerProvider(new AbstractProvider() {
49                 @Override
50                 public void onSessionInitiated(final Broker.ProviderSession providerSession) {
51                     // NOOP
52                 }
53             });
54         final SchemaService schemaBiService = providerSession.getService(SchemaService.class);
55
56         return new NorthboundFacadeHoneycombDOMBroker(getHoneycombDomDataBrokerDependency(), schemaBiService,
57             getHoneycombDomNotificationServiceDependency());
58     }
59
60 }