forked from nus-cs2103-AY2324S1/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.
- Loading branch information
Showing
10 changed files
with
252 additions
and
5 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -181,7 +181,31 @@ When command fails: | |
* `Missing property index` for missing parameter | ||
* `No such property index` for wrong parameter or index beyond list size | ||
* `Invalid command` for misspelling of command | ||
|
||
### Editing a customer : `editcust` | ||
Edits an existing customer. | ||
Format: `editcust INDEX [n/NAME] [ph/PHONE] [e/EMAIL] [b/BUDGET] [c/CHARACTERISTIC]…` | ||
* Edits the customer at the specified `INDEX`. The index refers to the index number shown in the displayed customer list. The index **must be a positive integer** 1, 2, 3, … | ||
* At least one of the optional fields must be provided. | ||
* Existing values will be updated to the input values. | ||
* When editing tags, the existing tags of the property will be removed i.e adding of tags is not cumulative. | ||
* You can remove all the person’s tags by typing `c/` without | ||
specifying any tags after it. | ||
Examples: | ||
* `editprop 1 ph/91234567 e/[email protected]` Edits the phone number and email of the 1st customer to be `91234567` and `[email protected]` respectively. | ||
* `edit 2 n/Andrew c/` Edits the name of the 2nd customer to be `Andrew` and clears all existing tags. | ||
|
||
### Editing a property : `editprop` | ||
Edits an existing property. | ||
Format: `editprop INDEX [n/NAME] [ph/PHONE] [pr/PRICE] [a/ADDRESS] [c/CHARACTERISTIC]…` | ||
* Edits the property at the specified `INDEX`. The index refers to the index number shown in the displayed property list. The index **must be a positive integer** 1, 2, 3, … | ||
* At least one of the optional fields must be provided. | ||
* Existing values will be updated to the input values. | ||
* When editing tags, the existing tags of the property will be removed i.e adding of tags is not cumulative. | ||
* You can remove all the person’s tags by typing `c/` without | ||
specifying any tags after it. | ||
Examples: | ||
* `editprop 1 ph/91234567 a/43 Clementi Avenue 3 #03-543` Edits the phone number and address of the 1st property to be `91234567` and `43 Clementi Avenue 3 #03-543` respectively. | ||
* `edit 2 n/Skyview t/` Edits the name of the 2nd property to be `Skyview` and clears all existing tags. | ||
### Finding a customer : `findcust` | ||
|
||
Finds and returns a customer or a list of customers whose name contains the substring inputted. | ||
|
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 | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":DeleteCustomerCommandParser" as DeleteCustomerCommandParser LOGIC_COLOR | ||
participant "d:DeleteCustomerCommand" as DeleteCustomerCommand 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("delcust 1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("delcust 1") | ||
activate AddressBookParser | ||
|
||
create DeleteCustomerCommandParser | ||
AddressBookParser -> DeleteCustomerCommandParser | ||
activate DeleteCustomerCommandParser | ||
|
||
DeleteCustomerCommandParser --> AddressBookParser | ||
deactivate DeleteCustomerCommandParser | ||
|
||
AddressBookParser -> DeleteCustomerCommandParser : parse("1") | ||
activate DeleteCustomerCommandParser | ||
|
||
create DeleteCustomerCommand | ||
DeleteCustomerCommandParser -> DeleteCustomerCommand | ||
activate DeleteCustomerCommand | ||
|
||
DeleteCustomerCommand --> DeleteCustomerCommandParser : d | ||
deactivate DeleteCustomerCommand | ||
|
||
DeleteCustomerCommandParser --> AddressBookParser : d | ||
deactivate DeleteCustomerCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
DeleteCustomerCommandParser -[hidden]-> AddressBookParser | ||
destroy DeleteCustomerCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> DeleteCustomerCommand : execute() | ||
activate DeleteCustomerCommand | ||
|
||
DeleteCustomerCommand -> Model : deleteCustomer(1) | ||
activate Model | ||
|
||
Model --> DeleteCustomerCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteCustomerCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteCustomerCommand | ||
deactivate CommandResult | ||
|
||
DeleteCustomerCommand --> LogicManager : result | ||
deactivate DeleteCustomerCommand | ||
|
||
[<--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,70 @@ | ||
@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 ":DeletePropertyCommandParser" as DeletePropertyCommandParser LOGIC_COLOR | ||
participant "d:DeletePropertyCommand" as DeletePropertyCommand 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("delprop 1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("delprop 1") | ||
activate AddressBookParser | ||
|
||
create DeletePropertyCommandParser | ||
AddressBookParser -> DeletePropertyCommandParser | ||
activate DeletePropertyCommandParser | ||
|
||
DeletePropertyCommandParser --> AddressBookParser | ||
deactivate DeletePropertyCommandParser | ||
|
||
AddressBookParser -> DeletePropertyCommandParser : parse("1") | ||
activate DeletePropertyCommandParser | ||
|
||
create DeletePropertyCommand | ||
DeletePropertyCommandParser -> DeletePropertyCommand | ||
activate DeletePropertyCommand | ||
|
||
DeletePropertyCommand --> DeletePropertyCommandParser : d | ||
deactivate DeletePropertyCommand | ||
|
||
DeletePropertyCommandParser --> AddressBookParser : d | ||
deactivate DeletePropertyCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
DeletePropertyCommandParser -[hidden]-> AddressBookParser | ||
destroy DeletePropertyCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> DeletePropertyCommand : execute() | ||
activate DeletePropertyCommand | ||
|
||
DeletePropertyCommand -> Model : deleteProperty(1) | ||
activate Model | ||
|
||
Model --> DeletePropertyCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeletePropertyCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeletePropertyCommand | ||
deactivate CommandResult | ||
|
||
DeletePropertyCommand --> LogicManager : result | ||
deactivate DeletePropertyCommand | ||
|
||
[<--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
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,72 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":EditPropertyCommandParser" as EditPropertyCommandParser LOGIC_COLOR | ||
participant "command:EditPropertyCommand" as EditPropertyCommand 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("editprop 1 n/Skyview") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("editprop 1 n/Skyview") | ||
activate AddressBookParser | ||
|
||
create EditPropertyCommandParser | ||
AddressBookParser -> EditPropertyCommandParser : new EditPropertyCommandParser("1 n/Skyview") | ||
activate EditPropertyCommandParser | ||
|
||
EditPropertyCommandParser --> AddressBookParser | ||
deactivate EditPropertyCommandParser | ||
|
||
AddressBookParser -> EditPropertyCommandParser : parse("1 n/Skyview") | ||
activate EditPropertyCommandParser | ||
|
||
create EditPropertyCommand | ||
EditPropertyCommandParser -> EditPropertyCommand : new EditPropertyCommand(1, editPropertyDescriptor) | ||
activate EditPropertyCommand | ||
|
||
EditPropertyCommand --> EditPropertyCommandParser : command | ||
deactivate EditPropertyCommand | ||
|
||
EditPropertyCommandParser --> AddressBookParser : command | ||
deactivate EditPropertyCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
EditPropertyCommandParser -[hidden]-> AddressBookParser | ||
destroy EditPropertyCommandParser | ||
|
||
AddressBookParser --> LogicManager : command | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> EditPropertyCommand : execute() | ||
activate EditPropertyCommand | ||
|
||
EditPropertyCommand -> EditPropertyCommand : createEditedProperty(propertyToEdit, editPropertyDescriptor) | ||
activate EditPropertyCommand | ||
EditPropertyCommand --> EditPropertyCommand : editedProperty | ||
deactivate EditPropertyCommand | ||
|
||
EditPropertyCommand -> Model : setProperty(PropertyToEdit, editedProperty) | ||
|
||
EditPropertyCommand -> Model : updateFilteredPropertyList(PREDICATE_SHOW_ALL_PROPERTY) | ||
|
||
create CommandResult | ||
EditPropertyCommand -> CommandResult : new CommandResult("Edited property: " + editedProperty) | ||
activate CommandResult | ||
|
||
CommandResult --> EditPropertyCommand | ||
deactivate CommandResult | ||
|
||
EditPropertyCommand --> LogicManager : commandResult | ||
deactivate EditPropertyCommand | ||
|
||
[<--LogicManager : commandResult | ||
deactivate LogicManager | ||
@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.