forked from nusCS2113-AY1819S1/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
569 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/seedu/address/commons/events/model/ExpenseBookLocalRestoreEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//@@author QzSG | ||
package seedu.address.commons.events.model; | ||
|
||
import seedu.address.commons.events.BaseEvent; | ||
import seedu.address.model.ReadOnlyExpenseBook; | ||
|
||
/** Indicates a AddressBook restore request*/ | ||
public class ExpenseBookLocalRestoreEvent extends BaseEvent { | ||
|
||
public final ReadOnlyExpenseBook readOnlyExpenseBook; | ||
|
||
public ExpenseBookLocalRestoreEvent(ReadOnlyExpenseBook readOnlyExpenseBook) { | ||
this.readOnlyExpenseBook = readOnlyExpenseBook; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Restoring local backup from " + readOnlyExpenseBook.toString(); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/seedu/address/commons/events/model/ExpenseBookOnlineRestoreEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//@@author QzSG | ||
package seedu.address.commons.events.model; | ||
|
||
import seedu.address.commons.events.BaseEvent; | ||
import seedu.address.model.ReadOnlyExpenseBook; | ||
|
||
/** Indicates a ExpenseBook online restore request*/ | ||
public class ExpenseBookOnlineRestoreEvent extends BaseEvent { | ||
|
||
public final ReadOnlyExpenseBook data; | ||
|
||
public ExpenseBookOnlineRestoreEvent(ReadOnlyExpenseBook data) { | ||
this.data = data; | ||
} | ||
@Override | ||
public String toString() { | ||
return "Restoring online backup"; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/seedu/address/commons/events/model/UserPrefsChangedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package seedu.address.commons.events.model; | ||
|
||
import seedu.address.commons.events.BaseEvent; | ||
import seedu.address.model.UserPrefs; | ||
|
||
/** Indicates the AddressBook in the model has changed*/ | ||
public class UserPrefsChangedEvent extends BaseEvent { | ||
|
||
public final UserPrefs data; | ||
|
||
public UserPrefsChangedEvent(UserPrefs data) { | ||
this.data = data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "User Prefs Update\n" + data.toString(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/seedu/address/commons/events/storage/LocalRestoreEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package seedu.address.commons.events.storage; | ||
|
||
import java.nio.file.Path; | ||
|
||
import seedu.address.commons.events.BaseEvent; | ||
|
||
//@@author QzSG | ||
|
||
/** Indicates a request for local restore*/ | ||
public class LocalRestoreEvent extends BaseEvent { | ||
|
||
public final Path addressBookPath; | ||
public final Path expenseBookPath; | ||
|
||
public LocalRestoreEvent(Path addressBookPath, Path expenseBookPath) { | ||
this.addressBookPath = addressBookPath; | ||
this.expenseBookPath = expenseBookPath; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Restoring local backup"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/seedu/address/commons/events/storage/OnlineBackupSuccessResultEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package seedu.address.commons.events.storage; | ||
|
||
import seedu.address.commons.events.BaseEvent; | ||
import seedu.address.model.UserPrefs; | ||
import seedu.address.storage.OnlineStorage; | ||
|
||
//@@author QzSG | ||
|
||
/** Indicates a request for online backup*/ | ||
public class OnlineBackupSuccessResultEvent extends BaseEvent { | ||
|
||
public final OnlineStorage.Type target; | ||
public final UserPrefs.TargetBook targetBook; | ||
public final String ref; | ||
|
||
public OnlineBackupSuccessResultEvent(OnlineStorage.Type target, UserPrefs.TargetBook targetBook, String ref) { | ||
this.target = target; | ||
this.targetBook = targetBook; | ||
this.ref = ref; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Signaling user preference update with success reference from specific online service"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.