2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.io.imperihome.internal.handler;
15 import javax.servlet.http.HttpServletRequest;
17 import org.openhab.io.imperihome.internal.model.RoomList;
18 import org.openhab.io.imperihome.internal.processor.DeviceRegistry;
21 * Rooms list request handler.
23 * @author Pepijn de Geus - Initial contribution
25 public class RoomListHandler {
27 private final DeviceRegistry deviceRegistry;
29 public RoomListHandler(DeviceRegistry deviceRegistry) {
30 this.deviceRegistry = deviceRegistry;
33 public RoomList handle(HttpServletRequest req) {
34 RoomList response = new RoomList();
35 response.setRooms(deviceRegistry.getRooms());