Skip to content

Commit

Permalink
Merge branch 'master' into refactor-DG
Browse files Browse the repository at this point in the history
  • Loading branch information
wxwern authored Oct 20, 2023
2 parents 74d15e4 + f455f11 commit 7d5fc92
Show file tree
Hide file tree
Showing 20 changed files with 161 additions and 105 deletions.
3 changes: 1 addition & 2 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ We are a team based in the [School of Computing, National University of Singapor

<img src="images/cj-lee01.png" width="200px">

[[homepage](http://www.comp.nus.edu.sg/~damithch)]
[[github](https://github.com/CJ-Lee01)]
[[portfolio](team/johndoe.md)]

Expand All @@ -34,7 +33,7 @@ We are a team based in the [School of Computing, National University of Singapor
[[github](http://github.com/mcnabry)]
[[portfolio](team/mcnabry.md)]

* Member
* Role: Member

### Shi Yu

Expand Down
30 changes: 30 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ How the parsing works:
* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.

How arguments from a raw command input may be obtained by parsers:
* When arguments are needed for a command, `ArgumentTokenizer` is used to prepare and tokenize the raw input string, which can then convert it to an `ArgumentMultimap` for easy access.
* An `ArgumentMultimap` represents the command data (which has the format `name preamble text --flag1 value 1 --flag2 value 2`) in their distinct fields: **preamble**, **flags** and their mapped **values**. Note that as a multimap, multiple values can be mapped to the same flag.
* All parsers can use the `ArgumentMultimap` (obtained from using the raw input on `ArgumentTokenizer`) to access the required arguments to create and execute a `Command`.

### Model component
**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)

Expand Down Expand Up @@ -312,6 +317,31 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case resumes at step 2.


**Use case: List contacts**

**MSS**

1. User requests to list contacts
2. Jobby shows a list of contacts

Use case ends.

**Extensions**

* 1a. User requests to list organizations.

* 1a1. Jobby shows a list of organizations.

Use case ends.

* 1b. User requests to list recruiters.

* 1b1. Jobby shows a list of recruiters.

Use case ends.


*{More to be added}*

### Non-Functional Requirements
Expand Down
53 changes: 30 additions & 23 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ title: User Guide
* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br>
e.g. if the command format is `add --name NAME`, `NAME` is a parameter which can be used like `add --name John Doe`.

* Terms prefixed with `--` are used to assign a value to some action or property, or to choose an option out of a few settings.
e.g. the `--name` field (which requires a `NAME` supplied after it) may configure the name of a contact, while a switch like `--recursive` (which doesn't accept values) may explicitly activate a recursive mode for an action.

* Items in square brackets are optional.<br>
e.g `--name NAME [--tag TAG]` can be used as `--name John Doe --tag friend` or as `--name John Doe`.

Expand All @@ -46,18 +49,18 @@ title: User Guide
* Items with `...` after them can be used multiple times including zero times.<br>
e.g. `[--tag TAG]...` can be used as ` ` (i.e. 0 times), `--tag friend`, `--tag friend --tag family` etc.

* Items separated by `/` means that only one of them can be used per command.<br>
e.g. `--org/--rec` means that either `--org` or `--rec` can be supplied as a flag but not both at the same time.

* Parameters can be in any order.<br>
e.g. if the command specifies `--name NAME --phone PHONE_NUMBER`, `--phone PHONE_NUMBER --name NAME` is also acceptable.

* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.<br>
e.g. if the command specifies `help 123`, it will be interpreted as `help`.
* Extraneous parameters and values for all commands will be ignored by default.<br>
e.g. if `list` only accepts the `--org` or `--rec` options and no other value, supplying extras like `list 123 --other --org 456` will be interpreted as `list --org` (i.e., ignoring all other parameters).

* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application.
</div>

<div markdown="span" class="alert alert-primary">:bulb: **Note:**
This is a pending update. Command formats aren't updated as of the current build, and are still using the legacy `parameter/value` syntax instead of this new `--parameter value` syntax. Additionally, commands are in the middle of being revamped.
</div>

### Viewing help: `help`

Expand All @@ -70,20 +73,20 @@ Format: `help`

### Adding a contact: `add`

Format: `add --type CLASS <additional parameters and values...>`
Format: `add --org/--rec <additional parameters and values...>`

Adds a contact to the address book of the given class type: Organization or Recruiter.

Notice that `CLASS` must be either _Organization_ or _Recruiter_ (or any case-insensitive unambiguous prefix match, so “org” will match “Organization” automatically)
Supplying `--org` adds an Organization while supplying `--rec` adds a Recruiter to the address book.

Details specifically on organization and recruiter level are specified in the next sections.


#### Adding an organization contact: `add --type organization`
#### Adding an organization contact: `add --org`

_{Work in progress...}_

Format: `add --type o[rganization] --name NAME [--id ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--stat STATUS] [--pos POSITION] [--tag TAG]... `
Format: `add --org --name NAME [--id ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--stat STATUS] [--pos POSITION] [--tag TAG]... `


Acceptable Parameters:
Expand All @@ -108,22 +111,22 @@ Acceptable Parameters:


Examples:
* `add --name J&J --type Organization`
* `add --org --name J&J`

* `add --name Google --type Org --id g-sg --phone 98765432 `
* `add --org --name Google --id g-sg --phone 98765432 `

* `add --name Hoyoverse --type organization --email [email protected] --tag example1 --tag example2`
* `add --org --name Hoyoverse --email [email protected] --tag example1 --tag example2`

* `add --name Example --type organi --url www.organization.org --tag freelance work`
* `add --org --name Example --url www.organization.org --tag freelance`

* `add --type o --name Examinations NUS --phone 65166269 --email [email protected] --url https://luminus.nus.edu.sg/ --stat pending`
* `add --org --name Examinations NUS --phone 65166269 --email [email protected] --url https://luminus.nus.edu.sg/ --stat pending`


### Adding a recruiter: `add --type recruiter`
#### Adding a recruiter contact: `add --rec`

_{Work in progress...}_

Format: `add --type r[ecruiter] --name NAME [-id ID] [--oid ORG_ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--tag TAG]...`
Format: `add --rec --name NAME [-id ID] [--oid ORG_ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--tag TAG]...`


Acceptable Parameters:
Expand All @@ -132,28 +135,32 @@ Acceptable Parameters:
* `ID` refers to a unique identifier which is used to uniquely identify the recruiter (alphanumeric and basic symbols, i.e. should only be `a-z`, `A-Z`, `0-9`, `-`, `_`).
* Specifying this sets the ID, or one unique one will be derived and generated from the name if not provided.

* `ORG_ID` refers to the unique identifier which is used to uniquely identify the organization the recruiter should be tied to.
* `ORG_ID` refers to the unique identifier which is used to uniquely identify the organization the recruiter should be tied to. It is subject to the same validation as the ID field.

* `NUMBER` should be a valid phone number.

* `EMAIL` should be a valid email.

* `ADDRESS` can accept any value. It designates the contact’s physical address.

* `TAG `can accept any value and may have multiple inputs.
* `TAG` can accept any value and may have multiple inputs.


Examples:
* `add --name John Doe --type Recruiter --oid paypal-sg`
* `add --rec --name John Doe --oid paypal-sg`


### Listing all contacts: `list`

_{To be updated...}_
Format: `list [--org/--rec]`

Shows a list of all contacts in the address book.
Supplying `--org` lists only Organizations while supplying `--rec` lists only Recruiters.

Format: `list`
Examples:
* `list`
* `list --org`
* `list --rec`


### Editing a contact: `edit`
Expand Down Expand Up @@ -248,8 +255,8 @@ If your changes to the data file makes its format invalid, Jobby will discard al

Action | Format, Examples
--------|------------------
**Add Organization** | `add --type o[rganization] --name <NAME> [--id ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--stat STATUS] [--pos POSITION] [--tag TAG]...`<br> e.g., `add --type o --name NUS --phone 0123456789 --email [email protected] --url https://www.nus.edu.sg/ --stat pending --pos Research`
**Add Recruiter** | `add --type r[ecruiter] --name <NAME> [--id ID] [--oid ORG_ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--tag TAG]...`<br> e.g., `add --name John Doe --type Recruiter --oid paypal-sg`
**Add Organization** | `add --org --name <NAME> [--id ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--stat STATUS] [--pos POSITION] [--tag TAG]...`<br> e.g., `add --org --name NUS --phone 0123456789 --email [email protected] --url https://www.nus.edu.sg/ --stat pending --pos Research`
**Add Recruiter** | `add --rec --name <NAME> [--id ID] [--oid ORG_ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--tag TAG]...`<br> e.g., `add --rec --name John Doe --oid paypal-sg`
**Clear** | `clear`
**Delete** | `delete INDEX`<br> e.g., `delete 3`
**Edit** | Coming soon...
Expand Down
Binary file modified docs/images/ParserClasses.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/Ui.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/helpMessage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ title: Jobby

**Jobby is a desktop application for managing your job application details, specifically organization and recruiter contacts, plus application info and status.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).

* If you are interested in using++, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
* If you are interested about developing++, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
* If you are interested in using Jobby, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
* If you are interested about developing Jobby, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.


**Acknowledgements**
Expand Down
2 changes: 1 addition & 1 deletion docs/team/cj-lee01.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Given below are my contributions to the project.

* **New Feature**:

* **Code contributed**: [RepoSense link]()
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=AY2324S1-CS2103T-W08-3&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=CJ-Lee01&tabRepo=AY2324S1-CS2103T-W08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~other~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)

* **Project management**:

Expand Down
46 changes: 0 additions & 46 deletions docs/team/johndoe.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/team/mcnabry.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Given below are my contributions to the project.
* Highlights: To be added soon.
* Credits: *{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}*

* **Code contributed**: [RepoSense link]()
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=AY2324S1-CS2103T-W08-3&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=McNaBry&tabRepo=AY2324S1-CS2103T-W08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~other~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)

* **Project management**:
* To be added soon.
Expand Down
2 changes: 1 addition & 1 deletion docs/team/tanshiyu1999.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Given below are my contributions to the project.

* **New Feature**:

* **Code contributed**: [RepoSense link]()
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=AY2324S1-CS2103T-W08-3&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=tanshiyu1999&tabRepo=AY2324S1-CS2103T-W08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~other~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)

* **Project management**:

Expand Down
2 changes: 1 addition & 1 deletion docs/team/wamps-jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Given below are my contributions to the project.
* Highlights: To be added soon
* Credits: *{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}*

* **Code contributed**: [RepoSense link]()
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=AY2324S1-CS2103T-W08-3&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=wamps-jp&tabRepo=AY2324S1-CS2103T-W08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~other~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)

* **Project management**:
* To be added soon
Expand Down
2 changes: 1 addition & 1 deletion docs/team/wxwern.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Given below are my contributions to the project.

* **New Feature**: To be added...

* **Code contributed**: [RepoSense link]()
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=AY2324S1-CS2103T-W08-3&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=wxwern&tabRepo=AY2324S1-CS2103T-W08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~other~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)

* **Project management**:
* To be added...
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/seedu/address/logic/commands/ListCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,19 @@ public CommandResult execute(Model model) {
}
return new CommandResult(MESSAGE_SUCCESS_ALL_CONTACTS);
}

@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}

// instanceof handles nulls
if (!(other instanceof ListCommand)) {
return false;
}

ListCommand otherListCommand = (ListCommand) other;
return predicate.equals(otherListCommand.predicate);
}
}
Loading

0 comments on commit 7d5fc92

Please sign in to comment.