aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java44
1 files changed, 12 insertions, 32 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java
index d8ac55b4e..e1b51ee9b 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java
@@ -18,8 +18,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
import com.datentechnik.moa.id.conf.persistence.Configuration;
/**
- *
- *
+ * This class is used for writing to the key-value database.
*/
@Component
public class NewConfigurationDBWrite {
@@ -33,61 +32,45 @@ public class NewConfigurationDBWrite {
}
private static boolean saveAuthComponentGeneral(AuthComponentGeneral dbo) {
-
- conf.set(MOAIDConfigurationConstants.AUTH_COMPONENT_GENERAL_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.AUTH_COMPONENT_GENERAL_KEY, dbo);
}
private static boolean saveChainingModes(ChainingModes dbo) {
- conf.set(MOAIDConfigurationConstants.CHAINING_MODES_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.CHAINING_MODES_KEY, dbo);
}
private static boolean saveOnlineApplication(OnlineApplication dbo) {
List<OnlineApplication> storedObjects = conf.getList(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, OnlineApplication.class);
storedObjects.add(dbo);
- conf.set(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, storedObjects);
-
- return true;
+ return conf.set(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, storedObjects);
}
private static boolean saveGenericConfiguration(GenericConfiguration dbo) {
List<GenericConfiguration> storedObjects = conf.getList(MOAIDConfigurationConstants.GENERIC_CONFIGURATION_KEY, GenericConfiguration.class);
storedObjects.add(dbo);
- conf.set(MOAIDConfigurationConstants.GENERIC_CONFIGURATION_KEY, storedObjects);
- return true;
+ return conf.set(MOAIDConfigurationConstants.GENERIC_CONFIGURATION_KEY, storedObjects);
}
private static boolean saveTrustedCACertificates(String dbo) {
-
- conf.set(MOAIDConfigurationConstants.TRUSTED_CERTIFICATES_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.TRUSTED_CERTIFICATES_KEY, dbo);
}
private static boolean saveDefaultBKUs(DefaultBKUs dbo) {
-
- conf.set(MOAIDConfigurationConstants.DEFAULT_BKUS_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.DEFAULT_BKUS_KEY, dbo);
}
private static boolean saveSLRequestTemplates(SLRequestTemplates dbo) {
-
- conf.set(MOAIDConfigurationConstants.SLREQUEST_TEMPLATES_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.SLREQUEST_TEMPLATES_KEY, dbo);
}
private static boolean saveTimeStampItem(Date dbo) {
-
- conf.set(MOAIDConfigurationConstants.TIMESTAMP_ITEM_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.TIMESTAMP_ITEM_KEY, dbo);
}
private static boolean savePvp2RefreshItem(Date dbo) {
-
- conf.set(MOAIDConfigurationConstants.PVP2REFRESH_ITEM_KEY, dbo);
- return true;
+ return conf.set(MOAIDConfigurationConstants.PVP2REFRESH_ITEM_KEY, dbo);
}
/**
@@ -96,9 +79,7 @@ public class NewConfigurationDBWrite {
* @return {@code true} on success; {@code false} otherwise.
*/
public static boolean saveOnlineApplications(List<OnlineApplication> oas) {
-
- conf.set(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, oas);
- return true;
+ return conf.set(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, oas);
}
/**
@@ -107,7 +88,6 @@ public class NewConfigurationDBWrite {
* @return {@code true} on success; {@code false} otherwise.
*/
public static boolean saveGenericConfigurations(List<GenericConfiguration> gcs) {
-
return conf.set(MOAIDConfigurationConstants.GENERIC_CONFIGURATION_KEY, gcs);
}
@@ -151,7 +131,7 @@ public class NewConfigurationDBWrite {
* @param key the key
*/
public static void delete(String key) {
- conf.delete(key);
+ conf.set(key, null);
}
}