diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-07-17 11:15:50 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-07-17 11:15:50 +0200 |
commit | cb56ed963a635ff718e1024492b6f3875150297d (patch) | |
tree | cb81d24dcd76ef4b029be07e13ffdecf4b5c67e6 /id/moa-id-webgui/src/main/java/at/gv/egovernment | |
parent | 04a7d51aa7b1ba3909f05ae36b7e54e4dabe22e1 (diff) | |
download | moa-id-spss-cb56ed963a635ff718e1024492b6f3875150297d.tar.gz moa-id-spss-cb56ed963a635ff718e1024492b6f3875150297d.tar.bz2 moa-id-spss-cb56ed963a635ff718e1024492b6f3875150297d.zip |
fix problem with delete list elements in GUI
Diffstat (limited to 'id/moa-id-webgui/src/main/java/at/gv/egovernment')
2 files changed, 25 insertions, 16 deletions
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java index 0ec230324..80ee9d8c1 100644 --- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java +++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java @@ -219,19 +219,7 @@ public class MOAIDConfigurationModul implements ConfigurationModul{ } //delete all unused keys - logger.debug("Delete {} keys pairs from configuration", deleted.size()); - Iterator<String> deleteInterator = deleted.iterator(); - while (deleteInterator.hasNext()) { - String el = deleteInterator.next(); - try { - config.deleteIds(el); - logger.trace("Delete key {}", el); - - } catch (ConfigurationException e) { - logger.error("Delete key: " + el + " FAILED.", e); - - } - } + deleteEntries(deleted); } catch (Exception e) { logger.warn("Configuration post-processing FAILED.", e); @@ -239,13 +227,34 @@ public class MOAIDConfigurationModul implements ConfigurationModul{ } + + } else if (deleted != null && deleted.size() > 0) { + deleteEntries(deleted); + } else { - logger.info("Configuration saving process finished: No key/value pairs found."); + logger.info("Configuration saving process finished without operations: No key/value pairs found."); } } + private void deleteEntries(List<String> deleted) { + logger.debug("Delete {} keys pairs from configuration", deleted.size()); + Iterator<String> deleteInterator = deleted.iterator(); + while (deleteInterator.hasNext()) { + String el = deleteInterator.next(); + try { + config.deleteIds(el); + logger.trace("Delete key {}", el); + + } catch (ConfigurationException e) { + logger.error("Delete key: " + el + " FAILED.", e); + + } + } + + } + private void loadType(String name, String resource) { InputStream is = null; try { diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java index 6da1bc389..787cd136d 100644 --- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java +++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java @@ -112,8 +112,8 @@ public class ServicesProtocolPVP2XTask extends AbstractTaskValidator implements try { byte[] certSerialized = null; - if (MiscUtil.isNotEmpty(certBase64)) { - certSerialized = Base64Utils.decode(certBase64, true); + if (MiscUtil.isNotEmpty(splittet[1])) { + certSerialized = Base64Utils.decode(splittet[1], true); X509Certificate cert = new X509Certificate(certSerialized); newConfigValues.put( MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE_SUBJECT, |