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.
Update DG for read and check command
- Loading branch information
NatLeong
committed
Apr 13, 2024
1 parent
5dce7fa
commit 061866e
Showing
11 changed files
with
200 additions
and
7 deletions.
There are no files selected for viewing
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
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,65 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "l:Logic" as CheckCommand 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 | ||
|
||
[-> CheckCommand : execute() | ||
activate CheckCommand | ||
|
||
CheckCommand -> 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 | ||
deactivate p | ||
|
||
internalList --> UniquePersonList | ||
deactivate internalList | ||
|
||
UniquePersonList --> ImmuniMate | ||
deactivate UniquePersonList | ||
|
||
ImmuniMate --> ModelManager | ||
deactivate ImmuniMate | ||
|
||
ModelManager --> CheckCommand | ||
deactivate ModelManager | ||
|
||
CheckCommand -> ModelManager : updateFilteredPersonList(predicate) | ||
activate ModelManager | ||
|
||
ModelManager --> CheckCommand | ||
deactivate ModelManager | ||
|
||
CheckCommand -> ModelManager : updateFilteredVisitList(predicate) | ||
activate ModelManager | ||
|
||
ModelManager --> CheckCommand | ||
deactivate ModelManager | ||
|
||
[<--CheckCommand | ||
deactivate CheckCommand | ||
|
||
@enduml |
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
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,59 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "l:Logic" as ReadCommand 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 | ||
|
||
[-> ReadCommand : execute() | ||
activate ReadCommand | ||
|
||
ReadCommand -> 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 | ||
deactivate p | ||
|
||
internalList --> UniquePersonList | ||
deactivate internalList | ||
|
||
UniquePersonList --> ImmuniMate | ||
deactivate UniquePersonList | ||
|
||
ImmuniMate --> ModelManager | ||
deactivate ImmuniMate | ||
|
||
ModelManager --> ReadCommand | ||
deactivate ModelManager | ||
|
||
ReadCommand -> ModelManager : updateFilteredPersonList(predicate) | ||
activate ModelManager | ||
|
||
ModelManager --> ReadCommand | ||
deactivate ModelManager | ||
|
||
[<--ReadCommand | ||
deactivate ReadCommand | ||
|
||
@enduml |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.