diff --git a/bundles/org.openhab.binding.bosesoundtouch/src/main/java/org/openhab/binding/bosesoundtouch/internal/BoseStateDescriptionOptionProvider.java b/bundles/org.openhab.binding.bosesoundtouch/src/main/java/org/openhab/binding/bosesoundtouch/internal/BoseStateDescriptionOptionProvider.java index f30f523f64c41..da42f5e988e85 100644 --- a/bundles/org.openhab.binding.bosesoundtouch/src/main/java/org/openhab/binding/bosesoundtouch/internal/BoseStateDescriptionOptionProvider.java +++ b/bundles/org.openhab.binding.bosesoundtouch/src/main/java/org/openhab/binding/bosesoundtouch/internal/BoseStateDescriptionOptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.bosesoundtouch.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -28,14 +31,12 @@ @NonNullByDefault public class BoseStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + @Activate + public BoseStateDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } - - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; - } } diff --git a/bundles/org.openhab.binding.daikin/src/main/java/org/openhab/binding/daikin/internal/DaikinDynamicStateDescriptionProvider.java b/bundles/org.openhab.binding.daikin/src/main/java/org/openhab/binding/daikin/internal/DaikinDynamicStateDescriptionProvider.java index d7573f1bf3c44..21d26e1d93948 100644 --- a/bundles/org.openhab.binding.daikin/src/main/java/org/openhab/binding/daikin/internal/DaikinDynamicStateDescriptionProvider.java +++ b/bundles/org.openhab.binding.daikin/src/main/java/org/openhab/binding/daikin/internal/DaikinDynamicStateDescriptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.daikin.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -28,14 +31,12 @@ @NonNullByDefault public class DaikinDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + @Activate + public DaikinDynamicStateDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } - - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; - } } diff --git a/bundles/org.openhab.binding.hyperion/src/main/java/org/openhab/binding/hyperion/internal/HyperionStateDescriptionProvider.java b/bundles/org.openhab.binding.hyperion/src/main/java/org/openhab/binding/hyperion/internal/HyperionStateDescriptionProvider.java index 15955446e0b14..1346851935d39 100644 --- a/bundles/org.openhab.binding.hyperion/src/main/java/org/openhab/binding/hyperion/internal/HyperionStateDescriptionProvider.java +++ b/bundles/org.openhab.binding.hyperion/src/main/java/org/openhab/binding/hyperion/internal/HyperionStateDescriptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.hyperion.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -30,14 +33,12 @@ @NonNullByDefault public class HyperionStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + @Activate + public HyperionStateDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } - - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; - } } diff --git a/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/MonopriceAudioStateDescriptionOptionProvider.java b/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/MonopriceAudioStateDescriptionOptionProvider.java index c256e4cd5ec01..e8d64a941ea7e 100644 --- a/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/MonopriceAudioStateDescriptionOptionProvider.java +++ b/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/MonopriceAudioStateDescriptionOptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.monopriceaudio.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -28,14 +31,12 @@ @NonNullByDefault public class MonopriceAudioStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + @Activate + public MonopriceAudioStateDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } - - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; - } } diff --git a/bundles/org.openhab.binding.nuvo/src/main/java/org/openhab/binding/nuvo/internal/NuvoStateDescriptionOptionProvider.java b/bundles/org.openhab.binding.nuvo/src/main/java/org/openhab/binding/nuvo/internal/NuvoStateDescriptionOptionProvider.java index af1071a534a3f..930531483a942 100644 --- a/bundles/org.openhab.binding.nuvo/src/main/java/org/openhab/binding/nuvo/internal/NuvoStateDescriptionOptionProvider.java +++ b/bundles/org.openhab.binding.nuvo/src/main/java/org/openhab/binding/nuvo/internal/NuvoStateDescriptionOptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.nuvo.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -28,14 +31,12 @@ @NonNullByDefault public class NuvoStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + @Activate + public NuvoStateDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } - - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; - } } diff --git a/bundles/org.openhab.binding.oppo/src/main/java/org/openhab/binding/oppo/internal/OppoStateDescriptionOptionProvider.java b/bundles/org.openhab.binding.oppo/src/main/java/org/openhab/binding/oppo/internal/OppoStateDescriptionOptionProvider.java index 9973b1a0f9d07..fc1a5cd1db153 100644 --- a/bundles/org.openhab.binding.oppo/src/main/java/org/openhab/binding/oppo/internal/OppoStateDescriptionOptionProvider.java +++ b/bundles/org.openhab.binding.oppo/src/main/java/org/openhab/binding/oppo/internal/OppoStateDescriptionOptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.oppo.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -28,14 +31,12 @@ @NonNullByDefault public class OppoStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + @Activate + public OppoStateDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } - - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; - } } diff --git a/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/InputChannelStateDescriptionProvider.java b/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/InputChannelStateDescriptionProvider.java index 4c7d09d00850a..cf578755c89c5 100644 --- a/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/InputChannelStateDescriptionProvider.java +++ b/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/InputChannelStateDescriptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.pjlinkdevice.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -27,14 +30,13 @@ @Component(service = { DynamicStateDescriptionProvider.class, InputChannelStateDescriptionProvider.class }) @NonNullByDefault public class InputChannelStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; - } - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; + @Activate + public InputChannelStateDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; + this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } } diff --git a/bundles/org.openhab.binding.radiothermostat/src/main/java/org/openhab/binding/radiothermostat/internal/RadioThermostatStateDescriptionProvider.java b/bundles/org.openhab.binding.radiothermostat/src/main/java/org/openhab/binding/radiothermostat/internal/RadioThermostatStateDescriptionProvider.java index 659ec8b56a85b..1c4bec1e99e3d 100644 --- a/bundles/org.openhab.binding.radiothermostat/src/main/java/org/openhab/binding/radiothermostat/internal/RadioThermostatStateDescriptionProvider.java +++ b/bundles/org.openhab.binding.radiothermostat/src/main/java/org/openhab/binding/radiothermostat/internal/RadioThermostatStateDescriptionProvider.java @@ -13,9 +13,12 @@ package org.openhab.binding.radiothermostat.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -29,14 +32,13 @@ @Component(service = { DynamicStateDescriptionProvider.class, RadioThermostatStateDescriptionProvider.class }) @NonNullByDefault public class RadioThermostatStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { - @Reference - protected void setChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; - } - protected void unsetChannelTypeI18nLocalizationService( - final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { - this.channelTypeI18nLocalizationService = null; + @Activate + public RadioThermostatStateDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; + this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } }