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.netconf.schema.mapping;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.yang.model.parser.api.YangParserException;
12 import org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory;
13 import org.osgi.service.component.annotations.Activate;
14 import org.osgi.service.component.annotations.Component;
15 import org.osgi.service.component.annotations.Deactivate;
16 import org.osgi.service.component.annotations.Reference;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 @Component(immediate = true)
22 public final class OSGiBaseNetconfSchemas implements BaseNetconfSchemas {
23 private static final Logger LOG = LoggerFactory.getLogger(OSGiBaseNetconfSchemas.class);
26 YangParserFactory parserFactory;
28 private DefaultBaseNetconfSchemas delegate;
31 public BaseSchema getBaseSchema() {
32 return delegate.getBaseSchema();
36 public BaseSchema getBaseSchemaWithNotifications() {
37 return delegate.getBaseSchemaWithNotifications();
41 void activate() throws YangParserException {
42 delegate = new DefaultBaseNetconfSchemas(parserFactory);
43 LOG.info("Base NETCONF Schemas started");
49 LOG.info("Base NETCONF Schemas stopped");