diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/Config.java')
-rwxr-xr-x | dozentenmodul/src/main/java/org/openslx/dozmod/Config.java | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java b/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java index 6ca1d195..176a5742 100755 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/Config.java @@ -422,7 +422,7 @@ public class Config { * @param mode */ public static void setProxyMode(ProxyMode mode) { - setString("proxy.mode", mode.toString()); + setString("proxy.mode", mode.name()); } /** @@ -439,6 +439,28 @@ public class Config { } /** + * Set the mode in which the ft server is configured. + * + * @param string + */ + public static void setFileTransferMode(String string) { + setString("transfer.type", string); + } + + /** + * Get the mode in which the ft server is configured + * + * @return the saved ft mode, FileTransferMode.AUTO otherwise + */ + public static FileTransferMode getFileTransferMode() { + try { + return FileTransferMode.valueOf(getString("transfer.type", FileTransferMode.PLAIN.name())); + } catch (Exception e) { + return FileTransferMode.PLAIN; + } + } + + /** * Set the LookAndFeel which should be used * * @param value the classname of the LookAndFeel to be used @@ -473,6 +495,10 @@ public class Config { public static String getPreferredLanguage() { return getString("gui.language", null); } + + /* + * Generic helpers + */ /** * Gets the boolean from the given key. @@ -546,8 +572,7 @@ public class Config { /** * Helper class to represent a saved session composed of the satellite - * adress, - * the satellite and master tokens + * address, the satellite and master tokens */ public static class SavedSession { public final String address; @@ -570,5 +595,14 @@ public class Config { SOCKS, HTTP_CONNECT } + + /** + * Enum representing the desired image/VM transfer mode + */ + public enum FileTransferMode { + PLAIN, + SSL, + SSL_ONLY, + } } |