diff --git a/docs/diagrams/CheckCommand.puml b/docs/diagrams/CheckCommand.puml new file mode 100644 index 00000000000..336b08b33f5 --- /dev/null +++ b/docs/diagrams/CheckCommand.puml @@ -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 diff --git a/docs/diagrams/ReadCommand.puml b/docs/diagrams/ReadCommand.puml index c4262e3a335..0b937675baa 100644 --- a/docs/diagrams/ReadCommand.puml +++ b/docs/diagrams/ReadCommand.puml @@ -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 @@ -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 @@ -62,7 +62,7 @@ activate CommandResult CommandResult --> ReadCommand deactivate CommandResult -ReadCommand --> LogicManager : +ReadCommand --> LogicManager : c deactivate ReadCommand [<--LogicManager diff --git a/docs/images/CheckCommand.png b/docs/images/CheckCommand.png new file mode 100644 index 00000000000..6669b08c9ce Binary files /dev/null and b/docs/images/CheckCommand.png differ diff --git a/docs/images/ReadCommand.png b/docs/images/ReadCommand.png index 110426eb2a8..9756e0ea3b6 100644 Binary files a/docs/images/ReadCommand.png and b/docs/images/ReadCommand.png differ