From aab91787017f7b8741686db9796969e6bf278fba Mon Sep 17 00:00:00 2001 From: ferbas Date: Thu, 19 Nov 2009 14:29:43 +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@455 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../sig/connectors/mocca/LocRefDetachedMOCCAConnector.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java index 4b91328..c38e27c 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java @@ -395,13 +395,15 @@ public class LocRefDetachedMOCCAConnector implements Connector, LocalConnector { // try specific file String sign_request_filename = TEMPLATE_FILE_PREFIX + this.algorithmId + SIGN_TEMPLATE_FILE_SUFFIX; log.debug("Trying to load specific sign request file " + 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)); + this.sign_request_template = settings.readInternalResourceAsString(sign_request_filename); // try default request file if (this.sign_request_template == null) { sign_request_filename = getConnectorValueFromProfile(settings, profile, SIGN_REQUEST_TEMPLATE_KEY); log.debug("Specific file not found. Trying default sign request file " + 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)); + this.sign_request_template = settings.readInternalResourceAsString(sign_request_filename); } // request file is needed !!! @@ -438,13 +440,15 @@ public class LocRefDetachedMOCCAConnector implements Connector, LocalConnector { // try specific file String verify_filename = TEMPLATE_FILE_PREFIX + this.algorithmId + VERIFY_TEMPLATE_SUFFIX; log.debug("Trying to load specific signature template file " + verify_filename); - 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); // try default signature template file if (this.verify_template == null) { verify_filename = getConnectorValueFromProfile(settings, profile, VERIFY_TEMPLATE_KEY); log.debug("Specific signature template file not found. Trying default signature template file " + verify_filename); - 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); } // signature template is needed !!! -- cgit v1.2.3