Interface MetadataProvider

All Superinterfaces:
Provider<Metadata>
All Known Subinterfaces:
ManagedMetadataProvider
All Known Implementing Classes:
ScriptedMetadataProvider

@NonNullByDefault public interface MetadataProvider extends Provider<Metadata>
This is a marker interface for metadata provider implementations that should be used to register those as an OSGi service.
Author:
Kai Kreuzer - Initial contribution, Mark Herwege - Added reserved namespaces
  • Method Details

    • getReservedNamespaces

      default Collection<String> getReservedNamespaces()
      A MetadataProvider implementation can reserve a metadata namespace. Only a single provider for this namespace should provide metadata for this namespace. Updating metadata in this namespace will have to be with this provider, and is refused if the provider is not the ManagedProvider for the registry. If multiple providers for this namespace are added to the registry, all of them will be considered as reserved. This should be avoided. This is useful if providers calculate metadata and this metadata is not meant to be persisted with a ManagedProvider. An example is semantics metadata provided by its own provider. Implementations are expected to return an immutable Collection. The default implementation returns an empty Set.
      Returns:
      collection reserved namespaces