forked from nus-cs2103-AY1617S2/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStorage.java
38 lines (29 loc) · 1.19 KB
/
Storage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package seedu.address.storage;
import java.io.IOException;
import java.util.Optional;
import seedu.address.commons.events.model.AddressBookChangedEvent;
import seedu.address.commons.events.storage.DataSavingExceptionEvent;
import seedu.address.commons.exceptions.DataConversionException;
import seedu.address.model.ReadOnlyAddressBook;
import seedu.address.model.UserPrefs;
/**
* API of the Storage component
*/
public interface Storage extends AddressBookStorage, UserPrefsStorage {
@Override
Optional<UserPrefs> readUserPrefs() throws DataConversionException, IOException;
@Override
void saveUserPrefs(UserPrefs userPrefs) throws IOException;
@Override
String getAddressBookFilePath();
@Override
Optional<ReadOnlyAddressBook> readAddressBook() throws DataConversionException, IOException;
@Override
void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;
/**
* Saves the current version of the Address Book to the hard disk.
* Creates the data file if it is missing.
* Raises {@link DataSavingExceptionEvent} if there was an error during saving.
*/
void handleAddressBookChangedEvent(AddressBookChangedEvent abce);
}