Skip to content

Commit 01754ec

Browse files
chore: add room controller
1 parent e0a8fd8 commit 01754ec

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package application.controller
10+
11+
import application.controller.manager.RoomDigitalTwinManager
12+
import entity.zone.Room
13+
import entity.zone.RoomID
14+
import usecase.repository.RoomRepository
15+
import java.util.Date
16+
17+
/**
18+
* Implementation of room repository that handle the application logic
19+
* using both db and digital twin.
20+
* @param[roomDtManager] the digital twin manager of rooms.
21+
*/
22+
class RoomController(private val roomDtManager: RoomDigitalTwinManager) : RoomRepository {
23+
override fun createRoom(room: Room): Room? =
24+
if (this.roomDtManager.createRoomDigitalTwin(room)) room else null
25+
26+
override fun deleteRoom(roomId: RoomID): Boolean {
27+
TODO("Not yet implemented")
28+
}
29+
30+
override fun findBy(roomId: RoomID, dateTime: Date): Room? {
31+
TODO("Not yet implemented")
32+
}
33+
34+
override fun getRooms(): Set<Room> {
35+
TODO("Not yet implemented")
36+
}
37+
}

0 commit comments

Comments
 (0)