Rename PreferencesConfig/WatchConfig to Preferences/ProjectWatches

We use the naming pattern *Config mostly for subclasses of
VersionedMetaData. Since PreferencesConfig/WatchConfig are no subclasses
of VersionedMetaData the "Config" suffix may be confusing, especially in
contrast to AccountConfig which *is* a subclass of VersionedMetaData.

Change-Id: Ib24ef1358ec3cae31d817caf6e2af8c8da2623f8
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2018-01-17 16:37:48 +01:00
parent 1915fce081
commit 4c7c61defd
37 changed files with 107 additions and 105 deletions

View File

@@ -19,9 +19,9 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableSet;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.account.WatchConfig.NotifyType;
import com.google.gerrit.server.account.WatchConfig.NotifyValue;
import com.google.gerrit.server.account.WatchConfig.ProjectWatchKey;
import com.google.gerrit.server.account.ProjectWatches.NotifyType;
import com.google.gerrit.server.account.ProjectWatches.NotifyValue;
import com.google.gerrit.server.account.ProjectWatches.ProjectWatchKey;
import com.google.gerrit.server.git.ValidationError;
import java.util.ArrayList;
import java.util.EnumSet;
@@ -54,7 +54,7 @@ public class WatchConfigTest implements ValidationError.Sink {
+ " notify = [NEW_PATCHSETS]\n"
+ " notify = * [NEW_PATCHSETS, ALL_COMMENTS]\n");
Map<ProjectWatchKey, ImmutableSet<NotifyType>> projectWatches =
WatchConfig.parse(new Account.Id(1000000), cfg, this);
ProjectWatches.parse(new Account.Id(1000000), cfg, this);
assertThat(validationErrors).isEmpty();
@@ -87,7 +87,7 @@ public class WatchConfigTest implements ValidationError.Sink {
+ "[project \"otherProject\"]\n"
+ " notify = [NEW_PATCHSETS]\n");
WatchConfig.parse(new Account.Id(1000000), cfg, this);
ProjectWatches.parse(new Account.Id(1000000), cfg, this);
assertThat(validationErrors).hasSize(1);
assertThat(validationErrors.get(0).getMessage())
.isEqualTo(