Class AbstractDynamicMountPointContextFactory
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.AbstractIdentifiable<T,T>
-
- org.opendaylight.yangtools.concepts.AbstractSimpleIdentifiable<MountPointIdentifier>
-
- org.opendaylight.yangtools.rfc8528.data.util.AbstractDynamicMountPointContextFactory
-
- All Implemented Interfaces:
Identifiable<MountPointIdentifier>
,MountPointContextFactory
- Direct Known Subclasses:
AbstractMountPointContextFactory
@Beta public abstract class AbstractDynamicMountPointContextFactory extends AbstractSimpleIdentifiable<MountPointIdentifier> implements MountPointContextFactory
Abstract base class for dynamic resolvers.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDynamicMountPointContextFactory(@NonNull MountPointIdentifier mountId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract @NonNull EffectiveModelContext
bindLibrary(@NonNull YangLibraryConstants.ContainerName containerName, @NonNull ContainerNode libData)
Assemble the MountPointContext for specified normalized YANG Library top-level container.MountPointContext
createContext(Map<YangLibraryConstants.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 YangLibraryConstants.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 Detail
-
AbstractDynamicMountPointContextFactory
protected AbstractDynamicMountPointContextFactory(@NonNull MountPointIdentifier mountId)
-
-
Method Detail
-
createContext
public final MountPointContext createContext(Map<YangLibraryConstants.ContainerName,MountPointChild> libraryContainers, MountPointChild schemaMounts) throws YangParserException
Description 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:
YangParserException
- 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 YangLibraryConstants.ContainerName containerName, @NonNull ContainerNode libData) throws YangParserException
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 nullYangParserException
- if the schema context cannot be assembled
-
findSchemaForLibrary
protected abstract Optional<EffectiveModelContext> findSchemaForLibrary(@NonNull YangLibraryConstants.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
-
-