2 * Copyright (c) 2023 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.yanglib.writer;
10 import java.util.Optional;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.eclipse.jdt.annotation.Nullable;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
14 import org.opendaylight.yangtools.yang.common.Revision;
17 * The service providing URLs to yang schema sources.
19 // TODO: current interface is a part of integration with YangLibrarySupport and expected
20 // to be removed once the similar interface is implemented there.
21 // Addresses https://jira.opendaylight.org/browse/MDSAL-833
22 public interface YangLibrarySchemaSourceUrlProvider {
25 * Provides yang schema source URL where it can be downloaded from.
27 * @param moduleSetName the module set name the requested resource belongs to
28 * @param moduleName referenced module or submodule name
29 * @param revision optional revision
31 * @return optional of URL to requested resource
33 Optional<Uri> getSchemaSourceUrl(@NonNull String moduleSetName, @NonNull String moduleName,
34 @Nullable Revision revision);