Package org.openhab.core.items
Interface MetadataProvider
- All Known Subinterfaces:
ManagedMetadataProvider
- All Known Implementing Classes:
ScriptedMetadataProvider
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 Summary
Modifier and TypeMethodDescriptiondefault Collection<String> AMetadataProviderimplementation can reserve a metadata namespace.Methods inherited from interface org.openhab.core.common.registry.Provider
addProviderChangeListener, getAll, removeProviderChangeListener
-
Method Details
-
getReservedNamespaces
AMetadataProviderimplementation 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 theManagedProviderfor 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 aManagedProvider. An example is semantics metadata provided by its own provider. Implementations are expected to return an immutableCollection. The default implementation returns an emptySet.- Returns:
- collection reserved namespaces
-