Skip to content

Commit

Permalink
Add sequence diagram for find command
Browse files Browse the repository at this point in the history
  • Loading branch information
tanwartushar committed Nov 7, 2024
1 parent c71ac13 commit a7ca717
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/diagrams/FindSequenceDiagram.puml
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
Binary file added docs/images/FindSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a7ca717

Please sign in to comment.