2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.netconf.sal.connect.impl;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.netconf.sal.connect.api.SchemaResourceManager;
12 import org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
14 import org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory;
15 import org.osgi.service.component.annotations.Activate;
16 import org.osgi.service.component.annotations.Component;
17 import org.osgi.service.component.annotations.Deactivate;
18 import org.osgi.service.component.annotations.Reference;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
23 @Component(immediate = true)
24 public final class OSGiSchemaResourceManager implements SchemaResourceManager {
25 private static final Logger LOG = LoggerFactory.getLogger(OSGiSchemaResourceManager.class);
28 YangParserFactory parserFactory;
30 private DefaultSchemaResourceManager delegate;
33 public SchemaResourcesDTO getSchemaResources(final NetconfNode node, final Object nodeId) {
34 return delegate.getSchemaResources(node, nodeId);
39 delegate = new DefaultSchemaResourceManager(parserFactory);
40 LOG.info("Schema Resource Manager started");
46 LOG.info("Schema Resource Manager stopped");