diff --git a/bundles/org.openhab.core/META-INF/MANIFEST.MF b/bundles/org.openhab.core/META-INF/MANIFEST.MF index d23b300c8..73ddbc8b2 100644 --- a/bundles/org.openhab.core/META-INF/MANIFEST.MF +++ b/bundles/org.openhab.core/META-INF/MANIFEST.MF @@ -32,7 +32,6 @@ Import-Package: com.google.common.cache;version="10.0.1", org.eclipse.smarthome.core.items, org.eclipse.smarthome.core.thing, org.eclipse.smarthome.core.thing.link, - org.eclipse.smarthome.core.thing.setup, org.eclipse.smarthome.core.thing.type, org.eclipse.smarthome.core.types, org.eclipse.smarthome.model.core, diff --git a/bundles/org.openhab.core/OSGI-INF/autoapprove.xml b/bundles/org.openhab.core/OSGI-INF/autoapprove.xml index 7c5c52f1e..9bbc37742 100644 --- a/bundles/org.openhab.core/OSGI-INF/autoapprove.xml +++ b/bundles/org.openhab.core/OSGI-INF/autoapprove.xml @@ -13,5 +13,4 @@ - diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/inbox/AutoApproveService.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/inbox/AutoApproveService.java index b1f8b6f2e..6a6b336b8 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/inbox/AutoApproveService.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/inbox/AutoApproveService.java @@ -8,15 +8,12 @@ */ package org.openhab.core.internal.inbox; -import java.util.HashMap; import java.util.Map; -import org.eclipse.smarthome.config.core.Configuration; import org.eclipse.smarthome.config.discovery.DiscoveryResult; import org.eclipse.smarthome.config.discovery.DiscoveryResultFlag; import org.eclipse.smarthome.config.discovery.inbox.Inbox; import org.eclipse.smarthome.config.discovery.inbox.InboxListener; -import org.eclipse.smarthome.core.thing.setup.ThingSetupManager; import org.osgi.service.cm.ConfigurationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,8 +31,6 @@ public class AutoApproveService implements InboxListener { final static private Logger logger = LoggerFactory.getLogger(AutoApproveService.class); - private ThingSetupManager thingSetupManager; - private Inbox inbox; protected void activate(Map configProps) throws ConfigurationException { @@ -64,11 +59,7 @@ public class AutoApproveService implements InboxListener { @Override public void thingAdded(Inbox source, DiscoveryResult result) { logger.debug("Approving inbox entry '{}'", result.toString()); - Map props = new HashMap<>(result.getProperties()); - - Configuration conf = new Configuration(props); - - thingSetupManager.addThing(result.getThingUID(), conf, result.getBridgeUID(), result.getLabel()); + inbox.approve(result.getThingUID(), result.getLabel()); } @Override @@ -88,12 +79,4 @@ public class AutoApproveService implements InboxListener { this.inbox = null; } - protected void setThingSetupManager(ThingSetupManager thingSetupManager) { - this.thingSetupManager = thingSetupManager; - } - - protected void unsetThingSetupManager(ThingSetupManager thingSetupManager) { - this.thingSetupManager = null; - } - }