Added support for publishing ChannelDescriptionChangedEvents (#10896)

Pack 2

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2021-06-22 10:38:15 +02:00 committed by GitHub
parent 48e13858a9
commit cba49df16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 110 additions and 54 deletions

View File

@ -13,9 +13,12 @@
package org.openhab.binding.bmwconnecteddrive.internal.handler; package org.openhab.binding.bmwconnecteddrive.internal.handler;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; 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.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
@ -28,14 +31,12 @@ import org.osgi.service.component.annotations.Reference;
@NonNullByDefault @NonNullByDefault
public class BMWConnectedDriveOptionProvider extends BaseDynamicStateDescriptionProvider { public class BMWConnectedDriveOptionProvider extends BaseDynamicStateDescriptionProvider {
@Reference @Activate
protected void setChannelTypeI18nLocalizationService( public BMWConnectedDriveOptionProvider(final @Reference EventPublisher eventPublisher, //
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
protected void unsetChannelTypeI18nLocalizationService(
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.channelTypeI18nLocalizationService = null;
}
} }

View File

@ -13,9 +13,14 @@
package org.openhab.binding.intesis.internal; package org.openhab.binding.intesis.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; 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.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.Component;
import org.osgi.service.component.annotations.Reference;
/** /**
* *
@ -25,4 +30,12 @@ import org.osgi.service.component.annotations.Component;
@NonNullByDefault @NonNullByDefault
public class IntesisDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { public class IntesisDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
@Activate
public IntesisDynamicStateDescriptionProvider(final @Reference EventPublisher eventPublisher, //
final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
}
} }

View File

@ -13,8 +13,10 @@
package org.openhab.binding.ipcamera.internal; package org.openhab.binding.ipcamera.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
@ -29,9 +31,13 @@ import org.osgi.service.component.annotations.Reference;
@Component(service = { DynamicStateDescriptionProvider.class, IpCameraDynamicStateDescriptionProvider.class }) @Component(service = { DynamicStateDescriptionProvider.class, IpCameraDynamicStateDescriptionProvider.class })
@NonNullByDefault @NonNullByDefault
public class IpCameraDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { public class IpCameraDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
@Activate @Activate
public IpCameraDynamicStateDescriptionProvider( public IpCameraDynamicStateDescriptionProvider(final @Reference EventPublisher eventPublisher, //
final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
} }

View File

@ -13,9 +13,12 @@
package org.openhab.binding.lametrictime.internal; package org.openhab.binding.lametrictime.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; 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.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
@ -28,14 +31,12 @@ import org.osgi.service.component.annotations.Reference;
@NonNullByDefault @NonNullByDefault
public class StateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider { public class StateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider {
@Reference @Activate
protected void setChannelTypeI18nLocalizationService( public StateDescriptionOptionsProvider(final @Reference EventPublisher eventPublisher, //
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
protected void unsetChannelTypeI18nLocalizationService(
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.channelTypeI18nLocalizationService = null;
}
} }

View File

@ -13,9 +13,12 @@
package org.openhab.binding.resol.internal; package org.openhab.binding.resol.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; 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.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
@ -27,14 +30,13 @@ import org.osgi.service.component.annotations.Reference;
@Component(service = { DynamicStateDescriptionProvider.class, ResolStateDescriptionOptionProvider.class }) @Component(service = { DynamicStateDescriptionProvider.class, ResolStateDescriptionOptionProvider.class })
@NonNullByDefault @NonNullByDefault
public class ResolStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider { public class ResolStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
@Reference
protected void setChannelTypeI18nLocalizationService( @Activate
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { public ResolStateDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, //
final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
protected void unsetChannelTypeI18nLocalizationService(
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.channelTypeI18nLocalizationService = null;
}
} }

View File

@ -13,9 +13,12 @@
package org.openhab.binding.roku.internal; package org.openhab.binding.roku.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; 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.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
@ -28,14 +31,12 @@ import org.osgi.service.component.annotations.Reference;
@NonNullByDefault @NonNullByDefault
public class RokuStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider { public class RokuStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
@Reference @Activate
protected void setChannelTypeI18nLocalizationService( public RokuStateDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, //
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
protected void unsetChannelTypeI18nLocalizationService(
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.channelTypeI18nLocalizationService = null;
}
} }

View File

@ -13,9 +13,14 @@
package org.openhab.binding.sagercaster.internal; package org.openhab.binding.sagercaster.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; 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.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.Component;
import org.osgi.service.component.annotations.Reference;
/** /**
* Dynamic provider of state options for WindDirections. * Dynamic provider of state options for WindDirections.
@ -25,4 +30,13 @@ import org.osgi.service.component.annotations.Component;
@NonNullByDefault @NonNullByDefault
@Component(service = { DynamicStateDescriptionProvider.class, WindDirectionStateDescriptionProvider.class }) @Component(service = { DynamicStateDescriptionProvider.class, WindDirectionStateDescriptionProvider.class })
public class WindDirectionStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { public class WindDirectionStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
@Activate
public WindDirectionStateDescriptionProvider(final @Reference EventPublisher eventPublisher, //
final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
}
} }

View File

@ -13,9 +13,12 @@
package org.openhab.binding.somfymylink.internal.handler; package org.openhab.binding.somfymylink.internal.handler;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; 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.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
@ -29,14 +32,12 @@ import org.osgi.service.component.annotations.Reference;
@NonNullByDefault @NonNullByDefault
public class SomfyMyLinkStateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider { public class SomfyMyLinkStateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider {
@Reference @Activate
protected void setChannelTypeI18nLocalizationService( public SomfyMyLinkStateDescriptionOptionsProvider(final @Reference EventPublisher eventPublisher, //
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
protected void unsetChannelTypeI18nLocalizationService(
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.channelTypeI18nLocalizationService = null;
}
} }

View File

@ -13,8 +13,10 @@
package org.openhab.binding.squeezebox.internal; package org.openhab.binding.squeezebox.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
@ -31,8 +33,11 @@ import org.osgi.service.component.annotations.Reference;
public class SqueezeBoxStateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider { public class SqueezeBoxStateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider {
@Activate @Activate
public SqueezeBoxStateDescriptionOptionsProvider( public SqueezeBoxStateDescriptionOptionsProvider(final @Reference EventPublisher eventPublisher, //
@Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
} }

View File

@ -13,9 +13,12 @@
package org.openhab.binding.volvooncall.internal.handler; package org.openhab.binding.volvooncall.internal.handler;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; 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.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
@ -29,14 +32,12 @@ import org.osgi.service.component.annotations.Reference;
@NonNullByDefault @NonNullByDefault
public class VehicleStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { public class VehicleStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
@Reference @Activate
protected void setChannelTypeI18nLocalizationService( public VehicleStateDescriptionProvider(final @Reference EventPublisher eventPublisher, //
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
protected void unsetChannelTypeI18nLocalizationService(
final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.channelTypeI18nLocalizationService = null;
}
} }

View File

@ -13,8 +13,10 @@
package org.openhab.binding.wled.internal; package org.openhab.binding.wled.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
@ -29,9 +31,13 @@ import org.osgi.service.component.annotations.Reference;
@Component(service = { DynamicStateDescriptionProvider.class, WledDynamicStateDescriptionProvider.class }) @Component(service = { DynamicStateDescriptionProvider.class, WledDynamicStateDescriptionProvider.class })
@NonNullByDefault @NonNullByDefault
public class WledDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { public class WledDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
@Activate @Activate
public WledDynamicStateDescriptionProvider( public WledDynamicStateDescriptionProvider(final @Reference EventPublisher eventPublisher, //
final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
} }

View File

@ -13,8 +13,10 @@
package org.openhab.binding.zoneminder.internal; package org.openhab.binding.zoneminder.internal;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
import org.openhab.core.thing.type.DynamicStateDescriptionProvider; import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
@ -31,8 +33,11 @@ import org.osgi.service.component.annotations.Reference;
public class ZmStateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider { public class ZmStateDescriptionOptionsProvider extends BaseDynamicStateDescriptionProvider {
@Activate @Activate
public ZmStateDescriptionOptionsProvider( public ZmStateDescriptionOptionsProvider(final @Reference EventPublisher eventPublisher, //
@Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, //
final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
this.eventPublisher = eventPublisher;
this.itemChannelLinkRegistry = itemChannelLinkRegistry;
this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
} }
} }