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); + } }