Remove opendaylight directory
[netconf.git] / netconf / aaa-authn-odl-plugin / src / main / java / org / opendaylight / yang / gen / v1 / config / aaa / authn / netconf / plugin / rev150715 / AuthProviderModule.java
1 /*
2  * Copyright (c) 2015 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 package org.opendaylight.yang.gen.v1.config.aaa.authn.netconf.plugin.rev150715;
10
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.aaa.odl.CredentialServiceAuthProvider;
13 import org.opendaylight.controller.config.api.DependencyResolver;
14 import org.opendaylight.controller.config.api.ModuleIdentifier;
15 import org.osgi.framework.BundleContext;
16
17 public class AuthProviderModule extends org.opendaylight.yang.gen.v1.config.aaa.authn.netconf.plugin.rev150715.AbstractAuthProviderModule {
18
19     private BundleContext bundleContext;
20
21     public AuthProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
22         super(identifier, dependencyResolver);
23     }
24
25     public AuthProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.config.aaa.authn.netconf.plugin.rev150715.AuthProviderModule oldModule, AutoCloseable oldInstance) {
26         super(identifier, dependencyResolver, oldModule, oldInstance);
27     }
28
29     public AuthProviderModule(final ModuleIdentifier moduleIdentifier, final DependencyResolver dependencyResolver, final AuthProviderModule oldModule, final AutoCloseable oldInstance, final BundleContext bundleContext) {
30         this(moduleIdentifier, dependencyResolver, oldModule, oldInstance);
31         this.bundleContext = bundleContext;
32     }
33
34     public AuthProviderModule(final ModuleIdentifier moduleIdentifier, final DependencyResolver dependencyResolver, final BundleContext bundleContext) {
35         this(moduleIdentifier, dependencyResolver);
36         this.bundleContext = bundleContext;
37     }
38
39     @Override
40     public void customValidation() {
41         Preconditions.checkNotNull(bundleContext, "BundleContext was not properly set up");
42     }
43
44     @Override
45     public AutoCloseable createInstance() {
46        return new CredentialServiceAuthProvider(bundleContext);
47     }
48
49 }