2 * Copyright (c) 2014 Cisco Systems, 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.controller.config.yang.md.sal.dom.impl;
10 import static com.google.common.base.Preconditions.checkArgument;
11 import org.opendaylight.controller.config.api.DependencyResolver;
12 import org.osgi.framework.BundleContext;
15 * @deprecated Replaced by blueprint wiring
18 public class SchemaServiceImplSingletonModuleFactory extends
19 org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractSchemaServiceImplSingletonModuleFactory {
21 public static final String SINGLETON_NAME = "yang-schema-service";
24 public SchemaServiceImplSingletonModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, SchemaServiceImplSingletonModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
25 checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
26 SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, bundleContext);
27 // FIXME bundle context should not be passed around
28 module.setBundleContext(bundleContext);
33 public SchemaServiceImplSingletonModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
34 checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
35 SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
36 // FIXME bundle context should not be passed around
37 module.setBundleContext(bundleContext);