From 62434d4f7d4bf80b4c236c4153bffab703916ee3 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 3 Oct 2013 13:38:33 +0200 Subject: no callback API implemted --- .../src/main/java/at/gv/egiz/pdfas/lib/api/PdfAs.java | 4 ++++ .../java/at/gv/egiz/pdfas/lib/api/StatusRequest.java | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAs.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAs.java index 92b2001a..76e760bd 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAs.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAs.java @@ -37,4 +37,8 @@ public interface PdfAs { * @return A private copy of the pdf as configuration */ public Configuration getConfiguration(); + + public StatusRequest startSign(SignParameter parameter) throws PdfAsException; + public StatusRequest process(StatusRequest statusRequest) throws PdfAsException; + public SignResult finishSign(StatusRequest statusRequest) throws PdfAsException; } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java new file mode 100644 index 00000000..fb6ceb44 --- /dev/null +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java @@ -0,0 +1,16 @@ +package at.gv.egiz.pdfas.lib.api; + +import java.security.cert.CertificateException; + +public interface StatusRequest { + + public boolean needCertificate(); + public boolean needSignature(); + public boolean isReady(); + + public byte[] getSignatureData(); + public int[] getSignatureDataByteRange(); + public void setCertificate(byte[] encodedCertificate) throws CertificateException; + public void setSigature(byte[] signatureValue) ; + +} -- cgit v1.2.3