From d78ed90c9cdeadae60d0f327aed140b8f0adab3f Mon Sep 17 00:00:00 2001 From: "Jan N. Klug" Date: Mon, 28 Mar 2022 14:43:34 +0200 Subject: [PATCH] fix Signed-off-by: Jan N. Klug --- ...PersistenceServiceConfigurationRegistryImpl.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/internal/PersistenceServiceConfigurationRegistryImpl.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/internal/PersistenceServiceConfigurationRegistryImpl.java index 46234e8fec5..33c73570bf2 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/internal/PersistenceServiceConfigurationRegistryImpl.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/internal/PersistenceServiceConfigurationRegistryImpl.java @@ -21,10 +21,14 @@ import org.openhab.core.common.registry.AbstractRegistry; import org.openhab.core.common.registry.Provider; import org.openhab.core.persistence.registry.IdentifiablePersistenceServiceConfiguration; +import org.openhab.core.persistence.registry.ManagedPersistenceServiceConfigurationProvider; import org.openhab.core.persistence.registry.PersistenceServiceConfigurationProvider; import org.openhab.core.persistence.registry.PersistenceServiceConfigurationRegistry; import org.openhab.core.persistence.registry.PersistenceServiceConfigurationRegistryChangeListener; import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -105,4 +109,13 @@ public void addRegistryChangeListener(PersistenceServiceConfigurationRegistryCha public void removeRegistryChangeListener(PersistenceServiceConfigurationRegistryChangeListener listener) { registryChangeListeners.remove(listener); } + + @Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) + protected void setManagedProvider(ManagedPersistenceServiceConfigurationProvider provider) { + super.setManagedProvider(provider); + } + + protected void unsetManagedProvider(ManagedPersistenceServiceConfigurationProvider provider) { + super.unsetManagedProvider(provider); + } }