]> git.basschouten.com Git - openhab-addons.git/blob
a2362eb07955a7a2c463e8f1e0b5e7293ed14120
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.volvooncall.internal.handler;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
17 import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService;
18 import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
19 import org.osgi.service.component.annotations.Component;
20 import org.osgi.service.component.annotations.Reference;
21
22 /**
23  * Dynamic provider of state options for VehicleHandler.
24  *
25  * @author Gregory Moyer - Initial contribution
26  * @author GaĆ«l L'hopital - Copied as-is in VolvoOnCall binding
27  */
28 @Component(service = { DynamicStateDescriptionProvider.class, VehicleStateDescriptionProvider.class })
29 @NonNullByDefault
30 public class VehicleStateDescriptionProvider extends BaseDynamicStateDescriptionProvider {
31
32     @Reference
33     protected void setChannelTypeI18nLocalizationService(
34             final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
35         this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService;
36     }
37
38     protected void unsetChannelTypeI18nLocalizationService(
39             final ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) {
40         this.channelTypeI18nLocalizationService = null;
41     }
42 }