rooms controller

This commit is contained in:
Lucas Pleß 2012-03-21 00:44:41 +01:00
parent 7dfb3f91a3
commit 64f90ce109
3 changed files with 14 additions and 1 deletions

View File

@ -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);
} }

View File

@ -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();

View File

@ -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