From a04f3310111c1abf59e8ce95081c274635a85dbf Mon Sep 17 00:00:00 2001 From: Christoph Weitkamp Date: Mon, 21 Jun 2021 21:14:37 +0200 Subject: [PATCH] Added service references to DynamicCommandDescriptionProvider to support publishing ChannelDescriptionChangedEvent (#10716) Signed-off-by: Christoph Weitkamp --- .../AVMFritzDynamicCommandDescriptionProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/AVMFritzDynamicCommandDescriptionProvider.java b/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/AVMFritzDynamicCommandDescriptionProvider.java index 849de901970..5bf637f6e4f 100644 --- a/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/AVMFritzDynamicCommandDescriptionProvider.java +++ b/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/AVMFritzDynamicCommandDescriptionProvider.java @@ -13,8 +13,10 @@ package org.openhab.binding.avmfritz.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicCommandDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicCommandDescriptionProvider; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; @@ -30,8 +32,11 @@ import org.osgi.service.component.annotations.Reference; public class AVMFritzDynamicCommandDescriptionProvider extends BaseDynamicCommandDescriptionProvider { @Activate - public AVMFritzDynamicCommandDescriptionProvider( + public AVMFritzDynamicCommandDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } }