Move data extensions to data/
[yangtools.git] / data / rfc8528-data-api / src / main / java / org / opendaylight / yangtools / rfc8528 / data / api / MountPointContextFactory.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech s.r.o. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.rfc8528.data.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Map;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.eclipse.jdt.annotation.Nullable;
14 import org.opendaylight.yangtools.rfc8528.data.api.YangLibraryConstants.ContainerName;
15 import org.opendaylight.yangtools.yang.parser.api.YangParserException;
16
17 /**
18  * An entity able to resolve the SchemaContext for embedded mount points based on generic data provided by the current
19  * interpretation context.
20  */
21 @Beta
22 @NonNullByDefault
23 public interface MountPointContextFactory {
24     /**
25      * Create a mount point context based on available information. Implementations are expected to attempt to interpret
26      * provided data to their best of their ability.
27      *
28      * @param libraryContainers available YANG library containers in opaque format
29      * @param schemaMounts the content of 'schema-mounts' container, if available
30      * @return A {@link MountPointContext}
31      * @throws YangParserException if the schema cannot be assembled
32      */
33     MountPointContext createContext(Map<ContainerName, MountPointChild> libraryContainers,
34             @Nullable MountPointChild schemaMounts) throws YangParserException;
35 }