Add new notify type that allows watching of new patch sets

Users can now watch the creation of new patch sets. They get notified
if a new patch set is uploaded, but also if a rebase is done from the
WebUI or the commit message is edited in the WebUI.

Change-Id: Ieabc4c00d2b185e5b452ac43706cb0fdd9d87f77
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-01-06 19:56:01 +01:00
committed by Shawn Pearce
parent 81f2be8cef
commit 1121475d1c
8 changed files with 53 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ import com.google.gwtorm.client.StringKey;
public final class AccountProjectWatch {
public enum NotifyType {
NEW_CHANGES, ALL_COMMENTS, SUBMITTED_CHANGES, ALL
NEW_CHANGES, NEW_PATCHSETS, ALL_COMMENTS, SUBMITTED_CHANGES, ALL
}
public static final String FILTER_ALL = "*";
@@ -109,6 +109,9 @@ public final class AccountProjectWatch {
@Column(id = 4)
protected boolean notifySubmittedChanges;
@Column(id = 5)
protected boolean notifyNewPatchSets;
protected AccountProjectWatch() {
}
@@ -137,6 +140,9 @@ public final class AccountProjectWatch {
case NEW_CHANGES:
return notifyNewChanges;
case NEW_PATCHSETS:
return notifyNewPatchSets;
case ALL_COMMENTS:
return notifyAllComments;
@@ -155,6 +161,10 @@ public final class AccountProjectWatch {
notifyNewChanges = v;
break;
case NEW_PATCHSETS:
notifyNewPatchSets = v;
break;
case ALL_COMMENTS:
notifyAllComments = v;
break;
@@ -165,6 +175,7 @@ public final class AccountProjectWatch {
case ALL:
notifyNewChanges = v;
notifyNewPatchSets = v;
notifyAllComments = v;
notifySubmittedChanges = v;
break;