diff options
| author | Jonathan Bauer | 2014-09-10 14:54:40 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-09-10 14:54:40 +0200 |
| commit | 61e8e600dd1c9d6066711dfb9874e0117b87baf6 (patch) | |
| tree | c5321291edcc9286fbe75f1cbf1a0548fb78da1d /Dozentenmodul/src/main/java/models/Links.java | |
| parent | Merge branch 'maven' of git.openslx.org:openslx-ng/tutor-module into maven (diff) | |
| download | tutor-module-61e8e600dd1c9d6066711dfb9874e0117b87baf6.tar.gz tutor-module-61e8e600dd1c9d6066711dfb9874e0117b87baf6.tar.xz tutor-module-61e8e600dd1c9d6066711dfb9874e0117b87baf6.zip | |
mavenization v2
Diffstat (limited to 'Dozentenmodul/src/main/java/models/Links.java')
| -rw-r--r-- | Dozentenmodul/src/main/java/models/Links.java | 146 |
1 files changed, 8 insertions, 138 deletions
diff --git a/Dozentenmodul/src/main/java/models/Links.java b/Dozentenmodul/src/main/java/models/Links.java index 693fbb3e..80e3182e 100644 --- a/Dozentenmodul/src/main/java/models/Links.java +++ b/Dozentenmodul/src/main/java/models/Links.java @@ -1,161 +1,31 @@ package models; -import java.awt.Desktop; -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; - public class Links { private static String FAQ = "http://bwlehrpool.hs-offenburg.de/"; - private static String OTRS = "https://bwlehrpool-otrs.rz.hs-offenburg.de/otrs/customer.pl"; + private static String OTRS = "http://bwlehrpool.hs-offenburg.de/"; private static String uriWindows = "https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; private static String uriLinux = "https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; + private static String AnleitungVMDK = "http://www.hs-offenburg.de/fileadmin/Einrichtungen/hrz/Projekte/bwLehrpool/3_bwLehrpool_-_Image_einbinden_und_starten.pdf"; public static String getFAQ() { return FAQ; } + public static String getAnleitungVMDK(){ + return AnleitungVMDK; + } + public static String getOTRS() { return OTRS; } - public static void openFAQ() { - - String faq = FAQ; - Runtime rt = Runtime.getRuntime(); - String os = System.getProperty("os.name"); - - try { - - - if (os.indexOf( "Win" ) >= 0) { - - rt.exec( "rundll32 url.dll,FileProtocolHandler " + faq); - - } else if (os.indexOf( "Mac" ) >= 0) { - - rt.exec( "open " + faq); - - } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { - - // Do a best guess on unix until we get a platform independent way - // Build a list of browsers to try, in this order. - String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror", - "netscape","opera","links","lynx"}; - - StringBuffer cmd = new StringBuffer(); - for (int i=0; i<browsers.length; i++) - cmd.append( (i==0 ? "" : " || " ) + browsers[i] +" \"" + faq + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - if (os.indexOf("Win") >= 0) { - - // this doesn't support showing urls in the form of - // "page.html#nameLink" - rt.exec("rundll32 url.dll,FileProtocolHandler " + faq); - - } else if (os.indexOf("Mac") >= 0) { - - rt.exec("open " + faq); - - } else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) { - - // Do a best guess on unix until we get a platform independent - // way - // Build a list of browsers to try, in this order. - String[] browsers = { "epiphany", "firefox", "mozilla", - "konqueror", "netscape", "opera", "links", "lynx" }; - - // Build a command string which looks like - // "browser1 "url" || browser2 "url" ||..." - StringBuffer cmd = new StringBuffer(); - for (int i = 0; i < browsers.length; i++) - cmd.append((i == 0 ? "" : " || ") + browsers[i] + " \"" - + faq + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - public static void openOTRS() { - - String otrs = OTRS; - Runtime rt = Runtime.getRuntime(); - String os = System.getProperty("os.name"); - - try { - - if (os.indexOf( "Win" ) >= 0) { - - rt.exec( "rundll32 url.dll,FileProtocolHandler " + otrs); - - } else if (os.indexOf( "Mac" ) >= 0) { - - rt.exec( "open " + otrs); - - } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { - - String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror", - "netscape","opera","links","lynx"}; - - StringBuffer cmd = new StringBuffer(); - for (int i=0; i<browsers.length; i++) - cmd.append( (i==0 ? "" : " || " ) + browsers[i] +" \"" + otrs + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - if (os.indexOf("Win") >= 0) { - - // this doesn't support showing urls in the form of - // "page.html#nameLink" - rt.exec("rundll32 url.dll,FileProtocolHandler " + otrs); - - } else if (os.indexOf("Mac") >= 0) { - - rt.exec("open " + otrs); - - } else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) { - - // Do a best guess on unix until we get a platform independent - // way - // Build a list of browsers to try, in this order. - String[] browsers = { "epiphany", "firefox", "mozilla", - "konqueror", "netscape", "opera", "links", "lynx" }; - - // Build a command string which looks like - // "browser1 "url" || browser2 "url" ||..." - StringBuffer cmd = new StringBuffer(); - for (int i = 0; i < browsers.length; i++) - cmd.append((i == 0 ? "" : " || ") + browsers[i] + " \"" - + otrs + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - public static String getUriWindows() { return uriWindows; } public static String getUriLinux() { return uriLinux; - } + } -} +}// end class |
