summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/config/Config.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/config/Config.java')
-rw-r--r--dozentenmodul/src/main/java/config/Config.java17
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.