rooms controller
This commit is contained in:
parent
7dfb3f91a3
commit
64f90ce109
|
@ -1,6 +1,7 @@
|
||||||
package de.ctdo.bunti.control;
|
package de.ctdo.bunti.control;
|
||||||
|
|
||||||
import de.ctdo.bunti.model.BuntiDevice;
|
import de.ctdo.bunti.model.BuntiDevice;
|
||||||
|
import de.ctdo.bunti.model.Room;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -12,4 +13,7 @@ public interface BuntiController {
|
||||||
|
|
||||||
boolean updateDeviceData(int deviceId, Map<String, Object> options);
|
boolean updateDeviceData(int deviceId, Map<String, Object> options);
|
||||||
|
|
||||||
|
Collection<Room> getAllRooms();
|
||||||
|
Room getRoomById(int roomId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,16 @@ public class BuntiControllerImpl implements BuntiController, ApplicationEventPub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<Room> getAllRooms() {
|
||||||
|
return roomsDAO.getRooms();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room getRoomById(int roomId) {
|
||||||
|
return roomsDAO.getRoom(roomId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<BuntiDevice> getAllDevices() {
|
public Collection<BuntiDevice> getAllDevices() {
|
||||||
return devicesDAO.getAllDevices();
|
return devicesDAO.getAllDevices();
|
||||||
|
|
|
@ -10,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Validator;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
|
Loading…
Reference in New Issue