Skip to content

Commit

Permalink
Merge pull request #209 from larrywang0701/milestone-1.4
Browse files Browse the repository at this point in the history
Tweak PPP and some UML
  • Loading branch information
larrywang0701 authored Nov 13, 2023
2 parents 7d838ff + 50e4878 commit 529f51c
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 40 deletions.
34 changes: 18 additions & 16 deletions docs/diagrams/event/DeleteEventSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@ participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
participant ":DeleteEventCommandParser" as DeleteEventCommandParser LOGIC_COLOR
participant ":DeleteEventCommand" as DeleteEventCommand LOGIC_COLOR
participant "commandResult:CommandResult" as CommandResult LOGIC_COLOR
participant "result:CommandResult" as CommandResult LOGIC_COLOR
end box

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

[-> LogicManager : execute(commandText)
[--> LogicManager : execute(commandText)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(commandText)
LogicManager --> AddressBookParser : parseCommand(commandText)
activate AddressBookParser

create DeleteCommandParser
AddressBookParser -> DeleteCommandParser
AddressBookParser --> DeleteCommandParser
activate DeleteCommandParser

DeleteCommandParser --> AddressBookParser
deactivate DeleteCommandParser

AddressBookParser -> DeleteCommandParser : parse(commandText)
AddressBookParser --> DeleteCommandParser : parse(commandText)
activate DeleteCommandParser

create DeleteEventCommandParser
DeleteCommandParser -> DeleteEventCommandParser
DeleteCommandParser --> DeleteEventCommandParser
activate DeleteEventCommandParser

DeleteEventCommandParser -> DeleteCommandParser
DeleteEventCommandParser --> DeleteCommandParser
deactivate DeleteEventCommandParser

DeleteCommandParser -> DeleteEventCommandParser : parse(args)
DeleteCommandParser --> DeleteEventCommandParser : parse(args)
activate DeleteEventCommandParser

create DeleteEventCommand
DeleteEventCommandParser -> DeleteEventCommand
DeleteEventCommandParser --> DeleteEventCommand
activate DeleteEventCommand

DeleteEventCommand --> DeleteEventCommandParser
Expand All @@ -61,32 +61,34 @@ destroy DeleteCommandParser
AddressBookParser --> LogicManager
deactivate AddressBookParser

LogicManager -> DeleteEventCommand : execute()
LogicManager --> DeleteEventCommand : execute()
activate DeleteEventCommand

DeleteEventCommand -> Model: findPersonByUserFriendlyId(contactId)
DeleteEventCommand --> Model: findPersonByUserFriendlyId(contactId)
activate Model

Model -> DeleteEventCommand: person
Model --> DeleteEventCommand: person
deactivate Model

DeleteEventCommand --> Model : removeEventByID(eventID, owner)
activate Model

DeleteEventCommand <-- Model
deactivate Model

create CommandResult
DeleteEventCommand -> CommandResult
DeleteEventCommand --> CommandResult
activate CommandResult

CommandResult --> DeleteEventCommand : commandResult
CommandResult --> DeleteEventCommand : result
deactivate CommandResult

DeleteEventCommand --> LogicManager : commandResult
DeleteEventCommand --> LogicManager : result
deactivate DeleteEventCommand

DeleteEventCommand -[hidden]-> LogicManager
destroy DeleteEventCommand

[<--LogicManager : commandResult
[<--LogicManager : result
deactivate LogicManager
@enduml
54 changes: 34 additions & 20 deletions docs/diagrams/event/ListEventsSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,106 +11,120 @@ box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ListCommandParser" as ListCommandParser LOGIC_COLOR
participant ":ListEventCommandParser" as ListEventCommandParser LOGIC_COLOR
participant ":ListEventCommand" as ListEventCommand LOGIC_COLOR
participant "commandResult:CommandResult" as CommandResult LOGIC_COLOR
participant ":ListEventCommandParser" as ListEventCommandParser LOGIC_COLOR
participant "result:CommandResult" as CommandResult LOGIC_COLOR
end box

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

-> MainWindow : executeCommand(commandText)
--> MainWindow : executeCommand(commandText)
activate MainWindow
MainWindow -> LogicManager : execute(commandText)
MainWindow --> LogicManager : execute(commandText)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(commandText)
LogicManager --> AddressBookParser : parseCommand(commandText)
activate AddressBookParser

create ListCommandParser
AddressBookParser -> ListCommandParser
AddressBookParser --> ListCommandParser
activate ListCommandParser

ListCommandParser --> AddressBookParser
deactivate ListCommandParser

AddressBookParser -> ListCommandParser : parse(commandText)
AddressBookParser --> ListCommandParser : parse(commandText)
activate ListCommandParser

create ListEventCommandParser
ListCommandParser -> ListEventCommandParser
ListCommandParser --> ListEventCommandParser
activate ListEventCommandParser

ListEventCommandParser -> ListCommandParser
ListEventCommandParser --> ListCommandParser
deactivate ListEventCommandParser

ListCommandParser -> ListEventCommandParser : parse(args)
ListCommandParser --> ListEventCommandParser : parse(args)
activate ListEventCommandParser

create ListEventCommand
ListEventCommandParser -> ListEventCommand
ListEventCommandParser --> ListEventCommand
activate ListEventCommand

ListEventCommand --> ListEventCommandParser
deactivate ListEventCommand

ListEventCommandParser --> ListCommandParser
deactivate ListEventCommandParser

ListEventCommandParser -[hidden]-> ListCommandParser
destroy ListEventCommandParser

ListCommandParser --> AddressBookParser
deactivate ListCommandParser

ListCommandParser -[hidden]-> AddressBookParser
destroy ListCommandParser

AddressBookParser --> LogicManager
deactivate AddressBookParser

LogicManager -> ListEventCommand : execute()
LogicManager --> ListEventCommand : execute()
activate ListEventCommand

ListEventCommand -> Model: updateFilteredEventList(predicate)
ListEventCommand --> Model: updateFilteredEventList(predicate)
activate Model

Model -> ListEventCommand
Model --> ListEventCommand
deactivate Model

ListEventCommand -> Model: generateSortedFilteredEventList(comparator)
ListEventCommand --> Model: generateSortedFilteredEventList(comparator)
activate Model
ListEventCommand <- Model : sortedFilteredEventList

ListEventCommand <-- Model : sortedFilteredEventList
deactivate Model

create CommandResult
ListEventCommand -> CommandResult
ListEventCommand --> CommandResult
activate CommandResult

CommandResult --> ListEventCommand : commandResult
CommandResult --> ListEventCommand : result
deactivate CommandResult

ListEventCommand --> LogicManager : commandResult
ListEventCommand --> LogicManager : result
deactivate ListEventCommand

ListEventCommand -[hidden]-> LogicManager
destroy ListEventCommand

MainWindow <-- LogicManager : commandResult
MainWindow <-- LogicManager : result
deactivate LogicManager

MainWindow --> MainWindow : handleEventList()
activate MainWindow

MainWindow --> LogicManager : getSortedFilteredEventList()
activate LogicManager

LogicManager --> Model : getSortedFilteredEventList()
activate Model

LogicManager <-- Model : sortedFilteredEventList
deactivate Model

MainWindow <-- LogicManager : sortedFilteredEventList
deactivate LogicManager

MainWindow --> EventListWindow : show(events)
activate EventListWindow

MainWindow <-- EventListWindow
deactivate EventListWindow

deactivate MainWindow

destroy CommandResult

[<--MainWindow
@enduml
11 changes: 7 additions & 4 deletions docs/team/larrywang0701.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@
- Wrote the User Stories part in the DG [#10](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/10)
- Add details about secondary command parser in DG [#47](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/47/files#diff-1a95edf069a4136e9cb71bee758b0dc86996f6051f0d438ec2c424557de7160b)
- Add details about implementation on `ListEventCommandParser` and `ListEventCommand` [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206) [#208](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/208)
- UML diagrams that I made: [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206)
- <puml src="../diagrams/event/ListEventsSequenceDiagram.puml"/>
- <puml src="../diagrams/event/ListEventsActivityDiagram.puml"/>
- <puml src="../diagrams/event/DeleteEventSequenceDiagram.puml"/>
- UML diagrams contributions:
- UML diagrams that I added:
- docs/diagrams/event/ListEventsSequenceDiagram.puml [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206)
- docs/diagrams/event/ListEventsActivityDiagram.puml [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206)
- docs/diagrams/event/DeleteEventSequenceDiagram.puml [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206)
- UML diagram that I updated:
- docs/diagrams/event/AddEventSequenceDiagram.puml [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206)


- #### Review/mentoring contributions
Expand Down

0 comments on commit 529f51c

Please sign in to comment.