diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-17 18:51:20 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-17 18:51:20 +0100 |
commit | 9f6a8a59fe28702e097c23c8b8bee4123b1af12d (patch) | |
tree | 67585c871ae36d8d05ad5229f7778fe5120a8e96 | |
parent | 9aa438639862ccdc4f9523195df04131cc1913b8 (diff) | |
download | moa-id-spss-9f6a8a59fe28702e097c23c8b8bee4123b1af12d.tar.gz moa-id-spss-9f6a8a59fe28702e097c23c8b8bee4123b1af12d.tar.bz2 moa-id-spss-9f6a8a59fe28702e097c23c8b8bee4123b1af12d.zip |
solve legacy configuration import error
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java index 68d934036..e6e77911a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java @@ -28,6 +28,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; +import java.net.URI; import java.net.URL; import java.nio.file.Path; import java.util.ArrayList; @@ -241,8 +242,9 @@ public class BuildFromLegacyConfig { for (int i=0; i<transformsInfos.length; i++) { TransformsInfoType transforminfotype = new TransformsInfoType(); - - Path fileName_ = new File(transformsInfoFileNames[i]).toPath().getFileName(); + + String fileURL = FileUtils.makeAbsoluteURL(transformsInfoFileNames[i], rootConfigFileDir); + Path fileName_ = new File(new URI(fileURL)).toPath().getFileName(); transforminfotype.setFilename(fileName_.toString()); transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8")); @@ -398,15 +400,14 @@ public class BuildFromLegacyConfig { templates.setTemplate(template_list); - //set TransformsInfo + //TransformsInfo not supported by MOAID 2.0 String[] transforminfos = oa.getTransformsInfos(); - ArrayList<TransformsInfoType> oa_transforminfos = new ArrayList<TransformsInfoType>(); - for (String e1 : transforminfos) { - TransformsInfoType transforminfo = new TransformsInfoType(); - transforminfo.setFilename(e1); - oa_transforminfos.add(transforminfo); + for (String e1 : transforminfos) { + if (MiscUtil.isNotEmpty(e1)) { + Logger.warn("OA specific transformation for OA " + oa.getPublicURLPrefix() + + " are not supported. USE AdditionalAuthBlock text!"); + } } - oa_auth.setTransformsInfo(oa_transforminfos); //VerifyInfoBoxes not supported by MOAID 2.0 |