From cc2b798ba20bac373eadd85d137f190d6953d480 Mon Sep 17 00:00:00 2001 From: ferbas Date: Thu, 19 Nov 2009 14:29:32 +0000 Subject: configuration extension: internal vs. (old)external config file read templates from internal git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@454 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../moa/MOASoapWithAttachmentConnector.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java index 2415435..9cd8ccc 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java @@ -481,12 +481,14 @@ public class MOASoapWithAttachmentConnector implements Connector String sign_request_filename = TEMPLATE_FILE_PREFIX + settings.getValueFromKey("default.moa.algorithm.id") + SIGN_TEMPLATE_FILE_SUFIX; // try to load template from file - this.sign_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); + //this.sign_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); + this.sign_request_template = settings.readInternalResourceAsString(sign_request_filename); if (this.sign_request_template == null) { sign_request_filename = getConnectorValueFromProfile(settings, profile, SIGN_REQUEST_TEMPLATE_KEY); - this.sign_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); + this.sign_request_template = settings.readInternalResourceAsString(sign_request_filename); + //this.sign_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); } //this.sign_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); @@ -500,12 +502,14 @@ public class MOASoapWithAttachmentConnector implements Connector String verify_request_filename = TEMPLATE_FILE_PREFIX + settings.getValueFromKey("default.moa.algorithm.id") + VERIFY_REQUEST_TEMPLATE_FILE_SUFIX; // try to load template file for verifing - this.verify_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request_filename)); + //this.verify_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request_filename)); + this.verify_request_template = settings.readInternalResourceAsString(verify_request_filename); if (this.verify_request_template == null) { - verify_request_filename = getConnectorValueFromProfile(settings, profile, VERIFY_REQUEST_TEMPLATE_KEY); - this.verify_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request_filename)); + verify_request_filename = getConnectorValueFromProfile(settings, profile, VERIFY_REQUEST_TEMPLATE_KEY); + //this.verify_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request_filename)); + this.verify_request_template = settings.readInternalResourceAsString(verify_request_filename); } if (this.verify_request_template == null) @@ -515,12 +519,14 @@ public class MOASoapWithAttachmentConnector implements Connector // load template key file String verify_filename = TEMPLATE_FILE_PREFIX + settings.getValueFromKey("default.moa.algorithm.id") + VERIFY_TEMPLATE_SUFIX; - this.verify_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_filename)); + //this.verify_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_filename)); + this.verify_template = settings.readInternalResourceAsString(verify_filename); if (this.verify_template == null) { verify_filename = getConnectorValueFromProfile(settings, profile, VERIFY_TEMPLATE_KEY); - this.verify_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_filename)); + //this.verify_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_filename)); + this.verify_template = settings.readInternalResourceAsString(verify_filename); } if (this.verify_template == null) -- cgit v1.2.3