Class ProviderMetadataRegistryDelegate

java.lang.Object
org.openhab.core.automation.module.script.providersupport.shared.ProviderMetadataRegistryDelegate
All Implemented Interfaces:
ProviderRegistry, Registry<Metadata,MetadataKey>, MetadataRegistry

@NonNullByDefault public class ProviderMetadataRegistryDelegate extends Object implements MetadataRegistry, ProviderRegistry
The ProviderMetadataRegistryDelegate is wrapping a MetadataRegistry to provide a comfortable way to provide items from scripts without worrying about the need to remove metadata again when the script is unloaded. Nonetheless, using the addPermanent(Metadata) method it is still possible to add metadata permanently.

Use a new instance of this class for each ScriptEngine.

Author:
Florian Hotze - Initial contribution