diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-11-17 10:29:59 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-11-17 10:29:59 +0100 |
commit | a44ee0ff9e55ee4dc6c5d341fffd469e9f7cda6b (patch) | |
tree | d3dd42577bfa366cb1bb139e1ab02cd4ab699f5a /id/server/moa-id-commons/src | |
parent | 2ba207414a9ee2c27acc83c54efddfff71b92425 (diff) | |
download | moa-id-spss-a44ee0ff9e55ee4dc6c5d341fffd469e9f7cda6b.tar.gz moa-id-spss-a44ee0ff9e55ee4dc6c5d341fffd469e9f7cda6b.tar.bz2 moa-id-spss-a44ee0ff9e55ee4dc6c5d341fffd469e9f7cda6b.zip |
fix some more problems in STORK code
Diffstat (limited to 'id/server/moa-id-commons/src')
-rw-r--r-- | id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java index c175253af..c53aeff3f 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java @@ -1395,41 +1395,46 @@ public class ConfigurationMigrationUtils { // to foreclose lazyloading session timeouts if (stork.getCPEPS() != null) { for (int i=0; i<stork.getCPEPS().size(); i++) { - result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST - + "." + String.valueOf(i) + "." - + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_COUNTRY, - stork.getCPEPS().get(i).getCountryCode()); - result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST - + "." + String.valueOf(i) + "." - + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL, - stork.getCPEPS().get(i).getURL()); - result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST - + "." + String.valueOf(i) + "." - + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_SUPPORT_XMLDSIG, - String.valueOf(stork.getCPEPS().get(i).isSupportsXMLSignature())); + if( !(stork.getCPEPS().get(i).getURL() == null || + MiscUtil.isEmpty(stork.getCPEPS().get(i).getCountryCode()) || + stork.getCPEPS().get(i).getURL().endsWith("http://")) ) { + result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST + + "." + String.valueOf(i) + "." + + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_COUNTRY, + stork.getCPEPS().get(i).getCountryCode()); + result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST + + "." + String.valueOf(i) + "." + + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL, + stork.getCPEPS().get(i).getURL()); + result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST + + "." + String.valueOf(i) + "." + + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_SUPPORT_XMLDSIG, + String.valueOf(stork.getCPEPS().get(i).isSupportsXMLSignature())); + } } } List<StorkAttribute> tmp = stork.getAttributes(); - if(null != tmp) { + if(null != tmp && tmp.size() > 0) { for (int i=0; i<tmp.size(); i++) { - result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST - + "." + String.valueOf(i) + "." - + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST_NAME, - tmp.get(i).getName()); - - if (tmp.get(i).isMandatory() != null) - result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST - + "." + String.valueOf(i) + "." - + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST_MANDATORY, - tmp.get(i).isMandatory().toString()); - else + if (MiscUtil.isNotEmpty(tmp.get(i).getName())) { result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST + "." + String.valueOf(i) + "." - + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST_MANDATORY, - Boolean.FALSE.toString()); + + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST_NAME, + tmp.get(i).getName()); + if (tmp.get(i).isMandatory() != null) + result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST + + "." + String.valueOf(i) + "." + + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST_MANDATORY, + tmp.get(i).isMandatory().toString()); + else + result.put(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST + + "." + String.valueOf(i) + "." + + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_ATTRIBUTES_LIST_MANDATORY, + Boolean.FALSE.toString()); + } } } @@ -1706,7 +1711,8 @@ public class ConfigurationMigrationUtils { + "." + index + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL); - if (MiscUtil.isNotEmpty(countryCode) && MiscUtil.isNotEmpty(pepsURL)) { + if (MiscUtil.isNotEmpty(countryCode) && MiscUtil.isNotEmpty(pepsURL) && + !pepsURL.endsWith("http://")) { attr.setCountryCode(countryCode); attr.setURL(pepsURL); attr.setSupportsXMLSignature(Boolean.parseBoolean(moaconfig.get(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST |