Skip to content

Commit 3513dad

Browse files
authored
Fix ConfigurableService deprecations (openhab#262)
Related to: openhab/openhab-core#1491 Signed-off-by: Wouter Born <[email protected]>
1 parent 4d6a11f commit 3513dad

File tree

2 files changed

+10
-11
lines changed
  • bundles
    • org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet
    • org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/servlet

2 files changed

+10
-11
lines changed

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/WebAppServlet.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,18 @@
6060
* @author Vlad Ivanov - Basic UI changes
6161
*
6262
*/
63-
@Component(immediate = true, service = Servlet.class, configurationPid = "org.openhab.basicui", property = { //
64-
Constants.SERVICE_PID + "=org.openhab.basicui", //
65-
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=ui:basic", //
66-
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=ui", //
67-
ConfigurableService.SERVICE_PROPERTY_LABEL + "=Basic UI" //
68-
})
63+
@Component(immediate = true, service = Servlet.class, configurationPid = "org.openhab.basicui", //
64+
property = Constants.SERVICE_PID + "=org.openhab.basicui")
65+
@ConfigurableService(category = "ui", label = "Basic UI", description_uri = WebAppServlet.CONFIG_URI)
6966
@NonNullByDefault
7067
public class WebAppServlet extends BaseServlet {
7168

7269
private final Logger logger = LoggerFactory.getLogger(WebAppServlet.class);
7370

7471
private static final long serialVersionUID = 3443749654545136365L;
7572

73+
protected static final String CONFIG_URI = "ui:basic";
74+
7675
/** the name of the servlet to be used in the URL */
7776
public static final String SERVLET_NAME = "app";
7877

bundles/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/servlet/CometVisuApp.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555
*
5656
* @author Tobias Bräutigam - Initial contribution
5757
*/
58-
@Component(immediate = true, service = CometVisuApp.class, configurationPid = "org.openhab.cometvisu", property = {
59-
Constants.SERVICE_PID + "=org.openhab.cometvisu",
60-
ConfigurableService.SERVICE_PROPERTY_DESCRIPTION_URI + "=ui:cometvisu",
61-
ConfigurableService.SERVICE_PROPERTY_CATEGORY + "=ui",
62-
ConfigurableService.SERVICE_PROPERTY_LABEL + "=CometVisu" })
58+
@Component(immediate = true, service = CometVisuApp.class, configurationPid = "org.openhab.cometvisu", //
59+
property = Constants.SERVICE_PID + "=org.openhab.cometvisu")
60+
@ConfigurableService(category = "ui", label = "CometVisu", description_uri = CometVisuApp.CONFIG_URI)
6361
public class CometVisuApp {
6462

6563
private final Logger logger = LoggerFactory.getLogger(CometVisuApp.class);
6664

65+
protected static final String CONFIG_URI = "ui:cometvisu";
66+
6767
protected HttpService httpService;
6868

6969
private ItemUIRegistry itemUIRegistry;

0 commit comments

Comments
 (0)