forked from AY2324S2-CS2103T-T08-1/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add another update command sequence diagram
- Loading branch information
1 parent
ac3cccc
commit 60fc3bb
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |