File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
src/main/kotlin/application/controller Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments