Skip to content

Commit

Permalink
Merge pull request #233 from NatLeong/update-readcheck-uml
Browse files Browse the repository at this point in the history
Update UML diagrams for read and check commands
  • Loading branch information
laney0808 authored Apr 12, 2024
2 parents 912e19c + 6b094ea commit 20b2dfe
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 4 deletions.
76 changes: 76 additions & 0 deletions docs/diagrams/CheckCommand.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":CheckCommandParser" as CheckCommandParser LOGIC_COLOR
participant "c:CheckCommand" as CheckCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("check T0123456A")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("check T0123456A")
activate AddressBookParser

create CheckCommandParser
AddressBookParser -> CheckCommandParser
activate CheckCommandParser

CheckCommandParser --> AddressBookParser
deactivate CheckCommandParser

AddressBookParser -> CheckCommandParser : parse("T0123456A")
activate CheckCommandParser

create CheckCommand
CheckCommandParser -> CheckCommand
activate CheckCommand

CheckCommand --> CheckCommandParser :
deactivate CheckCommand

CheckCommandParser --> AddressBookParser : c
deactivate CheckCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
CheckCommandParser -[hidden]-> AddressBookParser
destroy CheckCommandParser

AddressBookParser --> LogicManager : c
deactivate AddressBookParser

LogicManager -> CheckCommand : execute(m)
activate CheckCommand

CheckCommand -> Model : updateFilteredPersonList(new NricContainsKeywordsPredicate("T0123456A"));
activate Model

Model --> CheckCommand : getFilteredPersonList()
deactivate Model

CheckCommand -> Model : updateFilteredVisitList(new VisitContainsNricPredicate("T0123456A"));
activate Model

Model --> CheckCommand : getFilteredVisitList()
deactivate Model

create CommandResult
CheckCommand -> CommandResult
activate CommandResult

CommandResult --> CheckCommand
deactivate CommandResult

CheckCommand --> LogicManager : r
deactivate CheckCommand

[<--LogicManager
deactivate LogicManager
@enduml
8 changes: 4 additions & 4 deletions docs/diagrams/ReadCommand.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ReadCommandParser" as ReadCommandParser LOGIC_COLOR
participant "r:ReadCommand" as ReadCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
participant "c:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
Expand Down Expand Up @@ -49,10 +49,10 @@ deactivate AddressBookParser
LogicManager -> ReadCommand : execute(m)
activate ReadCommand

ReadCommand -> Model
ReadCommand -> Model : updateFilteredPersonList(new NricContainsKeywordsPredicate("T0123456A"));
activate Model

Model --> ReadCommand
Model --> ReadCommand : getFilteredPersonList()
deactivate Model

create CommandResult
Expand All @@ -62,7 +62,7 @@ activate CommandResult
CommandResult --> ReadCommand
deactivate CommandResult

ReadCommand --> LogicManager :
ReadCommand --> LogicManager : c
deactivate ReadCommand

[<--LogicManager
Expand Down
Binary file added docs/images/CheckCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ReadCommand.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 20b2dfe

Please sign in to comment.