aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java8
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java7
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsParameterImpl.java5
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java6
4 files changed, 18 insertions, 8 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java
index 11a1941b..6303c0a0 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java
@@ -82,10 +82,16 @@ public interface PdfAsParameter {
public void setPreprocessorArguments(Map<String, String> map);
/**
- * Sets the dynamic signatur block values.
+ * Sets the dynamic signature-block values.
*
* @param map the map
*/
public void setDynamicSignatureBlockArguments(Map<String, String> map);
+ /**
+ * Gets the dynamic signature-block values.
+ *
+ * @return the dynamic signature-block values
+ */
+ public Map<String, String> getDynamicSignatureBlockArguments();
}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
index 324712cb..55891bb2 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
@@ -23,6 +23,7 @@
******************************************************************************/
package at.gv.egiz.pdfas.lib.impl;
+import at.gv.egiz.pdfas.lib.impl.status.PDFObject;
import iaik.x509.X509Certificate;
import java.awt.Image;
@@ -144,7 +145,11 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants,
IPdfSigner signer = backend.getPdfSigner();
- status.setPdfObject(signer.buildPDFObject(status));
+
+ PDFObject pdfObject = signer.buildPDFObject(status);
+ //TODO verify map???
+ pdfObject.getStatus().getRequestParameters().putAll(status.getSignParamter().getDynamicSignatureBlockArguments());
+ status.setPdfObject(pdfObject);
// set Original PDF Document Data
status.getPdfObject()
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsParameterImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsParameterImpl.java
index f3e1c301..d6161f2c 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsParameterImpl.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsParameterImpl.java
@@ -82,4 +82,9 @@ protected Configuration configuration;
public void setDynamicSignatureBlockArguments(Map<String, String> map) {
this.dynamicSignatureBlockArgumentsMap = map;
}
+
+ @Override
+ public Map<String, String> getDynamicSignatureBlockArguments() {
+ return this.dynamicSignatureBlockArgumentsMap;
+ }
}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java
index 2481c77b..ab118857 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java
@@ -63,12 +63,6 @@ public class ValueResolver implements IProfileConstants, IResolver {
private IResolver internalResolver;
public ValueResolver(ICertificateProvider certProvider, OperationStatus operationStatus) {
-// Map<String, String> test = new HashMap<>();
-// test.put("schoolNameRand", RandomStringUtils.randomAlphabetic(5));
-// test.put("schoolName", "EGIZ testschule");
-//
-// test.put("subject","bbBbb");
-// internalRequestParameterResolver = new RequestParameterResolver(test);
internalResolver = new CertificateAndRequestParameterResolver(certProvider.getCertificate(),
operationStatus);
}