Skip to content

Commit

Permalink
Merge pull request #142 from uberSaiyan/remove-person
Browse files Browse the repository at this point in the history
Remove Person code
  • Loading branch information
zhixianggg authored Nov 5, 2019
2 parents 43bb04f + 2c220de commit 7a75383
Show file tree
Hide file tree
Showing 86 changed files with 74 additions and 4,638 deletions.
6 changes: 2 additions & 4 deletions src/main/java/seedu/address/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
import seedu.address.model.schedule.Schedule;
import seedu.address.statistic.Statistic;
import seedu.address.statistic.StatisticManager;
import seedu.address.storage.AddressBookStorage;
import seedu.address.storage.CustomerBookStorage;
import seedu.address.storage.JsonAddressBookStorage;
import seedu.address.storage.JsonCustomerBookStorage;
import seedu.address.storage.JsonOrderBookStorage;
import seedu.address.storage.JsonPhoneBookStorage;
Expand Down Expand Up @@ -76,13 +74,13 @@ public void init() throws Exception {

UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath());
UserPrefs userPrefs = initPrefs(userPrefsStorage);
AddressBookStorage addressBookStorage = new JsonAddressBookStorage(userPrefs.getAddressBookFilePath());
CustomerBookStorage customerBookStorage = new JsonCustomerBookStorage(userPrefs.getCustomerBookFilePath());
PhoneBookStorage phoneBookStorage = new JsonPhoneBookStorage(userPrefs.getPhoneBookFilePath());
ScheduleBookStorage scheduleBookStorage = new JsonScheduleBookStorage(userPrefs.getScheduleBookFilePath());
OrderBookStorage orderBookStorage = new JsonOrderBookStorage(userPrefs.getOrderBookFilePath());

OrderBookStorage archivedOrderBookStorage = new JsonOrderBookStorage(userPrefs.getArchivedOrderBookFilePath());
storage = new StorageManager(addressBookStorage, customerBookStorage, phoneBookStorage, scheduleBookStorage,
storage = new StorageManager(customerBookStorage, phoneBookStorage, scheduleBookStorage,
orderBookStorage, archivedOrderBookStorage, userPrefsStorage);

initLogging(config);
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/seedu/address/logic/Logic.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
package seedu.address.logic;

import java.nio.file.Path;

import javafx.collections.ObservableList;
import javafx.scene.chart.XYChart;
import seedu.address.commons.core.GuiSettings;
import seedu.address.logic.commands.CommandResult;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.CalendarDate;
import seedu.address.model.ReadOnlyAddressBook;
import seedu.address.model.ReadOnlyDataBook;
import seedu.address.model.customer.Customer;
import seedu.address.model.order.Order;
import seedu.address.model.person.Person;
import seedu.address.model.phone.Phone;
import seedu.address.model.schedule.Schedule;
import seedu.address.statistic.StatsPayload;
Expand All @@ -31,13 +27,6 @@ public interface Logic {
*/
CommandResult execute(String commandText) throws CommandException, ParseException;

/**
* Returns the AddressBook.
*
* @see seedu.address.model.Model#getAddressBook()
*/
ReadOnlyAddressBook getAddressBook();

/**
* Returns the Order DataBook.
*
Expand All @@ -59,9 +48,6 @@ public interface Logic {
*/
ReadOnlyDataBook<Phone> getPhoneBook();

/** Returns an unmodifiable view of the filtered list of persons */
ObservableList<Person> getFilteredPersonList();

/** Returns an unmodifiable view of the filtered list of customers */
ObservableList<Customer> getFilteredCustomerList();

Expand All @@ -79,11 +65,6 @@ public interface Logic {



/**
* Returns the user prefs' address book file path.
*/
Path getAddressBookFilePath();

/**
* Returns the user prefs' GUI settings.
*/
Expand Down
18 changes: 0 additions & 18 deletions src/main/java/seedu/address/logic/LogicManager.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package seedu.address.logic;

import java.io.IOException;
import java.nio.file.Path;
import java.util.logging.Logger;

import javafx.collections.ObservableList;
Expand All @@ -15,11 +14,9 @@
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.CalendarDate;
import seedu.address.model.Model;
import seedu.address.model.ReadOnlyAddressBook;
import seedu.address.model.ReadOnlyDataBook;
import seedu.address.model.customer.Customer;
import seedu.address.model.order.Order;
import seedu.address.model.person.Person;
import seedu.address.model.phone.Phone;
import seedu.address.model.schedule.Schedule;
import seedu.address.statistic.Statistic;
Expand Down Expand Up @@ -73,11 +70,6 @@ public CommandResult execute(String commandText) throws CommandException, ParseE
return commandResult;
}

@Override
public ReadOnlyAddressBook getAddressBook() {
return model.getAddressBook();
}

@Override
public ReadOnlyDataBook<Order> getOrderBook() {
return model.getOrderBook();
Expand All @@ -93,11 +85,6 @@ public ReadOnlyDataBook<Phone> getPhoneBook() {
return model.getPhoneBook();
}

@Override
public ObservableList<Person> getFilteredPersonList() {
return model.getFilteredPersonList();
}

@Override
public ObservableList<Customer> getFilteredCustomerList() {
return model.getFilteredCustomerList(); }
Expand All @@ -122,11 +109,6 @@ public ObservableList<Order> getFilteredArchivedOrderList() {
public ObservableList<Schedule> getFilteredScheduleList() {
return model.getFilteredScheduleList(); }

@Override
public Path getAddressBookFilePath() {
return model.getAddressBookFilePath();
}

@Override
public GuiSettings getGuiSettings() {
return model.getGuiSettings();
Expand Down
25 changes: 0 additions & 25 deletions src/main/java/seedu/address/logic/commands/ClearCommand.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class AddCustomerCommand extends UndoableCommand {
private final Customer toAdd;

/**
* Creates an AddCommand to add the specified {@code Customer}
* Creates an AddCustomerCommand to add the specified {@code Customer}
*/
public AddCustomerCommand(Customer customer) {
requireNonNull(customer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class AddOrderCommand extends UndoableCommand {
private final Set<Tag> toAddTags;

/**
* Creates an AddCommand to add the specified {@code Order}
* Creates an AddOrderCommand to add the specified {@code Order}
*/
public AddOrderCommand(Index customerIndex, Index phoneIndex, Price price, Set<Tag> tags) {
requireNonNull(customerIndex);
Expand Down

This file was deleted.

Loading

0 comments on commit 7a75383

Please sign in to comment.