summaryrefslogtreecommitdiff
path: root/pdf-over/pdf-signer-pdf-as/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over/pdf-signer-pdf-as/src/main')
-rw-r--r--pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSigner.java12
-rw-r--r--pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSignerFactory.java19
2 files changed, 23 insertions, 8 deletions
diff --git a/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSigner.java b/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSigner.java
index f94f3fdf..0cbaef1b 100644
--- a/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSigner.java
+++ b/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSigner.java
@@ -18,15 +18,15 @@ import at.gv.egiz.pdfas.api.internal.LocalBKUParams;
import at.gv.egiz.pdfas.api.internal.PdfAsInternal;
/**
- * PDF AS Signer Implemtation
+ * PDF AS Signer Implementation
*
* @author afitzek
*/
public class PDFASSigner implements PDFSignerInterface {
- protected static final String PROFILE_ID = "";
+ protected static final String PROFILE_ID = "SIGNATURBLOCK_DE";
- protected static final String URL_TEMPLATE = "";
+ protected static final String URL_TEMPLATE = "http://pdfover.4.gv.at/template";
@Override
public SigningState Prepare(SignatureParameter parameter)
@@ -53,15 +53,12 @@ public class PDFASSigner implements PDFSignerInterface {
params.setSignatureProfileId(PROFILE_ID);
if(parameter.GetCollimatingMark() != null) {
- // TODO: Define CollimatingMark and use
- params.setProfileOverrideValue("SIG_LABEL", "./images/signatur-logo_en.png");
+ params.setProfileOverrideValue("SIG_LABEL", parameter.GetCollimatingMark().GetFileName());
}
-
params.setDocument(sign_para.GetPDFASDataSource());
state.setSignParameters(params);
-
PdfAsInternal pdfasInternal = PDFASHelper.GetPdfAsInternal();
@@ -114,7 +111,6 @@ public class PDFASSigner implements PDFSignerInterface {
LocalBKUParams bkuParams = new LocalBKUParams(null, null, null);
// Perform signature
- // TODO: NEED TO check GetSLSignatureResponse() Interface to retrieve SL Response ...
at.gv.egiz.pdfas.api.sign.SignResult signResult = pdfasInternal
.finishLocalSign(pdfas, params, sdi, bkuParams, false,
sstate.GetSLSignatureResponse().GetSLRespone());
diff --git a/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSignerFactory.java b/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSignerFactory.java
new file mode 100644
index 00000000..2545578b
--- /dev/null
+++ b/pdf-over/pdf-signer-pdf-as/src/main/java/at/asit/pdfover/pdfsigner/pdfas/PDFASSignerFactory.java
@@ -0,0 +1,19 @@
+package at.asit.pdfover.pdfsigner.pdfas;
+
+import at.asit.pdfover.pdfsigner.PDFSigner;
+import at.asit.pdfover.pdfsigner.PDFSignerFactory;
+import at.asit.pdfover.pdfsigner.PDFSignerInterface;
+
+public class PDFASSignerFactory extends PDFSignerFactory {
+
+ @Override
+ public PDFSignerInterface CreatePDFSigner() {
+ return new PDFASSigner();
+ }
+
+ @Override
+ public PDFSigner GetPDFSignerType() {
+ return PDFSigner.PDFAS;
+ }
+
+}