forked from nus-cs2103-AY1617S1/addressbook-level4
/
Model.java
92 lines (72 loc) · 2.23 KB
/
Model.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package seedu.task.model;
import java.util.Set;
import seedu.task.commons.core.UnmodifiableObservableList;
import seedu.task.logic.commands.Command;
import seedu.task.model.task.ReadOnlyTask;
import seedu.task.model.task.Task;
import seedu.task.model.task.UniqueTaskList;
/**
* The API of the Model component.
*/
public interface Model {
/**
* Clears existing backing model and replaces with the provided new data.
*/
void resetData(ReadOnlyTaskManager newData);
/** Returns the TaskManager */
ReadOnlyTaskManager getTaskManager();
/** Deletes the given task. */
void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;
// @@author A0148083A
/** Complete the given task. */
void completeTask(ReadOnlyTask target, ReadOnlyTask toBeComplete) throws UniqueTaskList.TaskNotFoundException;
// @@author
// @@author A0139932X
void changeFilePath();
// @@author
/** Adds the given task */
void addTask(Task task) throws UniqueTaskList.DuplicateTaskException;
/**
* Adds the given task at specified index of the list in the data, not the
* index shown to the user
*/
void addTaskWithSpecifiedIndex(Task task, int index) throws UniqueTaskList.DuplicateTaskException;
/**
* Returns the filtered task list as an
* {@code UnmodifiableObservableList<ReadOnlyTask>}
*/
UnmodifiableObservableList<ReadOnlyTask> getFilteredTaskList();
/** Updates the filter of the filtered task list to show all tasks */
void updateFilteredListToShowAll();
/**
* Updates the filter of the filtered task list to filter by the given
* keywords
*/
void updateFilteredTaskList(Set<String> keywords);
// @@author A0153411W
/** Add executed reversible command for undo operation */
void addCommandForUndo(Command command);
/**
* Add user inputed command to command manager for history
*/
void addCommandForHistory(String commandText);
/**
* Get history of executed user's commands
*/
String getCommandHistory();
/**
* Get last executed reversible command
* return Command
*/
Command getCommandForUndo();
/**
* Remove command from undo stack
* return Command
*/
void removeCommandForUndo();
/**
* Get last undo command for redo operation
*/
Command getCommandForRedo();
// @@author
}