aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/framework/Signator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/framework/Signator.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/Signator.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/Signator.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/Signator.java
new file mode 100644
index 0000000..7719818
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/Signator.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright> Copyright (c) 2006 by Know-Center, Graz, Austria </copyright>
+ *
+ * This software is the confidential and proprietary information of Know-Center,
+ * Graz, Austria. You shall not disclose such Confidential Information and shall
+ * use it only in accordance with the terms of the license agreement you entered
+ * into with Know-Center.
+ *
+ * KNOW-CENTER MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
+ * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT. KNOW-CENTER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
+ * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
+ * DERIVATIVES.
+ *
+ * $Id: Signator.java,v 1.1 2006/08/25 17:07:21 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.framework;
+
+import at.knowcenter.wag.egov.egiz.exceptions.PDFDocumentException;
+import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
+import at.knowcenter.wag.egov.egiz.pdf.IncrementalUpdateInformation;
+import at.knowcenter.wag.egov.egiz.pdf.TablePos;
+
+/**
+ * The basic interface for signator algorithms.
+ *
+ * @author wprinz
+ */
+public interface Signator
+{
+ /**
+ * This is called before the data is sent to the connector.
+ *
+ * @param pdf
+ * The PDF document to be signed.
+ * @param signature_type
+ * The type/profile of the signature to apply.
+ * @param pos
+ * The table position. If null, the position is read from the
+ * profile, if this is null too, the position is computed.
+ * @param has_SIG_ID
+ * Tells the algorithm, id a SIG_ID field will be required after
+ * signing. Algorithms with fixed formatted signature blocks need to
+ * know this.
+ * @return Returns the IncrementalUpdateInformation.
+ * @throws PresentableException
+ * Forwarded exception.
+ */
+ public IncrementalUpdateInformation prepareSign(byte[] pdf,
+ String signature_type, TablePos pos, boolean has_SIG_ID) throws PresentableException;
+
+ /**
+ * This is called after the data has been signed by the connector.
+ *
+ * <p>
+ * Replaces all the left out placeholders with their values retrieved from the
+ * signation process.
+ * </p>
+ *
+ * @param iui
+ * The IncrementalUpdateInformation.
+ * @throws PDFDocumentException
+ * Forwarded exception.
+ */
+ public SignResult finishSign(IncrementalUpdateInformation iui) throws PresentableException;
+}