
package seedu.geekeep.model;

import java.util.List;
import java.util.Set;

import seedu.geekeep.commons.core.UnmodifiableObservableList;
import seedu.geekeep.commons.exceptions.IllegalValueException;
import seedu.geekeep.model.tag.UniqueTagList;
import seedu.geekeep.model.task.DateTime;
import seedu.geekeep.model.task.ReadOnlyTask;
import seedu.geekeep.model.task.Task;
import seedu.geekeep.model.task.UniqueTaskList;
import seedu.geekeep.model.task.UniqueTaskList.DuplicateTaskException;

public interface Model {
    //@@author A0121658E
    /**
     * Signals that an undo command would fail because there is nothing to undo.
     */
    public static class NothingToUndoException extends Exception {
    }

    /**
     * Signals that an undo command would fail because there is nothing to redo.
     */
    public static class NothingToRedoException extends Exception {
    }

    void addTask(Task task) throws UniqueTaskList.DuplicateTaskException;

    void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;

    /** 
     * @return the configuration object 
     */
    Config getConfig();

    /** 
     * @return the filtered task list as an {@code UnmodifiableObservableList<ReadOnlyTask>} 
     */
    UnmodifiableObservableList<ReadOnlyTask> getFilteredTaskList();
    
    ReadOnlyGeeKeep getGeeKeep();

    /** 
     * Clears existing backing model and replaces with the provided new data. 
     */
    void resetData(ReadOnlyGeeKeep newData);

    /** 
     * 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, time and tags
     * 
     */
    void updateFilteredTaskList(Set<String> keywords, DateTime earlistTime,
            DateTime latestTime, UniqueTagList tags);
    /** Updates the filter of the filtered task list to filter by status of the tasks */
    void updateFilteredTaskListToShowDone();

    /** Updates the filter of the filtered task list to filter by status of the tasks */
    void updateFilteredTaskListToShowUndone();

    /**
     * Updates the task located at {@code filteredTaskListIndex} with {@code updatedTask}.
     *
     * @throws DuplicateTaskException
     *             if updating the task's details causes the task to be equivalent to another existing task in the
     *             list.
     * @throws IllegalValueException
     *             if the task's startDateTime is not matched with a later endDateTime
     * @throws IndexOutOfBoundsException
     *             if {@code filteredTaskListIndex} < 0 or >= the size of the filtered list.
     */
    void updateTask(int filteredTaskListIndex, ReadOnlyTask updatedTask)
            throws UniqueTaskList.DuplicateTaskException, IllegalValueException;

    void markTaskDone(int filteredTaskListIndex);

    void markTaskUndone(int filteredTaskListIndex);
    
    //@@author A0147622H
    String undo() throws NothingToUndoException;

    String redo() throws NothingToRedoException;

    List<String> getCommandHistory();

    void appendCommandHistory(String commandText);

    void updateUndoableCommandHistory(String commandText);

    void setGeekeepFilePath(String filePath);

}


@@ -1040,33 +1040,32 @@
 eption;%0A%0A    /**
- 
 %0A     * @return 
@@ -1088,17 +1088,16 @@
 n object
- 
 %0A     */
@@ -1121,33 +1121,32 @@
 nfig();%0A%0A    /**
- 
 %0A     * @return 
@@ -1222,17 +1222,16 @@
 lyTask%3E%7D
- 
 %0A     */
@@ -1299,20 +1299,16 @@
 List();%0A
-    
 %0A    Rea
@@ -1334,33 +1334,32 @@
 Keep();%0A%0A    /**
- 
 %0A     * Clears e
@@ -1420,17 +1420,16 @@
 ew data.
- 
 %0A     */
@@ -1482,17 +1482,16 @@
 %0A    /**
- 
 %0A     * 
@@ -1552,17 +1552,16 @@
 ll tasks
- 
 %0A     */
@@ -1715,17 +1715,16 @@
 s%0A     *
- 
 %0A     */
@@ -2934,20 +2934,16 @@
 Index);%0A
-    
 %0A    //@

remove trailing spaces