package org.openhab.binding.homeconnect.internal.type;
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;
@NonNullByDefault
public class HomeConnectDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public HomeConnectDynamicStateDescriptionProvider(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;
- }
}
package org.openhab.binding.lgwebos.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;
@NonNullByDefault
public class LGWebOSStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public LGWebOSStateDescriptionOptionProvider(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;
- }
}
package org.openhab.binding.netatmo.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;
@NonNullByDefault
public class NATherm1StateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public NATherm1StateDescriptionProvider(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;
- }
}
*/
package org.openhab.binding.remoteopenhab.internal;
-import java.util.List;
-
import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.openhab.core.thing.ChannelUID;
+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.openhab.core.types.StateOption;
+import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
@NonNullByDefault
public class RemoteopenhabStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
- public @Nullable List<StateOption> getStateOptions(ChannelUID channelUID) {
- return channelOptionsMap.get(channelUID);
- }
-
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public RemoteopenhabStateDescriptionOptionProvider(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;
- }
}
package org.openhab.binding.rotel.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;
@NonNullByDefault
public class RotelStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public RotelStateDescriptionOptionProvider(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;
- }
}
*/
package org.openhab.binding.somfytahoma.internal;
-import java.util.List;
-
import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.openhab.core.thing.ChannelUID;
+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.openhab.core.types.StateOption;
+import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
@NonNullByDefault
public class SomfyTahomaStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
- public @Nullable List<StateOption> getStateOptions(ChannelUID channelUID) {
- return channelOptionsMap.get(channelUID);
- }
-
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public SomfyTahomaStateDescriptionOptionProvider(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;
- }
}
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
+import org.openhab.core.events.EventPublisher;
import org.openhab.core.thing.ChannelUID;
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.types.StateOption;
+import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
@NonNullByDefault
public class SonosStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
- public @Nullable List<StateOption> getStateOptions(ChannelUID channelUID) {
- return channelOptionsMap.get(channelUID);
- }
-
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public SonosStateDescriptionOptionProvider(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;
+ public @Nullable List<StateOption> getStateOptions(ChannelUID channelUID) {
+ return channelOptionsMap.get(channelUID);
}
}
package org.openhab.binding.sonyprojector.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;
@NonNullByDefault
public class SonyProjectorStateDescriptionOptionProvider extends BaseDynamicStateDescriptionProvider {
- @Reference
- protected void setChannelTypeI18nLocalizationService(
- final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
+ @Activate
+ public SonyProjectorStateDescriptionOptionProvider(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;
- }
}