forked from nus-cs2103-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sequence diagram for find command
- Loading branch information
tanwartushar
committed
Nov 7, 2024
1 parent
c71ac13
commit a7ca717
Showing
2 changed files
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box LOGIC_COLOR_T1 | ||
participant ":FindCommand" as FindCommand LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as ModelManager MODEL_COLOR | ||
end box | ||
|
||
participant "filteredArchivedPersons:FilteredList" LOGIC_COLOR | ||
participant "filteredPersons:FilteredList" LOGIC_COLOR | ||
|
||
[-> FindCommand : execute() | ||
activate FindCommand | ||
|
||
FindCommand -> ModelManager : getIsArchivedList() | ||
activate ModelManager | ||
ModelManager --> FindCommand : isArchivedList | ||
deactivate ModelManager | ||
|
||
alt isArchivedList | ||
FindCommand -> FindCommand : throw CommandException("MESSAGE_NOT_IN_MAIN_LIST") | ||
else else | ||
FindCommand -> ModelManager : updateFilteredPersonList(predicate) | ||
activate ModelManager | ||
|
||
alt isArchivedList | ||
ModelManager -> "filteredArchivedPersons:FilteredList" : setPredicate(predicate) | ||
activate "filteredArchivedPersons:FilteredList" | ||
"filteredArchivedPersons:FilteredList" --> ModelManager | ||
deactivate "filteredArchivedPersons:FilteredList" | ||
else else | ||
ModelManager -> "filteredPersons:FilteredList" : setPredicate(predicate) | ||
activate "filteredPersons:FilteredList" | ||
"filteredPersons:FilteredList" --> ModelManager | ||
deactivate "filteredPersons:FilteredList" | ||
end alt | ||
|
||
ModelManager --> FindCommand | ||
deactivate ModelManager | ||
|
||
end alt | ||
|
||
<-- FindCommand : CommandResult | ||
deactivate FindCommand | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.