summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/src/main/java/at/gv/egiz/updater/Constants.java22
-rw-r--r--utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java34
-rw-r--r--utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java23
3 files changed, 72 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 e836bae7..89a75ee0 100644
--- a/utils/src/main/java/at/gv/egiz/updater/Constants.java
+++ b/utils/src/main/java/at/gv/egiz/updater/Constants.java
@@ -1,3 +1,25 @@
+/*
+ * Copyright 2018 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
package at.gv.egiz.updater;
public class Constants {
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 1e1bc6c6..ad8f8d84 100644
--- a/utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java
+++ b/utils/src/main/java/at/gv/egiz/updater/MoccaUpdater.java
@@ -1,3 +1,25 @@
+/*
+ * Copyright 2018 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
package at.gv.egiz.updater;
import java.io.BufferedReader;
@@ -43,10 +65,10 @@ public class MoccaUpdater {
public void run() {
-// if (getMoccaVersionLocal().toLowerCase().equals("unknown")) {
-// // we are finished here
-// return;
-// }
+ if (getMoccaVersionLocal().toLowerCase().equals("unknown")) {
+ // we are finished here
+ return;
+ }
gatherOnlineMoccaVersion();
boolean isOnlineNewer = isOnlineVersionNewer();
@@ -96,11 +118,11 @@ public class MoccaUpdater {
}
+
public static void main(String[] args) {
-
+ // only for testing purposes
MoccaUpdater updater = new MoccaUpdater("1.2.3");
updater.run();
-
}
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 99ff6907..02b80fa7 100644
--- a/utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java
+++ b/utils/src/main/java/at/gv/egiz/updater/NewVersionDialog.java
@@ -1,3 +1,25 @@
+/*
+ * Copyright 2018 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
package at.gv.egiz.updater;
import java.awt.BorderLayout;
@@ -22,7 +44,6 @@ import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.net.URLClassLoader;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;