Class AbstractDynamicMountPointContextFactory
java.lang.Object
org.opendaylight.yangtools.concepts.AbstractIdentifiable<MountPointLabel,MountPointLabel>
org.opendaylight.yangtools.concepts.AbstractSimpleIdentifiable<MountPointLabel>
org.opendaylight.yangtools.yang.data.util.AbstractDynamicMountPointContextFactory
- All Implemented Interfaces:
Identifiable<MountPointLabel>
,MountPointContextFactory
- Direct Known Subclasses:
AbstractMountPointContextFactory
@Beta
public abstract class AbstractDynamicMountPointContextFactory
extends AbstractSimpleIdentifiable<MountPointLabel>
implements MountPointContextFactory
Abstract base class for dynamic resolvers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.data.api.schema.MountPointContextFactory
MountPointContextFactory.ContainerName
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractDynamicMountPointContextFactory
(@NonNull MountPointLabel label) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @NonNull EffectiveModelContext
bindLibrary
(@NonNull MountPointContextFactory.ContainerName containerName, @NonNull ContainerNode libData) Assemble the MountPointContext for specified normalized YANG Library top-level container.final MountPointContext
createContext
(Map<MountPointContextFactory.ContainerName, MountPointChild> libraryContainers, MountPointChild schemaMounts) Create a mount point context based on available information.protected abstract @NonNull MountPointContext
createMountPointContext
(@NonNull EffectiveModelContext schemaContext, @NonNull ContainerNode mountData) protected abstract Optional
<EffectiveModelContext> findSchemaForLibrary
(@NonNull MountPointContextFactory.ContainerName containerName) Return the schema in which YANG Library container content should be interpreted.Methods inherited from class org.opendaylight.yangtools.concepts.AbstractIdentifiable
addToStringAttributes, getIdentifier, toString
-
Constructor Details
-
AbstractDynamicMountPointContextFactory
-
-
Method Details
-
createContext
public final MountPointContext createContext(Map<MountPointContextFactory.ContainerName, MountPointChild> libraryContainers, MountPointChild schemaMounts) throws MountPointExceptionDescription copied from interface:MountPointContextFactory
Create a mount point context based on available information. Implementations are expected to attempt to interpret provided data to their best of their ability.- Specified by:
createContext
in interfaceMountPointContextFactory
- Parameters:
libraryContainers
- available YANG library containers in opaque formatschemaMounts
- the content of 'schema-mounts' container, if available- Returns:
- A
MountPointContext
- Throws:
MountPointException
- if the schema cannot be assembled
-
createMountPointContext
protected abstract @NonNull MountPointContext createMountPointContext(@NonNull EffectiveModelContext schemaContext, @NonNull ContainerNode mountData) -
bindLibrary
protected abstract @NonNull EffectiveModelContext bindLibrary(@NonNull MountPointContextFactory.ContainerName containerName, @NonNull ContainerNode libData) throws MountPointException Assemble the MountPointContext for specified normalized YANG Library top-level container.- Parameters:
containerName
- Top-level YANG Library containerlibData
- Top-level YANG Library container data- Returns:
- An assembled MountPointContext
- Throws:
NullPointerException
- if container is nullMountPointException
- if the schema context cannot be assembled
-
findSchemaForLibrary
protected abstract Optional<EffectiveModelContext> findSchemaForLibrary(@NonNull MountPointContextFactory.ContainerName containerName) Return the schema in which YANG Library container content should be interpreted.Note this schema is not guaranteed to contain any augmentations, hence parsing could fail.
- Parameters:
containerName
- Top-level YANG Library container name- Returns:
- The LibraryContext to use when interpreting the specified YANG Library container, or empty
- Throws:
NullPointerException
- if container is null
-