diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2015-08-17 18:22:05 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2015-08-17 18:22:05 +0200 |
commit | 730b8bc2de32be13016066a86498ae0181b0ee1e (patch) | |
tree | 4d200ce16626cf4bdf15d20ea8af7ddfb3b4434a /id/ConfigWebTool/src/main/java/at/gv | |
parent | 456513332389b2dbb7a6d1461f77dda9b7393050 (diff) | |
download | moa-id-spss-730b8bc2de32be13016066a86498ae0181b0ee1e.tar.gz moa-id-spss-730b8bc2de32be13016066a86498ae0181b0ee1e.tar.bz2 moa-id-spss-730b8bc2de32be13016066a86498ae0181b0ee1e.zip |
final changes for Release MOA-ID 3.0.0MOA-ID-3.0.0
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv')
4 files changed, 22 insertions, 8 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java index e2d473f8a..ecf0d19d7 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java @@ -254,12 +254,16 @@ public class FormularCustomization implements IOnlineApplicationData { //store BKU-selection and send-assertion templates if (authUser.isAdmin()) { - if (isDeleteBKUTemplate()) - templates.setBKUSelectionTemplate(null); - - if (isDeleteSendAssertionTemplate()) - templates.setSendAssertionTemplate(null); + if (isDeleteBKUTemplate() && templates.getBKUSelectionTemplate() != null) { + //templates.setBKUSelectionTemplate(null); + templates.getBKUSelectionTemplate().setDelete(true); + } + if (isDeleteSendAssertionTemplate() && templates.getSendAssertionTemplate() != null) { + //templates.setSendAssertionTemplate(null); + templates.getSendAssertionTemplate().setDelete(true); + } + if (bkuSelectionForm != null && bkuSelectionForm.size() > 0) { TransformsInfoType template = new TransformsInfoType(); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java index 07c9f5eda..4be1a81de 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java @@ -40,6 +40,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentOA import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OAPVP2; import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication; import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser; +import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider; import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper; import at.gv.egovernment.moa.id.configuration.validation.oa.OAPVP2ConfigValidation; import at.gv.egovernment.moa.util.Base64Utils; @@ -58,6 +59,8 @@ public class OAPVP2Config implements IOnlineApplicationData{ private String fileUploadContentType; private String fileUploadFileName; + private byte[] storedCert = null; + public OAPVP2Config() { } @@ -90,7 +93,9 @@ public class OAPVP2Config implements IOnlineApplicationData{ if (getFileUpload() != null) { pvp2.setCertificate(getCertificate()); setReLoad(true); - } + + } else if (storedCert != null) + pvp2.setCertificate(storedCert); } catch (CertificateException e) { log.info("Uploaded Certificate can not be found", e); @@ -175,6 +180,10 @@ public class OAPVP2Config implements IOnlineApplicationData{ return x509.getEncoded(); } + public void setStoredCert(byte[] storedCert) { + this.storedCert = storedCert; + } + public String getMetaDataURL() { return metaDataURL; } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java index de32d31c7..d2dac3b28 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java @@ -74,7 +74,7 @@ public class OAFileUploadValidation { try { File file = files.get(i); InputStream stream = new FileInputStream(file); - output.put(filename, IOUtils.toByteArray(stream)); + output.put(filename, Base64Utils.encode(stream).getBytes("UTF-8")); stream.close(); } catch (IOException e) { diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java index d850decb4..18452ed2d 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java @@ -79,7 +79,8 @@ public class OAPVP2ConfigValidation { Map<String, String> oa = ConfigurationProvider.getInstance().getDbRead().getOnlineApplicationKeyValueWithId(oaID); if (oa != null && MiscUtil.isNotEmpty(oa.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE))) { - certSerialized = Base64Utils.decode(oa.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE), false); + certSerialized = Base64Utils.decode(oa.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE), false); + form.setStoredCert(certSerialized); } } catch (ConfigurationException e) { |