From d428543ba5d7feb0efd187cbf8cfa660789726e3 Mon Sep 17 00:00:00 2001 From: Steffen Ritter Date: Tue, 14 Feb 2023 17:38:22 +0100 Subject: [client] Allow override for remote version check --- dozentenmodul/src/main/java/org/openslx/dozmod/Branding.java | 6 ++++++ .../src/main/java/org/openslx/dozmod/util/ClientVersion.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/Branding.java b/dozentenmodul/src/main/java/org/openslx/dozmod/Branding.java index 7fbcd308..2b086f96 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/Branding.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/Branding.java @@ -43,6 +43,7 @@ public final class Branding { private static final String APPLICATION_NAME = "application.name"; private static final String MASTERSERVER_IDM = "masterserver.idm"; private static final String MASTERSERVER_ADDRESS = "masterserver.address"; + private static final String UPDATESERVER_ADDRESS = "updateserver.address"; private final static String PROPERTIES_FILE = "branding.properties"; private final static Properties PROPERTIES = new Properties(); @@ -62,6 +63,7 @@ public final class Branding { put(CONFIG_DIRECTORY, "bwSuite"); put(SERVICE_EMAIL, "support@bwlehrpool.de"); put(VIRTUALIZER_WEBSITE, "https://www.bwlehrpool.de/doku.php/allgemein/virtualisierer"); + put(UPDATESERVER_ADDRESS, "https://bwlp-masterserver.ruf.uni-freiburg.de/dozmod/"); } }; @@ -160,6 +162,10 @@ public final class Branding { return PROPERTIES.getProperty("proxy.mode", ProxyMode.AUTO.toString()); } + public final static String getUpdateServerAddress() { + return PROPERTIES.getProperty("updateserver.address"); + } + public static void dump(final String localDir) { if (localDir == null || localDir.isEmpty()) return; diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ClientVersion.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ClientVersion.java index 8f265a4c..8426282b 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ClientVersion.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ClientVersion.java @@ -31,7 +31,7 @@ public class ClientVersion { static { loadLocalVersion(); - loadRemoteVersion("https://" + Branding.getMasterServerAddress() + "/dozmod/" + Version.VERSION + "/version.json"); + loadRemoteVersion(Branding.getUpdateServerAddress() + Version.VERSION + "/version.json"); } /** -- cgit v1.2.3-55-g7522