@startuml
hidefootbox

skinparam sequence {
	ArrowColor SteelBlue
	LifeLineBorderColor MidnightBlue
	LifeLineBackgroundColor #A9DCDF

	ParticipantBorderColor Dimgray
	ParticipantBackgroundColor SteelBlue
	ParticipantFontName Calibri Bold
	ParticipantFontSize 17
	ParticipantFontColor Ivory

	ActorBackgroundColor SteelBlue
	ActorFontColor MidnightBlue
	ActorFontSize 17
	ActorFontName Aapex
}

skinparam note {
BorderColor SteelBlue
}


ClientHTTP -> ":RoomCTRL":  PUT/{id,rDTO}
create "rDTO:RoomDetailDTO"
":RoomCTRL" -> "rDTO:RoomDetailDTO": create()
create ":RoomService"
":RoomCTRL" -> ":RoomService": create()
":RoomCTRL" -> ":RoomService": editRoom=findById(id)
":RoomService" -> RoomRepository: room=findById(id)
":RoomService" -> RoomMapper: editRoom=toDetailDto(room)
create "editRoom:RoomDetailDTO"
RoomMapper -> "editRoom:RoomDetailDTO": create()
":RoomCTRL" -> "rDTO:RoomDetailDTO": newValue=get{attribute}
":RoomCTRL"  -> "editRoom:RoomDetailDTO": set{attribute}(newValue)

note left
{attribute} is:
description,
floor, length,
width and height
    end note
":RoomCTRL" -> ":RoomService": save(editRoom)
":RoomService" -> RoomMapper: room=toObject(editRoom)
RoomMapper -> "room:Room": set{attribute}(newValue)

":RoomService" -> RoomRepository: save(room)
create ResponseEntity
":RoomCTRL" -> ResponseEntity: create()

ClientHTTP <-- ":RoomCTRL": ResponseEntity=\neditRoom,HttpStatus.OK

@enduml