Skip to content

Commit

Permalink
Add another update command sequence diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-setyawan committed Apr 15, 2024
1 parent ac3cccc commit 60fc3bb
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
94 changes: 94 additions & 0 deletions docs/diagrams/UpdateModelDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain
box Logic LOGIC_COLOR_T1
participant "l:Logic" as CreateCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":ModelManager" as ModelManager MODEL_COLOR
participant ":ImmuniMate" as ImmuniMate MODEL_COLOR
participant ":UniquePersonList" as UniquePersonList MODEL_COLOR
participant "internalList: ObservableList<Person>" as internalList MODEL_COLOR
participant "p:Person" as p MODEL_COLOR
end box

[-> CreateCommand : execute()
activate CreateCommand

CreateCommand -> ModelManager : getFilteredPersonList()
activate ModelManager

ModelManager --> CreateCommand : filteredPersons
deactivate ModelManager

CreateCommand -> ModelManager : hasPerson(p)
activate ModelManager

ModelManager -> ImmuniMate: hasPerson(p)
activate ImmuniMate

ImmuniMate --> UniquePersonList : contains(p)
activate UniquePersonList

UniquePersonList -> internalList : stream().anyMatch(p::isSamePerson)
activate internalList

internalList -> p : isSamePerson(p)
activate p

p --> internalList : true
deactivate p

internalList --> UniquePersonList : true
deactivate internalList

UniquePersonList --> ImmuniMate : true
deactivate UniquePersonList

ImmuniMate --> ModelManager : true
deactivate ImmuniMate

ModelManager --> CreateCommand : true
deactivate ModelManager

CreateCommand -> ModelManager : setPerson(p, u)
activate ModelManager

ModelManager -> ImmuniMate: setPerson(p, u)
activate ImmuniMate

ImmuniMate -> UniquePersonList : setPerson(p, u)
activate UniquePersonList

UniquePersonList -> internalList : indexOf(p)
activate internalList

internalList --> UniquePersonList : index
deactivate internalList

UniquePersonList -> internalList : set(index, u)
activate internalList

internalList --> UniquePersonList
deactivate internalList

UniquePersonList --> ImmuniMate
deactivate UniquePersonList

ImmuniMate --> ModelManager
deactivate ImmuniMate

ModelManager --> CreateCommand
deactivate ModelManager

CreateCommand -> ModelManager : updateFilteredPersonList()
activate ModelManager

ModelManager --> CreateCommand
deactivate ModelManager

[<--CreateCommand
deactivate CreateCommand

@enduml

0 comments on commit 60fc3bb

Please sign in to comment.