aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java
diff options
context:
space:
mode:
authornetconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-01-25 14:26:54 +0000
committernetconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-01-25 14:26:54 +0000
commit7404b3f95c03d9c872d32e9fff73a394081a80ff (patch)
tree1468cf81836c1222532534db167c83df7036916e /src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java
parent877758d9ec4deb53aad8a6c1d8669cc7186b1a48 (diff)
downloadpdf-as-3-7404b3f95c03d9c872d32e9fff73a394081a80ff.tar.gz
pdf-as-3-7404b3f95c03d9c872d32e9fff73a394081a80ff.tar.bz2
pdf-as-3-7404b3f95c03d9c872d32e9fff73a394081a80ff.zip
RHID und VTime für EnvelopingBase64MOAConnector
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@249 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java
index c8a8717..7d58d79 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/EnvelopingBase64MOAConnector.java
@@ -9,6 +9,7 @@ import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import at.gv.egiz.pdfas.framework.ConnectorParameters;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
@@ -42,6 +43,8 @@ public class EnvelopingBase64MOAConnector implements Connector
* other configurable elements.
*/
protected Environment environment = null;
+
+ protected ConnectorParameters params = null;
/**
* Constructor that builds the configuration environment for this connector
@@ -57,9 +60,10 @@ public class EnvelopingBase64MOAConnector implements Connector
* @throws ConnectorException
* f.e.
*/
- public EnvelopingBase64MOAConnector(String profile) throws ConnectorException
+ public EnvelopingBase64MOAConnector(ConnectorParameters connectorParameters) throws ConnectorException
{
- this.environment = new Environment(profile);
+ this.params = connectorParameters;
+ this.environment = new Environment(connectorParameters.getProfileId());
}
/**
@@ -181,6 +185,18 @@ public class EnvelopingBase64MOAConnector implements Connector
String verify_request_xml = verify_request_template.replaceFirst(TemplateReplaces.XML_CONTENT_REPLACE, xml_content);
verify_request_xml = verify_request_xml.replaceFirst(TemplateReplaces.TRUST_PROFILE_ID_REPLACE, this.environment.getVerifyTrustProfileId());
+ String returnHashInputDataElement = "";
+ if (this.params.isReturnHashInputData())
+ {
+ returnHashInputDataElement = MOASoapWithAttachmentConnector.RETURN_HASH_INPUT_DATA;
+ }
+ verify_request_xml = verify_request_xml.replaceFirst(TemplateReplaces.RETURN_HASH_INPUT_DATA_REPLACE, returnHashInputDataElement);
+
+ verify_request_xml = verify_request_xml.replaceFirst(TemplateReplaces.DATE_TIME_REPLACE, BKUHelper.formDateTimeElement(this.params.getVerificationTime()));
+
+
+ log.debug("\r\n\r\n" + verify_request_xml + "\r\n\r\n");
+
return verify_request_xml;
}