/**
* Copyright (c) 2006 by Know-Center, Graz, Austria
*
* 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.
*
*
* Replaces all the left out placeholders with their values retrieved from the
* signation process.
*
*
* @param iui
* The IncrementalUpdateInformation.
* @throws PDFDocumentException
* Forwarded exception.
*/
public SignResult finishSign(IncrementalUpdateInformation iui) throws PresentableException;
}