diff options
author | Jonathan Bauer | 2019-01-31 16:22:50 +0100 |
---|---|---|
committer | Jonathan Bauer | 2019-01-31 16:22:50 +0100 |
commit | e025340c3e3056ca050b52ad05271a43846a2642 (patch) | |
tree | 733ca7ea725a84f5870827f7e89e3f9c08b59680 /dozentenmodul/src/main/java/org/openslx/dozmod/util | |
parent | [*] Fix accidental use of Boolean.getBoolean. (-> .parseBoolean()) (diff) | |
download | tutor-module-e025340c3e3056ca050b52ad05271a43846a2642.tar.gz tutor-module-e025340c3e3056ca050b52ad05271a43846a2642.tar.xz tutor-module-e025340c3e3056ca050b52ad05271a43846a2642.zip |
[client] introduce branding, --dump and --pack
Application name, service name, master server endpoints, documentation
websites needed to be configurable to allow for an easy rebranding of
the suite.
Two new options allow this: use '--dump <folder>' to dump the jar's
configurable files into that folder. Aside from text templates in 'txt',
logos and icons in 'img', the 'branding.properties' file contains:
* masterserver.address : self-explanatory
* application.name : name to be shown on graphical elements like the
main window
* service.name : name to be used as a prefix for formulation like
'bwLehrpool-Team' or 'bwLehrpool-System' etc
* service.faq.website : link to FAQ website
* service.email : support contact address
Once edited, the whole folder can be integrated into the Suite with
'--pack <folder> <new_jar>'. The path to the new jar is then the
rebranded version of the suite.
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/util')
3 files changed, 8 insertions, 7 deletions
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 5ed1fe5d..365d1796 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ClientVersion.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ClientVersion.java @@ -14,6 +14,7 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.log4j.Logger; import org.openslx.dozmod.App; +import org.openslx.dozmod.Branding; import org.openslx.sat.thrift.version.Version; import org.openslx.util.Json; @@ -30,7 +31,7 @@ public class ClientVersion { static { loadLocalVersion(); - loadRemoteVersion("https://bwlp-masterserver.ruf.uni-freiburg.de/dozmod/" + Version.VERSION + "/version.json"); + loadRemoteVersion("https://" + Branding.getMasterServerAddress() + "/dozmod/" + Version.VERSION + "/version.json"); } /** @@ -80,7 +81,7 @@ public class ClientVersion { } /** - * Checks if we are running latest bwLehrpool-Suite version + * Checks if we are running latest application version * * @return true if there is no newer version, false otherwise */ diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/DesktopEnvironment.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/DesktopEnvironment.java index 4a6528a3..f08ef14b 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/DesktopEnvironment.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/DesktopEnvironment.java @@ -8,6 +8,8 @@ import java.net.URLEncoder; import java.util.Arrays; import org.apache.log4j.Logger; +import org.openslx.dozmod.App; +import org.openslx.dozmod.Branding; public class DesktopEnvironment { @@ -17,13 +19,12 @@ public class DesktopEnvironment { private final static Logger LOGGER = Logger.getLogger(DesktopEnvironment.class); private static final Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; - public static enum Link { - FAQ("https://www.bwlehrpool.de/"), + FAQ(Branding.getServiceFAQWebsite()), VMWARE("https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0"), //INTRO("http://www.hs-offenburg.de/fileadmin/Einrichtungen/hrz/Projekte/bwLehrpool/3_bwLehrpool_-_Image_einbinden_und_starten.pdf"), - DOZMOD("https://bwlp-masterserver.ruf.uni-freiburg.de/dozmod/"), - REGISTER_BWIDM("https://bwlp-masterserver.ruf.uni-freiburg.de/webif/"); + DOZMOD("https://" + App.getMasterServerAddress() + "/dozmod/"), + REGISTER_BWIDM("https://" + App.getMasterServerAddress() + "/webif/"); public final URI uri; diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java index 5b43c30c..d03bafb0 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java @@ -172,5 +172,4 @@ public class ResourceLoader iconCache.put( icon, scaledIcon ); return scaledIcon; } - } |