From f20f7b0ae4d98596588b967be4480a376ed2e00b Mon Sep 17 00:00:00 2001 From: nixonwidjaja Date: Fri, 10 Nov 2023 21:48:34 +0800 Subject: [PATCH] Upload redo diagram --- docs/diagrams/RedoSequenceDiagram.puml | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/diagrams/RedoSequenceDiagram.puml diff --git a/docs/diagrams/RedoSequenceDiagram.puml b/docs/diagrams/RedoSequenceDiagram.puml new file mode 100644 index 00000000000..c2700772db2 --- /dev/null +++ b/docs/diagrams/RedoSequenceDiagram.puml @@ -0,0 +1,64 @@ +@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 "r:RedoCommand" as RedoCommand LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant ":AddressBookList" as AddressBookList MODEL_COLOR +participant ":AddressBook" as AddressBook MODEL_COLOR +end box +[-> LogicManager : execute("redo") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("redo") +activate AddressBookParser + +AddressBookParser -> AddressBookParser : ensureEmptyArguments(args) + +create RedoCommand +AddressBookParser -> RedoCommand +activate RedoCommand + +RedoCommand --> AddressBookParser +deactivate RedoCommand + +AddressBookParser --> LogicManager : r +deactivate AddressBookParser + +LogicManager -> RedoCommand : execute() +activate RedoCommand + +RedoCommand -> Model : redo() +activate Model + +Model -> AddressBookList : redo() +activate AddressBookList + +AddressBookList --> Model : addressBook + +Model -> AddressBook : resetData(addressBook) +AddressBook --> Model : +deactivate AddressBook + +Model -> AddressBookList : redoPastCommand() + +AddressBookList --> Model : pastCommand +deactivate AddressBookList + +Model --> RedoCommand : pastCommand +deactivate Model + +RedoCommand --> LogicManager : result +deactivate RedoCommand +RedoCommand -[hidden]-> LogicManager : result +destroy RedoCommand + +[<--LogicManager +deactivate LogicManager +@enduml