Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sequence diagrams #354

Merged
merged 7 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,18 @@ The `Storage` component,
Classes used by multiple components are in the `seedu.addressbook.commons` package.

<div style="page-break-after: always;"></div>

## **Implementation**

This section describes some noteworthy details on how certain features are implemented.

<div markdown="span" class="alert alert-info">

:information_source: **Note:**
For simplicity, some details such as parsing (`parseIndex`, `parseName`, etc) have been omitted from the implementation details below.

</div>

### Add tutor feature

The "Add Tutor" feature allows users to add a new tutor to the address book. Below, we provide an example usage scenario and a detailed description of how the add tutor mechanism behaves at each step.
Expand Down
3 changes: 1 addition & 2 deletions docs/diagrams/AddScheduleSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":AddSchedule\nCommandParser" as AddScheduleCommandParser LOGIC_COLOR
participant "add-s:AddSchedule\nCommand" as AddScheduleCommand LOGIC_COLOR
participant "result:CommandResult" as CommandResult LOGIC_COLOR

participant "s:Schedule" as Schedule MODEL_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant "s:Schedule" as Schedule MODEL_COLOR
end box
[-> LogicManager : execute("add-s 1\nst/2023-09-15T09:00\n et/2023-09-15T11:00")
activate LogicManager
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/AddTutorSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":AddTutorCommandParser" as AddTutorCommandParser LOGIC_COLOR
participant "person:Person" as Person MODEL_COLOR
participant "d:AddTutorCommand" as AddTutorCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
Expand Down Expand Up @@ -67,12 +67,12 @@ create CommandResult
AddTutorCommand -> CommandResult
activate CommandResult

CommandResult --> AddTutorCommand
CommandResult --> AddTutorCommand : r
deactivate CommandResult

AddTutorCommand --> LogicManager : result
AddTutorCommand --> LogicManager : r
deactivate AddTutorCommand

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

[-> Ui :
Expand Down Expand Up @@ -55,13 +55,13 @@ create CommandResult
ThemeCommand -> CommandResult
activate CommandResult

CommandResult --> ThemeCommand : result
CommandResult --> ThemeCommand : r
deactivate CommandResult

ThemeCommand --> LogicManager : result
ThemeCommand --> LogicManager : r
deactivate ThemeCommand

LogicManager --> Ui : result
LogicManager --> Ui : r
deactivate LogicManager

Ui --> Ui : handle\nChange\nTheme()
Expand Down
28 changes: 21 additions & 7 deletions docs/diagrams/EditScheduleSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":EditSchedule\nCommandParser" as EditScheduleCommandParser LOGIC_COLOR
participant "e:EditSchedule\nDescriptor" as EditScheduleDescriptor LOGIC_COLOR
participant "d:EditSchedule\nCommand" as EditScheduleCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
participant "e:Schedule" as EditedSchedule MODEL_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant "editedSchedule:Schedule" as EditedSchedule MODEL_COLOR
end box

[-> LogicManager : execute("edit-s 1\n st/2023-09-15T09:00")
Expand Down Expand Up @@ -58,12 +58,26 @@ deactivate AddressBookParser
LogicManager -> EditScheduleCommand : execute()
activate EditScheduleCommand

EditScheduleCommand -> Model ++ : getFilteredPersonList()
return

create EditedSchedule
EditScheduleCommand -> EditedSchedule ++
return e
EditScheduleCommand -> Model ++ : hasSchedule(e)
return
EditScheduleCommand -> Model ++ : hasSchedule(editedSchedule)

EditScheduleCommand -> Model ++ : getAddressBook()
return
EditScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, editedSchedule)

loop number of schedules in model
EditScheduleCommand -> EditedSchedule : isClashing(e)
activate EditedSchedule
EditedSchedule --> EditScheduleCommand
deactivate EditedSchedule
end

EditScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, e)
return
EditScheduleCommand -> Model ++ : updateFilteredScheduleList()
deactivate Model
Expand All @@ -74,12 +88,12 @@ create CommandResult
EditScheduleCommand -> CommandResult
activate CommandResult

CommandResult --> EditScheduleCommand
CommandResult --> EditScheduleCommand : r
deactivate CommandResult

EditScheduleCommand --> LogicManager : result
EditScheduleCommand --> LogicManager : r
deactivate EditScheduleCommand

[<--LogicManager
[<--LogicManager : r
deactivate LogicManager
@enduml
12 changes: 6 additions & 6 deletions docs/diagrams/EditTutorSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":EditTutorCommandParser" as EditTutorCommandParser LOGIC_COLOR
participant "d:EditTutorCommand" as EditTutorCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
participant "e:Person" as EditedPerson MODEL_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant "e:Person" as EditedPerson MODEL_COLOR
end box

[-> LogicManager : execute("edit-t 1 n/New Name")
Expand Down Expand Up @@ -52,7 +52,7 @@ activate EditTutorCommand

create EditedPerson
EditTutorCommand -> EditedPerson ++
return
return e

EditTutorCommand -> Model ++ : hasPerson(e)
return
Expand All @@ -73,12 +73,12 @@ create CommandResult
EditTutorCommand -> CommandResult
activate CommandResult

CommandResult --> EditTutorCommand
CommandResult --> EditTutorCommand : r
deactivate CommandResult

EditTutorCommand --> LogicManager : result
EditTutorCommand --> LogicManager : r
deactivate EditTutorCommand

[<--LogicManager
[<--LogicManager : r
deactivate LogicManager
@enduml
8 changes: 4 additions & 4 deletions docs/diagrams/FindTutorSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":FindTutorCommandParser" as FindTutorCommandParser LOGIC_COLOR
participant "e:NameContains\nKeywordsPredicate" as NameContainsKeywordsPredicate LOGIC_COLOR
participant "d:FindTutor\nCommand" as FindTutorCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
Expand Down Expand Up @@ -66,12 +66,12 @@ create CommandResult
FindTutorCommand -> CommandResult
activate CommandResult

CommandResult --> FindTutorCommand
CommandResult --> FindTutorCommand : r
deactivate CommandResult

FindTutorCommand --> LogicManager : result
FindTutorCommand --> LogicManager : r
deactivate FindTutorCommand

[<--LogicManager
[<--LogicManager : r
deactivate LogicManager
@enduml
14 changes: 7 additions & 7 deletions docs/diagrams/MarkScheduleSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":MarkScheduleCommandParser" as MarkScheduleCommandParser LOGIC_COLOR
participant "d:MarkScheduleCommand" as MarkScheduleCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
participant "e:Schedule" as EditedSchedule MODEL_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant "edited:Schedule" as EditedSchedule MODEL_COLOR
end box

[-> LogicManager : execute("mark 1 m/1")
Expand Down Expand Up @@ -53,9 +53,9 @@ activate MarkScheduleCommand

create EditedSchedule
MarkScheduleCommand -> EditedSchedule ++
return
return e

MarkScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, editedSchedule)
MarkScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, e)
return

MarkScheduleCommand -> Model ++ : updateFilteredScheduleList()
Expand All @@ -67,12 +67,12 @@ create CommandResult
MarkScheduleCommand -> CommandResult
activate CommandResult

CommandResult --> MarkScheduleCommand
CommandResult --> MarkScheduleCommand : r
deactivate CommandResult

MarkScheduleCommand --> LogicManager : result
MarkScheduleCommand --> LogicManager : r
deactivate MarkScheduleCommand

[<--LogicManager
[<--LogicManager: r
deactivate LogicManager
@enduml
8 changes: 4 additions & 4 deletions docs/diagrams/ShowCalendarSequenceDiagram.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 ":ShowCalendarCommandParser" as ShowCalendarCommandParser LOGIC_COLOR
participant "d:ShowCalendarCommand" as ShowCalendarCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
Expand Down Expand Up @@ -61,12 +61,12 @@ create CommandResult
ShowCalendarCommand -> CommandResult
activate CommandResult

CommandResult --> ShowCalendarCommand
CommandResult --> ShowCalendarCommand : r
deactivate CommandResult

ShowCalendarCommand --> LogicManager : result
ShowCalendarCommand --> LogicManager : r
deactivate ShowCalendarCommand

[<--LogicManager
[<--LogicManager : r
deactivate LogicManager
@enduml
15 changes: 8 additions & 7 deletions docs/diagrams/UnmarkScheduleSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":UnmarkScheduleCommandParser" as UnmarkScheduleCommandParser LOGIC_COLOR
participant "d:UnmarkScheduleCommand" as UnmarkScheduleCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
participant "e:Schedule" as EditedSchedule MODEL_COLOR

end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant "edited:Schedule" as EditedSchedule MODEL_COLOR
end box

[-> LogicManager : execute("unmark 1")
Expand Down Expand Up @@ -52,8 +53,8 @@ activate UnmarkScheduleCommand

create EditedSchedule
UnmarkScheduleCommand -> EditedSchedule ++
return
UnmarkScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, edited)
return e
UnmarkScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, e)
return
UnmarkScheduleCommand -> Model ++ : updateFilteredScheduleList()
deactivate Model
Expand All @@ -64,12 +65,12 @@ create CommandResult
UnmarkScheduleCommand -> CommandResult
activate CommandResult

CommandResult --> UnmarkScheduleCommand
CommandResult --> UnmarkScheduleCommand: r
deactivate CommandResult

UnmarkScheduleCommand --> LogicManager : result
UnmarkScheduleCommand --> LogicManager : r
deactivate UnmarkScheduleCommand

[<--LogicManager
[<--LogicManager: r
deactivate LogicManager
@enduml
Binary file modified docs/images/AddScheduleSequenceDiagram.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/AddTutorSequenceDiagram.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/ChangeThemeSequenceDiagram.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/EditScheduleSequenceDiagram.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/EditTutorSequenceDiagram.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/FindTutorSequenceDiagram.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/MarkScheduleSequenceDiagram.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/ShowCalendarSequenceDiagram.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/UnmarkScheduleSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.