diff options
author | Gerwin Gsenger <g.gsenger@datentechnik-innovation.at> | 2015-01-21 13:51:44 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-06-19 11:08:03 +0200 |
commit | b59207a8718709b7b27570bb02e7d8b942882cb4 (patch) | |
tree | a95328dad4a5e64df1c2fb863c047ba851e6e6fb /id/server/moa-id-commons/src/main/java/at | |
parent | bf1c8cc094a3e2a4d0a53facfeecbf5eb282d9b9 (diff) | |
download | moa-id-spss-b59207a8718709b7b27570bb02e7d8b942882cb4.tar.gz moa-id-spss-b59207a8718709b7b27570bb02e7d8b942882cb4.tar.bz2 moa-id-spss-b59207a8718709b7b27570bb02e7d8b942882cb4.zip |
small change to workings of delete, small bugfix
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.java | 44 |
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); } } |