From b5f70fe7c2d3b6797dd3278c016daad010017e9c Mon Sep 17 00:00:00 2001 From: ferbas Date: Fri, 13 Nov 2009 12:41:22 +0000 Subject: added timestamp support git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@395 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../pdfas/impl/signator/IncrementalUpdateHelper.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/gv') diff --git a/src/main/java/at/gv/egiz/pdfas/impl/signator/IncrementalUpdateHelper.java b/src/main/java/at/gv/egiz/pdfas/impl/signator/IncrementalUpdateHelper.java index abc77cf..a931920 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/signator/IncrementalUpdateHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/signator/IncrementalUpdateHelper.java @@ -5,6 +5,7 @@ package at.gv.egiz.pdfas.impl.signator; import java.util.List; +import at.gv.egiz.pdfas.api.timestamp.TimeStamper; import at.gv.egiz.pdfas.framework.input.PdfDataSource; import at.gv.egiz.pdfas.framework.output.DataSink; import at.gv.egiz.pdfas.impl.output.ByteArrayDataSink; @@ -21,31 +22,31 @@ import com.lowagie.text.pdf.PdfPTable; public final class IncrementalUpdateHelper { public static IncrementalUpdateInformation writeIncrementalUpdate(PdfDataSource pdfDataSource, PdfPTable pdf_table, String profile, PositioningInstruction pi, List variable_field_definitions, - List all_field_definitions) throws PresentableException + List all_field_definitions, TimeStamper timeStamper) throws PresentableException { - return writeIncrementalUpdate(pdfDataSource, pdf_table, profile, pi, variable_field_definitions, all_field_definitions, null, null); + return writeIncrementalUpdate(pdfDataSource, pdf_table, profile, pi, variable_field_definitions, all_field_definitions, null, null, timeStamper); } public static IncrementalUpdateInformation writeIncrementalUpdate(PdfDataSource pdfDataSource, PdfPTable pdf_table, String profile, PositioningInstruction pi, List variable_field_definitions, - List all_field_definitions, List invisible_field_definitions, String invisibleKZString) throws PresentableException + List all_field_definitions, List invisible_field_definitions, String invisibleKZString, TimeStamper timeStamper) throws PresentableException { // PERF: binary sig needs the signed_pdf as byte array ByteArrayDataSink bads = new ByteArrayDataSink(); - IncrementalUpdateInformation iui = BinarySignature.writeIncrementalUpdate(pdfDataSource, bads, pdf_table, profile, pi, variable_field_definitions, all_field_definitions, invisible_field_definitions, invisibleKZString); + IncrementalUpdateInformation iui = BinarySignature.writeIncrementalUpdate(pdfDataSource, bads, pdf_table, profile, pi, variable_field_definitions, all_field_definitions, invisible_field_definitions, invisibleKZString, timeStamper); iui.signed_pdf = bads.getByteArray(); bads = null; return iui; } - public static IncrementalUpdateInformation writeIncrementalUpdateToDataSink(PdfDataSource pdfDataSource, DataSink dataSink, PdfPTable pdf_table, String profile, PositioningInstruction pi) throws PresentableException + public static IncrementalUpdateInformation writeIncrementalUpdateToDataSink(PdfDataSource pdfDataSource, DataSink dataSink, PdfPTable pdf_table, String profile, PositioningInstruction pi, TimeStamper timeStamper) throws PresentableException { - return writeIncrementalUpdateToDataSink(pdfDataSource, dataSink, pdf_table, profile, pi, null, null, null, null); + return writeIncrementalUpdateToDataSink(pdfDataSource, dataSink, pdf_table, profile, pi, null, null, null, null, timeStamper); } public static IncrementalUpdateInformation writeIncrementalUpdateToDataSink(PdfDataSource pdfDataSource, DataSink dataSink, PdfPTable pdf_table, String profile, PositioningInstruction pi, List variable_field_definitions, - List all_field_definitions, List invisible_field_definitions, String invisibleKZString) throws PresentableException + List all_field_definitions, List invisible_field_definitions, String invisibleKZString, TimeStamper timeStamper) throws PresentableException { - return BinarySignature.writeIncrementalUpdate(pdfDataSource, dataSink, pdf_table, profile, pi, variable_field_definitions, all_field_definitions, invisible_field_definitions, invisibleKZString); + return BinarySignature.writeIncrementalUpdate(pdfDataSource, dataSink, pdf_table, profile, pi, variable_field_definitions, all_field_definitions, invisible_field_definitions, invisibleKZString, timeStamper); } } -- cgit v1.2.3