// PROGRAMA INTERFACE GRAFICA public void deleteRoom(int chosseRoom) { downloadData(); historic = HistoricFactory.getInstance(); RoomData currentRoom = mapRoomData.get(chosseRoom); System.out.println("\nExcluida a sala e todas as suas sessoes"); mapRoomData.remove(currentRoom.getIdRoom()); mapSessionData.remove(currentRoom.getIdRoom()); historic.AddHistoric(currentRoom, "DELETED"); uploadData(); }
/** Cria uma sala */ public void createRoom(Integer fileiras, Integer colunas) { downloadData(); historic = HistoricFactory.getInstance(); Integer rows = fileiras; Integer columns = colunas; Integer idRoom = idRoom(); RoomData newRoomData = new RoomData(idRoom, rows, columns); mapRoomData.put(idRoom, newRoomData); historic.AddHistoric(newRoomData, "CREATED"); uploadData(); System.out.println("Sala criada"); }