From 52bec2993a9996582568d5d131ed90d44f7844f1 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 3 Sep 2020 15:42:46 +0200 Subject: Update check mechanism updated to new URL --- utils/src/main/java/at/gv/egiz/updater/Constants.java | 11 +++++++---- utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java | 4 ++-- utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'utils/src') diff --git a/utils/src/main/java/at/gv/egiz/updater/Constants.java b/utils/src/main/java/at/gv/egiz/updater/Constants.java index 930499da..60b914c2 100644 --- a/utils/src/main/java/at/gv/egiz/updater/Constants.java +++ b/utils/src/main/java/at/gv/egiz/updater/Constants.java @@ -24,10 +24,13 @@ package at.gv.egiz.updater; public class Constants { - public static final String WEBSTART_URL = "https://webstart.buergerkarte.at/"; - public static final String MOCCA_STR = "mocca/"; - public static final String VERSION_FILE = "Release.txt"; - public static final String PATH_TO_VERSION_FILE = WEBSTART_URL + MOCCA_STR + VERSION_FILE; + //public static final String WEBSTART_URL = "https://webstart.buergerkarte.at/"; + //public static final String MOCCA_STR = "mocca/"; + //public static final String VERSION_FILE = "Release.txt"; + //public static final String PATH_TO_VERSION_FILE = WEBSTART_URL + MOCCA_STR + VERSION_FILE; + public static final String DOWNLOAD_URL = "https://technology.a-sit.at/en/mocca/"; + public static final String VERSION_FILE_URL = "https://updates.a-sit.at/mocca/Release.txt"; + } diff --git a/utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java b/utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java index ad8f8d84..4e2cbcd8 100644 --- a/utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java +++ b/utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java @@ -81,8 +81,8 @@ public class MoccaUpdater { private void gatherOnlineMoccaVersion() { try { log.info("Requesting Mocca Online Version"); - URL url = new URL(Constants.PATH_TO_VERSION_FILE); - log.debug("Going to GET mocca Version from: " + Constants.PATH_TO_VERSION_FILE); + URL url = new URL(Constants.VERSION_FILE_URL); + log.debug("Going to GET mocca Version from: " + Constants.VERSION_FILE_URL); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); diff --git a/utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java b/utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java index 674d8339..64cef7f4 100644 --- a/utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java +++ b/utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java @@ -165,7 +165,7 @@ public class NewVersionDialog extends JDialog { private void openLink() { if (Desktop.isDesktopSupported()) { try { - Desktop.getDesktop().browse(new URI(Constants.WEBSTART_URL+Constants.MOCCA_STR)); + Desktop.getDesktop().browse(new URI(Constants.DOWNLOAD_URL)); } catch (IOException | URISyntaxException e) { log.error(e.getMessage()); } -- cgit v1.2.3