forked from nus-cs2103-AY1617S1/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStorage.java
More file actions
40 lines (29 loc) · 1.14 KB
/
Storage.java
File metadata and controls
40 lines (29 loc) · 1.14 KB
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
39
40
package seedu.task.storage;
import java.io.IOException;
import java.util.Optional;
import seedu.task.commons.events.model.TaskBookChangedEvent;
import seedu.task.commons.events.storage.DataSavingExceptionEvent;
import seedu.task.commons.exceptions.DataConversionException;
import seedu.task.model.ReadOnlyTaskBook;
import seedu.task.model.UserPrefs;
/**
* API of the Storage component
*/
public interface Storage extends TaskBookStorage, UserPrefsStorage {
@Override
Optional<UserPrefs> readUserPrefs() throws DataConversionException, IOException;
@Override
void saveUserPrefs(UserPrefs userPrefs) throws IOException;
@Override
String getTaskBookFilePath();
@Override
Optional<ReadOnlyTaskBook> readTaskBook() throws DataConversionException,IOException;
@Override
void saveTaskBook(ReadOnlyTaskBook taskBook) throws IOException;
/**
* Saves the current version of the Task Book to the hard disk.
* Creates the data file if it is missing.
* Raises {@link DataSavingExceptionEvent} if there was an error during saving.
*/
void handleTaskBookChangedEvent(TaskBookChangedEvent abce);
}