]> git.basschouten.com Git - openhab-addons.git/blob
ea587314d2b3ddc44a169dc84116e76b120925ed
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.io.imperihome.internal.handler;
14
15 import javax.servlet.http.HttpServletRequest;
16
17 import org.openhab.io.imperihome.internal.ImperiHomeConfig;
18 import org.openhab.io.imperihome.internal.model.System;
19
20 /**
21  * System data request handler.
22  *
23  * @author Pepijn de Geus - Initial contribution
24  */
25 public class SystemHandler {
26
27     private ImperiHomeConfig config;
28
29     public SystemHandler(ImperiHomeConfig imperiHomeConfig) {
30         config = imperiHomeConfig;
31     }
32
33     public System handle(HttpServletRequest req) {
34         System system = new System();
35         system.setId(config.getSystemId());
36         system.setApiVersion(1);
37         return system;
38     }
39 }