FUS: move dictionary service to event log settings service

This commit is contained in:
Svetlana.Zemlyanskaya
2019-01-18 19:38:30 +01:00
parent ba8a257a9e
commit 21c8e801ec
2 changed files with 12 additions and 1 deletions
@@ -9,6 +9,7 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.BuildNumber;
import com.intellij.util.ArrayUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.Set;
@@ -16,6 +17,7 @@ import java.util.Set;
public class EventLogExternalSettingsService extends SettingsConnectionService implements EventLogSettingsService {
private static final Logger LOG = Logger.getInstance("com.intellij.internal.statistic.eventLog.EventLogExternalSettingsService");
private static final String APPROVED_GROUPS_SERVICE = "white-list-service";
private static final String DICTIONARY_SERVICE = "dictionary-service";
private static final String PERCENT_TRAFFIC = "percent-traffic";
public static EventLogExternalSettingsService getInstance() {
@@ -29,7 +31,7 @@ public class EventLogExternalSettingsService extends SettingsConnectionService i
@NotNull
@Override
public String[] getAttributeNames() {
return ArrayUtil.mergeArrays(super.getAttributeNames(), PERCENT_TRAFFIC, APPROVED_GROUPS_SERVICE);
return ArrayUtil.mergeArrays(super.getAttributeNames(), PERCENT_TRAFFIC, APPROVED_GROUPS_SERVICE, DICTIONARY_SERVICE);
}
@Override
@@ -46,6 +48,12 @@ public class EventLogExternalSettingsService extends SettingsConnectionService i
return 0;
}
@Override
@Nullable
public String getDictionaryServiceUrl() {
return getSettingValue(DICTIONARY_SERVICE);
}
@NotNull
public Set<String> getApprovedGroups() {
return getWhitelistedGroups();
@@ -9,6 +9,9 @@ public interface EventLogSettingsService {
@Nullable
String getServiceUrl();
@Nullable
String getDictionaryServiceUrl();
int getPermittedTraffic();
@NotNull