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;
12 import org.opendaylight.controller.config.api.DependencyResolver;
13 import org.osgi.framework.BundleContext;
18 * @deprecated Replaced by blueprint wiring
21 public class SchemaServiceImplSingletonModuleFactory extends
22 org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractSchemaServiceImplSingletonModuleFactory {
24 public static final String SINGLETON_NAME = "yang-schema-service";
27 public SchemaServiceImplSingletonModule instantiateModule(String instanceName,
28 DependencyResolver dependencyResolver, SchemaServiceImplSingletonModule oldModule,
29 AutoCloseable oldInstance, BundleContext bundleContext) {
30 checkArgument(SINGLETON_NAME.equals(instanceName),
31 "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
32 SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule,
33 oldInstance, bundleContext);
34 // FIXME bundle context should not be passed around
35 module.setBundleContext(bundleContext);
40 public SchemaServiceImplSingletonModule instantiateModule(String instanceName,
41 DependencyResolver dependencyResolver, BundleContext bundleContext) {
42 checkArgument(SINGLETON_NAME.equals(instanceName),
43 "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
44 SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver,
46 // FIXME bundle context should not be passed around
47 module.setBundleContext(bundleContext);