forked from nus-cs2103-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
697 additions
and
205 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":StaffConnectParser" as StaffConnectParser LOGIC_COLOR | ||
participant ":AddMeetingCommandParser" as AddMeetingCommandParser LOGIC_COLOR | ||
participant "m:AddMeetingCommand" as AddMeetingCommand LOGIC_COLOR | ||
|
||
|
||
end box | ||
|
||
|
||
[-> LogicManager : execute("meeting-add 2 d/Finals/20/04/2024 15:00") | ||
activate LogicManager | ||
|
||
LogicManager -> StaffConnectParser : parseCommand("2 d/Finals s/20/04/2024 15:00") | ||
activate StaffConnectParser | ||
|
||
create AddMeetingCommandParser | ||
StaffConnectParser -> AddMeetingCommandParser | ||
activate AddMeetingCommandParser | ||
|
||
AddMeetingCommandParser --> StaffConnectParser | ||
deactivate AddMeetingCommandParser | ||
|
||
|
||
StaffConnectParser -> AddMeetingCommandParser : parse(arguments) | ||
activate AddMeetingCommandParser | ||
ref over AddMeetingCommandParser : parse arguments for meeting-add | ||
|
||
|
||
create AddMeetingCommand | ||
AddMeetingCommandParser -> AddMeetingCommand++ | ||
return | ||
|
||
return m | ||
destroy AddMeetingCommandParser | ||
return m | ||
return | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "m:AddMeetingCommand" as AddMeetingCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
participant "editedPerson:Person " as editedPerson LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as Model MODEL_COLOR | ||
end box | ||
|
||
|
||
[-> AddMeetingCommand : execute(model) | ||
activate AddMeetingCommand | ||
|
||
AddMeetingCommand -> Model : getSortedFilteredPersonList() | ||
activate Model | ||
return | ||
|
||
ref over AddMeetingCommand : copy selectedPerson | ||
|
||
AddMeetingCommand -> editedPerson : addMeeting() | ||
activate editedPerson | ||
return | ||
|
||
AddMeetingCommand -> editedPerson : updateSortedMeetingList(MEETING_DATE_THEN_DESCRIPTION_COMPARATOR); | ||
activate editedPerson | ||
return | ||
|
||
AddMeetingCommand -> Model : setPerson(selectedPerson, editedPerson) | ||
activate Model | ||
return | ||
|
||
create CommandResult | ||
AddMeetingCommand -> CommandResult++ | ||
return | ||
|
||
return r | ||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
mainframe **sd** parse arguments for meeting-add | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":AddMeetingCommandParser" as AddMeetingCommandParser LOGIC_COLOR | ||
participant "<<class>>\nParserUtil" as ParserUtil LOGIC_COLOR | ||
participant ":MeetingDescription" as MeetingDescription LOGIC_COLOR | ||
participant ":MeetingDateTime" as MeetingDateTime LOGIC_COLOR | ||
end box | ||
|
||
|
||
|
||
AddMeetingCommandParser -> ParserUtil : parseIndex() | ||
activate AddMeetingCommandParser | ||
activate ParserUtil | ||
return | ||
|
||
AddMeetingCommandParser -> ParserUtil : parseDescription() | ||
activate ParserUtil | ||
|
||
create MeetingDescription | ||
ParserUtil -> MeetingDescription++ | ||
return | ||
return | ||
|
||
AddMeetingCommandParser -> ParserUtil : parseDateTime() | ||
activate ParserUtil | ||
create MeetingDateTime | ||
ParserUtil -> MeetingDateTime++ | ||
return | ||
return | ||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":StaffConnectParser" as StaffConnectParser LOGIC_COLOR | ||
participant ":DeleteMeetingCommandParser" as deleteMeetingCommandParser LOGIC_COLOR | ||
participant "<<class>>\nParserUtil" as ParserUtil LOGIC_COLOR | ||
participant "d:DeleteMeetingCommand" as AddMeetingCommand LOGIC_COLOR | ||
end box | ||
|
||
|
||
[-> LogicManager : execute("meeting-delete 1 i/1") | ||
activate LogicManager | ||
|
||
LogicManager -> StaffConnectParser : parseCommand("meeting-delete 1 i/1") | ||
activate StaffConnectParser | ||
|
||
create deleteMeetingCommandParser | ||
StaffConnectParser -> deleteMeetingCommandParser | ||
activate deleteMeetingCommandParser | ||
|
||
deleteMeetingCommandParser --> StaffConnectParser | ||
deactivate deleteMeetingCommandParser | ||
|
||
StaffConnectParser -> deleteMeetingCommandParser : parse("1 i/1") | ||
activate deleteMeetingCommandParser | ||
|
||
|
||
deleteMeetingCommandParser -> ParserUtil : parse person index | ||
activate ParserUtil | ||
return | ||
|
||
deleteMeetingCommandParser -> ParserUtil : parse meeting index | ||
activate ParserUtil | ||
return | ||
|
||
create AddMeetingCommand | ||
deleteMeetingCommandParser -> AddMeetingCommand++ | ||
return | ||
|
||
return d | ||
destroy deleteMeetingCommandParser | ||
return d | ||
return | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "d:DeleteMeetingCommand" as DeleteMeetingCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
participant "editedPerson:Person " as editedPerson LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> DeleteMeetingCommand : execute(model) | ||
activate DeleteMeetingCommand | ||
|
||
DeleteMeetingCommand -> Model : getSortedFilteredPersonList() | ||
activate Model | ||
return | ||
|
||
ref over DeleteMeetingCommand : copy selectedPerson | ||
|
||
DeleteMeetingCommand -> editedPerson : removeMeeting() | ||
activate editedPerson | ||
return | ||
|
||
DeleteMeetingCommand -> editedPerson : updateSortedMeetingList(MEETING_DATE_THEN_DESCRIPTION_COMPARATOR); | ||
activate editedPerson | ||
return | ||
|
||
DeleteMeetingCommand -> Model : setPerson(selectedPerson, editedPerson) | ||
activate Model | ||
return | ||
|
||
create CommandResult | ||
DeleteMeetingCommand -> CommandResult++ | ||
return | ||
|
||
return r | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant "f:FavCommand" as FavCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as Model MODEL_COLOR | ||
end box | ||
|
||
activate LogicManager | ||
|
||
LogicManager -> FavCommand : execute(model) | ||
activate FavCommand | ||
|
||
FavCommand -> Model : getSortedFilteredPersonList() | ||
activate Model | ||
return | ||
|
||
ref over FavCommand : create a favourite person | ||
|
||
FavCommand -> Model : setPerson(personToFav, favPerson) | ||
activate Model | ||
return | ||
|
||
FavCommand -> Model : updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS) | ||
activate Model | ||
return | ||
|
||
create CommandResult | ||
FavCommand -> CommandResult++ | ||
return | ||
|
||
return r | ||
[<- LogicManager | ||
deactivate LogicManager | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant "u:UnfavCommand" as UnfavCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as Model MODEL_COLOR | ||
end box | ||
|
||
activate LogicManager | ||
|
||
LogicManager -> UnfavCommand : execute(model) | ||
activate UnfavCommand | ||
|
||
UnfavCommand -> Model : getSortedFilteredPersonList() | ||
activate Model | ||
return | ||
|
||
ref over UnfavCommand : create an unfavourite person | ||
|
||
UnfavCommand -> Model : setPerson(personToUnfav, unfavPerson) | ||
activate Model | ||
return | ||
|
||
UnfavCommand -> Model : updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS) | ||
activate Model | ||
return | ||
|
||
create CommandResult | ||
UnfavCommand -> CommandResult++ | ||
return | ||
|
||
return r | ||
[<- LogicManager | ||
deactivate LogicManager | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@startuml | ||
skin rose | ||
skinparam ActivityFontSize 15 | ||
skinparam ArrowFontSize 12 | ||
start | ||
:User executes fav command; | ||
|
||
'Since the beta syntax does not support placing the condition outside the | ||
'diamond we place it as the true branch instead. | ||
|
||
if () then ([index is valid]) | ||
if () then ([Person is favourite]) | ||
:Create new Person with same values but is a favourite; | ||
:Replace the original Person with the new one; | ||
:Refresh the list of Persons; | ||
else ([else]) | ||
:Show error message to user that person is already a favourite; | ||
endif | ||
else ([else]) | ||
:Show error message to user that index is invalid; | ||
endif | ||
stop | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
mainframe **sd** create a favourite person | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "f:FavCommand" as FavCommand LOGIC_COLOR | ||
participant FavCommand as FavCommand1 <<class>> LOGIC_COLOR | ||
participant "<<class>>\nPersonUtil" as PersonUtil LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Person" as Person MODEL_COLOR | ||
end box | ||
|
||
FavCommand -> FavCommand1 : createFavPerson(personToFav) | ||
activate FavCommand | ||
activate FavCommand1 | ||
|
||
FavCommand1 -> PersonUtil : createPersonWithFavouriteStatus(selectedPerson, favourite) | ||
activate PersonUtil | ||
|
||
create Person | ||
PersonUtil -> Person++ | ||
return createdPerson | ||
|
||
return favPerson | ||
return favPerson | ||
|
||
@enduml |
Oops, something went wrong.