summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-09-03 15:42:46 +0200
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-09-03 15:42:46 +0200
commit52bec2993a9996582568d5d131ed90d44f7844f1 (patch)
treebc56148d30665b824d45d2e08a280d2f5ff469ad
parent020a695f450f59d41c966bfb2b6d96efdd2c8aae (diff)
downloadmocca-52bec2993a9996582568d5d131ed90d44f7844f1.tar.gz
mocca-52bec2993a9996582568d5d131ed90d44f7844f1.tar.bz2
mocca-52bec2993a9996582568d5d131ed90d44f7844f1.zip
Update check mechanism updated to new URL
-rw-r--r--utils/src/main/java/at/gv/egiz/updater/Constants.java11
-rw-r--r--utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java4
-rw-r--r--utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java2
3 files changed, 10 insertions, 7 deletions
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());
}