diff options
| author | Nino Breuer | 2015-05-20 17:08:08 +0200 |
|---|---|---|
| committer | Nino Breuer | 2015-05-20 17:08:08 +0200 |
| commit | 1d8ef80202ebaeba26ce7996fb97c226baaa6be8 (patch) | |
| tree | 661f7a3dfd372cc8f5ba1c36816708b2d4f74787 /dozentenmodul/src/main/java/config | |
| parent | [client] GuiManager class cleanup + bundled priv/pub functions... (diff) | |
| download | tutor-module-1d8ef80202ebaeba26ce7996fb97c226baaa6be8.tar.gz tutor-module-1d8ef80202ebaeba26ce7996fb97c226baaa6be8.tar.xz tutor-module-1d8ef80202ebaeba26ce7996fb97c226baaa6be8.zip | |
• fixed Bug whereas Lectures weren't editable anymore due to date-parsing error
• IdP is stored in config file, default 0. should IdP-Authentication be default now?
• Fixed bug: version number was replaced by "unknown".. it is unknown, why that happened :)
• Optimized view for additional contacts in images
Diffstat (limited to 'dozentenmodul/src/main/java/config')
| -rw-r--r-- | dozentenmodul/src/main/java/config/Config.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/config/Config.java b/dozentenmodul/src/main/java/config/Config.java index 547e0ad5..e6686a60 100644 --- a/dozentenmodul/src/main/java/config/Config.java +++ b/dozentenmodul/src/main/java/config/Config.java @@ -71,7 +71,7 @@ public class Config { if (!(configPath.isEmpty()||configPath == null)) { configFile = new File(configPath); } else { - throw new IOException("Konnte kein Pfad für die Konfigurationsdatei ermitteln."); + throw new IOException("Konnte keinen Pfad für die Konfigurationsdatei ermitteln."); } // Check if the directory exists. @@ -99,6 +99,7 @@ public class Config { ini.put("main", "Benutzername", ""); ini.put("main", "Letzter Downloadpfad", ""); ini.put("main", "Letzter Uploadpfad", ""); + ini.put("main", "IdP", ""); ini.store(); } else { @@ -163,6 +164,13 @@ public class Config { else return null; } + /** + * Query the IdP of the configuration file + * @return stored IdP + */ + public static int getIdP() { + return Integer.parseInt(getString("main", "IdP", "")); + } /** * Sets the value of 'BillOfRights' in the configuration file to 'value' @@ -206,6 +214,13 @@ public class Config { public static boolean setLastUploadPath(String value) { return setString("main", "Letzter Uploadpfad", value); } + /** + * Sets the value of "IdP" in the configuration file to 'value' + * @return true if it succeeded, false otherwise + */ + public static boolean setIdP(String value) { + return setString("main", "IdP", value); + } /** * Save the changes to the ini file to actual file on the disk. |
