Fix ConfigurableService deprecations (#8526)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
c82f6c4e77
commit
1f7da6b669
|
@ -51,10 +51,8 @@ import io.github.hapjava.server.impl.HomekitServer;
|
||||||
* @author Andy Lintner - Initial contribution
|
* @author Andy Lintner - Initial contribution
|
||||||
*/
|
*/
|
||||||
@Component(immediate = true, service = { Homekit.class }, configurationPid = "org.openhab.homekit", property = {
|
@Component(immediate = true, service = { Homekit.class }, configurationPid = "org.openhab.homekit", property = {
|
||||||
Constants.SERVICE_PID + "=org.openhab.homekit",
|
Constants.SERVICE_PID + "=org.openhab.homekit", "port:Integer=9123" })
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=io:homekit",
|
@ConfigurableService(category = "io", label = "HomeKit Integration", description_uri = "io:homekit")
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=io",
|
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=HomeKit Integration", "port:Integer=9123" })
|
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class HomekitImpl implements Homekit {
|
public class HomekitImpl implements Homekit {
|
||||||
private final Logger logger = LoggerFactory.getLogger(HomekitImpl.class);
|
private final Logger logger = LoggerFactory.getLogger(HomekitImpl.class);
|
||||||
|
|
|
@ -27,9 +27,9 @@ import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
|
import org.openhab.core.common.ThreadPoolManager;
|
||||||
import org.openhab.core.config.core.ConfigurableService;
|
import org.openhab.core.config.core.ConfigurableService;
|
||||||
import org.openhab.core.config.core.Configuration;
|
import org.openhab.core.config.core.Configuration;
|
||||||
import org.openhab.core.common.ThreadPoolManager;
|
|
||||||
import org.openhab.core.items.Item;
|
import org.openhab.core.items.Item;
|
||||||
import org.openhab.core.items.Metadata;
|
import org.openhab.core.items.Metadata;
|
||||||
import org.openhab.core.items.MetadataKey;
|
import org.openhab.core.items.MetadataKey;
|
||||||
|
@ -72,10 +72,8 @@ import com.google.gson.GsonBuilder;
|
||||||
* @author David Graeff - Initial contribution
|
* @author David Graeff - Initial contribution
|
||||||
*/
|
*/
|
||||||
@Component(immediate = false, service = { ConfigStore.class }, configurationPid = {
|
@Component(immediate = false, service = { ConfigStore.class }, configurationPid = {
|
||||||
HueEmulationService.CONFIG_PID }, property = { "com.eclipsesource.jaxrs.publish=false",
|
HueEmulationService.CONFIG_PID }, property = "com.eclipsesource.jaxrs.publish=false")
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=io:hueemulation",
|
@ConfigurableService(category = "io", label = "Hue Emulation", description_uri = "io:hueemulation")
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=io",
|
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=Hue Emulation" })
|
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class ConfigStore {
|
public class ConfigStore {
|
||||||
|
|
||||||
|
|
|
@ -61,11 +61,9 @@ import com.google.gson.GsonBuilder;
|
||||||
*
|
*
|
||||||
* @author Pepijn de Geus - Initial contribution
|
* @author Pepijn de Geus - Initial contribution
|
||||||
*/
|
*/
|
||||||
@Component(immediate = true, service = HttpServlet.class, configurationPid = "org.openhab.imperihome", property = {
|
@Component(immediate = true, service = HttpServlet.class, configurationPid = "org.openhab.imperihome", //
|
||||||
Constants.SERVICE_PID + "=org.openhab.imperihome",
|
property = Constants.SERVICE_PID + "=org.openhab.imperihome")
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=io:imperihome",
|
@ConfigurableService(category = "io", label = "ImperiHome Integration", description_uri = "io:imperihome")
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=io",
|
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=ImperiHome Integration" })
|
|
||||||
public class ImperiHomeApiServlet extends HttpServlet {
|
public class ImperiHomeApiServlet extends HttpServlet {
|
||||||
|
|
||||||
private static final long serialVersionUID = -1966364789075448441L;
|
private static final long serialVersionUID = -1966364789075448441L;
|
||||||
|
|
|
@ -79,11 +79,9 @@ import io.netty.handler.ssl.SslContextBuilder;
|
||||||
*
|
*
|
||||||
* @author David Graeff - Initial contribution
|
* @author David Graeff - Initial contribution
|
||||||
*/
|
*/
|
||||||
@Component(immediate = true, service = EmbeddedBrokerService.class, configurationPid = "org.openhab.core.mqttembeddedbroker", property = {
|
@Component(immediate = true, service = EmbeddedBrokerService.class, configurationPid = "org.openhab.core.mqttembeddedbroker", //
|
||||||
org.osgi.framework.Constants.SERVICE_PID + "=org.openhab.core.mqttembeddedbroker",
|
property = org.osgi.framework.Constants.SERVICE_PID + "=org.openhab.core.mqttembeddedbroker")
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=mqtt:mqttembeddedbroker",
|
@ConfigurableService(category = "MQTT", label = "MQTT Embedded Broker", description_uri = "mqtt:mqttembeddedbroker")
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=MQTT",
|
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=MQTT Embedded Broker" })
|
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class EmbeddedBrokerService
|
public class EmbeddedBrokerService
|
||||||
implements MqttConnectionObserver, MqttServiceObserver, MqttEmbeddedBrokerStartedListener {
|
implements MqttConnectionObserver, MqttServiceObserver, MqttEmbeddedBrokerStartedListener {
|
||||||
|
|
|
@ -71,11 +71,9 @@ import org.slf4j.LoggerFactory;
|
||||||
* @author Kai Kreuzer - migrated code to new Jetty client and ESH APIs
|
* @author Kai Kreuzer - migrated code to new Jetty client and ESH APIs
|
||||||
*/
|
*/
|
||||||
@Component(immediate = true, service = { EventSubscriber.class,
|
@Component(immediate = true, service = { EventSubscriber.class,
|
||||||
ActionService.class }, configurationPid = "org.openhab.openhabcloud", property = {
|
ActionService.class }, configurationPid = "org.openhab.openhabcloud", property = Constants.SERVICE_PID
|
||||||
Constants.SERVICE_PID + "=org.openhab.openhabcloud",
|
+ "=org.openhab.openhabcloud")
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=io:openhabcloud",
|
@ConfigurableService(category = "io", label = "openHAB Cloud", description_uri = "io:openhabcloud")
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=openHAB Cloud",
|
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=io" })
|
|
||||||
public class CloudService implements ActionService, CloudClientListener, EventSubscriber {
|
public class CloudService implements ActionService, CloudClientListener, EventSubscriber {
|
||||||
|
|
||||||
private static final String CFG_EXPOSE = "expose";
|
private static final String CFG_EXPOSE = "expose";
|
||||||
|
|
|
@ -46,10 +46,9 @@ import org.slf4j.LoggerFactory;
|
||||||
*
|
*
|
||||||
* @author Robert Hillman - Initial contribution
|
* @author Robert Hillman - Initial contribution
|
||||||
*/
|
*/
|
||||||
@Component(configurationPid = SERVICE_PID, property = { Constants.SERVICE_PID + "=" + SERVICE_PID,
|
@Component(configurationPid = SERVICE_PID, property = Constants.SERVICE_PID + "=" + SERVICE_PID)
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=" + SERVICE_NAME + " Text-to-Speech",
|
@ConfigurableService(category = SERVICE_CATEGORY, label = SERVICE_NAME
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=" + SERVICE_CATEGORY + ":" + SERVICE_ID,
|
+ " Text-to-Speech", description_uri = SERVICE_CATEGORY + ":" + SERVICE_ID)
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=" + SERVICE_CATEGORY })
|
|
||||||
public class PollyTTSService implements TTSService {
|
public class PollyTTSService implements TTSService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -41,10 +41,8 @@ import org.slf4j.LoggerFactory;
|
||||||
* @author Jochen Hiller - Initial contribution and API
|
* @author Jochen Hiller - Initial contribution and API
|
||||||
* @author Laurent Garnier - add support for OGG and AAC audio formats
|
* @author Laurent Garnier - add support for OGG and AAC audio formats
|
||||||
*/
|
*/
|
||||||
@Component(configurationPid = "org.openhab.voicerss", property = { Constants.SERVICE_PID + "=org.openhab.voicerss",
|
@Component(configurationPid = "org.openhab.voicerss", property = Constants.SERVICE_PID + "=org.openhab.voicerss")
|
||||||
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=voice:voicerss",
|
@ConfigurableService(category = "voice", label = "VoiceRSS Text-to-Speech", description_uri = "voice:voicerss")
|
||||||
ConfigurableService.SERVICE_PROPERTY_LABEL + "=VoiceRSS Text-to-Speech",
|
|
||||||
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=voice" })
|
|
||||||
public class VoiceRSSTTSService implements TTSService {
|
public class VoiceRSSTTSService implements TTSService {
|
||||||
|
|
||||||
/** Cache folder name is below userdata/voicerss/cache. */
|
/** Cache folder name is below userdata/voicerss/cache. */
|
||||||
|
|
Loading…
Reference in New Issue