aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/StatusRequest.java43
1 files changed, 43 insertions, 0 deletions
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
index fb6ceb44..2c283900 100644
--- 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
@@ -2,15 +2,58 @@ package at.gv.egiz.pdfas.lib.api;
import java.security.cert.CertificateException;
+/**
+ * Status of a signture process
+ */
public interface StatusRequest {
+ /**
+ * If true PDF-AS requires the signature certificate
+ *
+ * Retrieve the signing certificate and set it via setCertificate
+ * @return
+ */
public boolean needCertificate();
+
+ /**
+ * If true PDF-AS requires a the CAdES signature
+ *
+ * use getSignatureData() and getSignatureDataByteRange() to retrieve the
+ * data to be signed and set the signature via setSigature
+ *
+ * @return
+ */
public boolean needSignature();
+
+ /**
+ * If true finishSign in PdfAs can be called to retrieve the signed pdf
+ * @return
+ */
public boolean isReady();
+ /**
+ * Gets the data to be signed
+ * @return
+ */
public byte[] getSignatureData();
+
+ /**
+ * Gets the byte range of the data to be signed
+ * @return
+ */
public int[] getSignatureDataByteRange();
+
+ /**
+ * Sets the signing certificate
+ * @param encodedCertificate
+ * @throws CertificateException
+ */
public void setCertificate(byte[] encodedCertificate) throws CertificateException;
+
+ /**
+ * Sets the signature
+ * @param signatureValue
+ */
public void setSigature(byte[] signatureValue) ;
}