2 * Copyright © 2015 Red Hat, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210;
10 import org.opendaylight.controller.config.api.DependencyResolver;
11 import org.opendaylight.controller.config.api.ModuleIdentifier;
12 import org.opendaylight.ovsdb.lib.impl.LibraryProvider;
13 import org.osgi.framework.BundleContext;
15 import com.google.common.base.Preconditions;
17 public class LibraryModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210.AbstractLibraryModule {
18 private BundleContext bundleContext;
20 public LibraryModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) {
21 super(identifier, dependencyResolver);
24 public LibraryModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, LibraryModule oldModule, AutoCloseable oldInstance) {
25 super(identifier, dependencyResolver, oldModule, oldInstance);
29 public void customValidation() {
30 // add custom validation form module attributes here.
31 Preconditions.checkNotNull(bundleContext);
35 public java.lang.AutoCloseable createInstance() {
36 LibraryProvider provider = new LibraryProvider(bundleContext);
37 getBrokerDependency().registerProvider(provider);
41 public void setBundleContext(BundleContext bundleContext) {
42 this.bundleContext = bundleContext;