forked from AY2122S1-CS2103T-W08-3/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/AY2122S1-CS2103T-W08-3/tp …
…into addorder-bugfix # Conflicts: # docs/UserGuide.md # docs/images/TotalOrdersWindow.png
- Loading branch information
Showing
69 changed files
with
1,972 additions
and
255 deletions.
There are no files selected for viewing
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
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,96 @@ | ||
@startuml | ||
|
||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":SortOrderCommandParser" as SortOrderCommandParser LOGIC_COLOR | ||
participant ":SortDescriptor" as SortDescriptor LOGIC_COLOR | ||
participant "<<class>>\nParserUtil" as ParserUtil LOGIC_COLOR | ||
participant "d:SortOrderCommand" as SortOrderCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("sortorder f/a o/asc") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("sortorder f/a o/asc") | ||
activate AddressBookParser | ||
|
||
create SortOrderCommandParser | ||
AddressBookParser -> SortOrderCommandParser | ||
activate SortOrderCommandParser | ||
|
||
SortOrderCommandParser --> AddressBookParser | ||
deactivate SortOrderCommandParser | ||
|
||
AddressBookParser -> SortOrderCommandParser : parse("f/a o/asc") | ||
activate SortOrderCommandParser | ||
|
||
|
||
SortOrderCommandParser -> ParserUtil : parseSortField("a") | ||
activate ParserUtil | ||
|
||
ParserUtil --> SortOrderCommandParser : sortField | ||
deactivate ParserUtil | ||
|
||
SortOrderCommandParser -> ParserUtil : parseSortOrdering("asc") | ||
activate ParserUtil | ||
|
||
ParserUtil --> SortOrderCommandParser : sortOrdering | ||
deactivate ParserUtil | ||
|
||
create SortDescriptor | ||
SortOrderCommandParser -> SortDescriptor : SortDescriptor(sortField, sortOrdering) | ||
activate SortDescriptor | ||
|
||
SortDescriptor --> SortOrderCommandParser : sortDescriptor | ||
deactivate SortDescriptor | ||
|
||
create SortOrderCommand | ||
SortOrderCommandParser -> SortOrderCommand : SortOrderCommand(sortDescriptor) | ||
activate SortOrderCommand | ||
|
||
SortOrderCommand --> SortOrderCommandParser : sortOrderCommand | ||
deactivate SortOrderCommand | ||
|
||
SortOrderCommandParser --> AddressBookParser : sortOrderCommand | ||
deactivate SortOrderCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
SortOrderCommandParser -[hidden]-> AddressBookParser | ||
destroy SortOrderCommandParser | ||
|
||
AddressBookParser --> LogicManager : sortOrderCommand | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> SortOrderCommand : execute() | ||
activate SortOrderCommand | ||
|
||
SortOrderCommand -> Model : sortOrderList(SortDescriptor) | ||
activate Model | ||
|
||
Model --> SortOrderCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
SortOrderCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> SortOrderCommand | ||
deactivate CommandResult | ||
|
||
SortOrderCommand --> LogicManager : result | ||
deactivate SortOrderCommand | ||
|
||
[<--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,24 @@ | ||
@startuml | ||
'https://plantuml.com/class-diagram | ||
|
||
@startuml | ||
!include style.puml | ||
skinparam arrowThickness 1.1 | ||
skinparam arrowColor LOGIC_COLOR_T4 | ||
skinparam classBackgroundColor LOGIC_COLOR | ||
|
||
Class "{abstract}\nCommand" as Command | ||
Interface Parser <<Interface>> | ||
|
||
|
||
SortOrdersCommandParser ..> SortOrdersCommand : creates > | ||
SortOrdersCommandParser .up.|> Parser | ||
SortOrdersCommand -up-|> Command | ||
SortOrdersCommand *--> SortDescriptor | ||
SortDescriptor .up.|> "Comparator<Order>" | ||
SortDescriptor *--> SortField | ||
SortDescriptor *--> SortOrdering | ||
|
||
@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,70 @@ | ||
@startuml | ||
|
||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "d:SortOrdersCommand" as SortOrdersCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant ":OrderBook" as OrderBook MODEL_COLOR | ||
participant ":OrderList" as OrderList MODEL_COLOR | ||
participant ":OrderList" as OrderList MODEL_COLOR | ||
participant ":ObservableList<Order>" as ObservableList MODEL_COLOR | ||
end box | ||
|
||
|
||
-> SortOrdersCommand : execute() | ||
activate SortOrdersCommand | ||
|
||
SortOrdersCommand -> Model : sortOrderList(sortDescriptor) | ||
activate Model | ||
|
||
Model -> OrderBook : sortOrders(sortDescriptor) | ||
activate OrderBook | ||
|
||
OrderBook -> OrderList : sort(sortDescriptor) | ||
|
||
activate OrderList | ||
|
||
OrderList -> ObservableList : sort(sortDescriptor) | ||
|
||
activate ObservableList | ||
|
||
ObservableList --> OrderList | ||
|
||
deactivate ObservableList | ||
|
||
OrderList --> OrderBook | ||
|
||
deactivate OrderList | ||
|
||
|
||
OrderBook --> Model | ||
|
||
deactivate OrderBook | ||
|
||
Model --> SortOrdersCommand | ||
|
||
deactivate Model | ||
|
||
|
||
|
||
create CommandResult | ||
SortOrdersCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> SortOrdersCommand : result | ||
deactivate CommandResult | ||
|
||
|
||
|
||
[<--SortOrdersCommand : result | ||
deactivate SortOrdersCommand | ||
@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,66 @@ | ||
@startuml | ||
|
||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":SalesNoteParser" as SalesNoteParser LOGIC_COLOR | ||
participant ":SortOrdersCommandParser" as SortOrdersCommandParser LOGIC_COLOR | ||
participant ":SortDescriptor" as SortDescriptor LOGIC_COLOR | ||
participant "<<class>>\nParserUtil" as ParserUtil LOGIC_COLOR | ||
participant "d:SortOrdersCommand" as SortOrderCommand LOGIC_COLOR | ||
end box | ||
|
||
-> SalesNoteParser : parseCommand("sortorders f/a o/asc") | ||
activate SalesNoteParser | ||
|
||
create SortOrdersCommandParser | ||
SalesNoteParser -> SortOrdersCommandParser | ||
activate SortOrdersCommandParser | ||
|
||
SortOrdersCommandParser --> SalesNoteParser | ||
deactivate SortOrdersCommandParser | ||
|
||
SalesNoteParser -> SortOrdersCommandParser : parse("f/a o/asc") | ||
activate SortOrdersCommandParser | ||
|
||
SortOrdersCommandParser -> ParserUtil : parseSortField("a") | ||
activate ParserUtil | ||
|
||
ParserUtil --> SortOrdersCommandParser : sortField | ||
deactivate ParserUtil | ||
|
||
SortOrdersCommandParser -> ParserUtil : parseSortOrdering("asc") | ||
activate ParserUtil | ||
|
||
ParserUtil --> SortOrdersCommandParser : sortOrdering | ||
deactivate ParserUtil | ||
|
||
create SortDescriptor | ||
SortOrdersCommandParser -> SortDescriptor : SortDescriptor(sortField, sortOrdering) | ||
activate SortDescriptor | ||
|
||
SortDescriptor --> SortOrdersCommandParser : sortDescriptor | ||
deactivate SortDescriptor | ||
|
||
create SortOrderCommand | ||
SortOrdersCommandParser -> SortOrderCommand : SortOrderCommand(sortDescriptor) | ||
activate SortOrderCommand | ||
|
||
SortOrderCommand --> SortOrdersCommandParser : sortOrdersCommand | ||
deactivate SortOrderCommand | ||
|
||
SortOrdersCommandParser --> SalesNoteParser : sortOrdersCommand | ||
deactivate SortOrdersCommandParser | ||
|
||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
SortOrdersCommandParser -[hidden]-> SalesNoteParser | ||
destroy SortOrdersCommandParser | ||
|
||
<-- SalesNoteParser : sortOrdersCommand | ||
deactivate SalesNoteParser | ||
|
||
@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 | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":SalesNoteParser" as SalesNoteParser LOGIC_COLOR | ||
participant "TotalOrdersCommand" as TotalOrdersCommand LOGIC_COLOR | ||
participant "CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("totalorders") | ||
activate LogicManager | ||
|
||
LogicManager -> SalesNoteParser : parseCommand("totalorders") | ||
activate SalesNoteParser | ||
|
||
create TotalOrdersCommand | ||
SalesNoteParser -> TotalOrdersCommand | ||
activate TotalOrdersCommand | ||
|
||
TotalOrdersCommand --> SalesNoteParser | ||
deactivate TotalOrdersCommand | ||
|
||
SalesNoteParser --> LogicManager | ||
deactivate SalesNoteParser | ||
|
||
LogicManager -> TotalOrdersCommand : execute() | ||
activate TotalOrdersCommand | ||
|
||
create CommandResult | ||
TotalOrdersCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> TotalOrdersCommand | ||
deactivate CommandResult | ||
|
||
TotalOrdersCommand --> LogicManager | ||
deactivate TotalOrdersCommand | ||
|
||
[<--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 | ||
|
||
box UI UI_COLOR_T1 | ||
participant ":MainWindow" as MainWindow UI_COLOR | ||
participant ":TotalOrdersWindow" as TotalOrdersWindow UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":Logic" as Logic LOGIC_COLOR | ||
end box | ||
|
||
[-> MainWindow : executeCommand("totalorders") | ||
activate MainWindow | ||
|
||
MainWindow -> Logic : execute("totalorders") | ||
activate Logic | ||
|
||
Logic --> MainWindow | ||
deactivate Logic | ||
|
||
MainWindow -> MainWindow : handleTotalOrders() | ||
activate MainWindow | ||
|
||
MainWindow -> TotalOrdersWindow : reloadData() | ||
activate TotalOrdersWindow | ||
|
||
TotalOrdersWindow -> Logic : getClientTotalOrders() | ||
activate Logic | ||
|
||
Logic --> TotalOrdersWindow | ||
deactivate Logic | ||
|
||
TotalOrdersWindow --> MainWindow | ||
deactivate TotalOrdersWindow | ||
|
||
MainWindow --> MainWindow | ||
deactivate MainWindow | ||
|
||
[<--MainWindow | ||
deactivate MainWindow | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.