diff options
Diffstat (limited to 'pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java')
-rw-r--r-- | pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java new file mode 100644 index 00000000..e7ceeff6 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java @@ -0,0 +1,38 @@ +package at.asit.pdfover.pdfsignator; + +import java.security.SignatureException; + +/** + * PDF Signator base Class + * This class should be extended to support PDF-AS and PADES. + * @author afitzek + */ +public interface PDFSignerInterface { + + /** + * Prepare a signature + * Defines signature parameters, the pdf library prepares the pdf document to sign and + * creates a Security Layer Request. + * @param parameter The signature parameters + * @return The siging state (contains the prepared document and the signature request + * @throws SignatureException + */ + public SigningState Prepare(SignatureParameter parameter) throws SignatureException; + + /** + * Adds the signature to the document. + * The SL Response has to be set in the state + * @param state The siging state + * @return The signature Result + * @throws SignatureException + */ + public SignResult Sign(SigningState state) throws SignatureException; + + /** + * Creates new signing profile + * @param base The profile id of the base profile + * @param profileID The id of the new profile + * @return The new Profile + */ + public SignatureParameter GetParameter(); +} |