From de166b5e111aab5ad53cae2bda440e9c17434d98 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 18:49:29 +0000 Subject: PDFSignerInterface update PDFSignatorInterface created PDFSignator Project created git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@4 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../asit/pdfover/pdfsignator/CollimatingMark.java | 5 - .../asit/pdfover/pdfsignator/DocumentSource.java | 9 -- .../pdfover/pdfsignator/PDFSignatureException.java | 14 --- .../pdfover/pdfsignator/PDFSignerInterface.java | 38 -------- .../at/asit/pdfover/pdfsignator/SignResult.java | 28 ------ .../pdfover/pdfsignator/SignatureDimension.java | 60 ------------ .../pdfover/pdfsignator/SignatureParameter.java | 106 --------------------- .../pdfover/pdfsignator/SignaturePosition.java | 100 ------------------- .../at/asit/pdfover/pdfsignator/SigningState.java | 26 ----- .../at/asit/pdfover/pdfsigner/CollimatingMark.java | 5 + .../at/asit/pdfover/pdfsigner/DocumentSource.java | 9 ++ .../pdfover/pdfsigner/PDFSignatureException.java | 14 +++ .../asit/pdfover/pdfsigner/PDFSignerInterface.java | 38 ++++++++ .../java/at/asit/pdfover/pdfsigner/SLRequest.java | 13 +++ .../java/at/asit/pdfover/pdfsigner/SLResponse.java | 9 ++ .../java/at/asit/pdfover/pdfsigner/SignResult.java | 28 ++++++ .../asit/pdfover/pdfsigner/SignatureDimension.java | 60 ++++++++++++ .../asit/pdfover/pdfsigner/SignatureParameter.java | 106 +++++++++++++++++++++ .../asit/pdfover/pdfsigner/SignaturePosition.java | 100 +++++++++++++++++++ .../at/asit/pdfover/pdfsigner/SigningState.java | 20 ++++ 20 files changed, 402 insertions(+), 386 deletions(-) delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/CollimatingMark.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/DocumentSource.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignatureException.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignResult.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureDimension.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureParameter.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignaturePosition.java delete mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SigningState.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/CollimatingMark.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/DocumentSource.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignatureException.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignerInterface.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLRequest.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLResponse.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignResult.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureDimension.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureParameter.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignaturePosition.java create mode 100644 pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SigningState.java (limited to 'pdf-over/pdf-signer-interface/src/main') diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/CollimatingMark.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/CollimatingMark.java deleted file mode 100644 index 1d209671..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/CollimatingMark.java +++ /dev/null @@ -1,5 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -public class CollimatingMark { - -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/DocumentSource.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/DocumentSource.java deleted file mode 100644 index 3550596c..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/DocumentSource.java +++ /dev/null @@ -1,9 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -/** - * A Document Source - * @author afitzek - */ -public class DocumentSource { - -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignatureException.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignatureException.java deleted file mode 100644 index 78e66e01..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignatureException.java +++ /dev/null @@ -1,14 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -/** - * base class for signature exceptions - * @author afitzek - */ -public class PDFSignatureException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 711578398780816710L; - -} 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 deleted file mode 100644 index e7ceeff6..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/PDFSignerInterface.java +++ /dev/null @@ -1,38 +0,0 @@ -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(); -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignResult.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignResult.java deleted file mode 100644 index 847d9cd5..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignResult.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -import javax.security.cert.Certificate; - -/** - * Signature Result containing the signed document as document source - * @author afitzek - */ -public interface SignResult { - - /** - * Getter of the property signaturePosition - * @return Returns the signaturePosition. - */ - public SignaturePosition GetSignaturePosition(); - - /** - * Gets the signed Document - * @return Returns the documentSource. - */ - public DocumentSource GetSignedDocument(); - - /** - * Gets the signer certificate - * @return The signer x509 certificate - */ - public Certificate GetSignerCertificate(); -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureDimension.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureDimension.java deleted file mode 100644 index 5bff2da8..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureDimension.java +++ /dev/null @@ -1,60 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -/** - * The Dimensions of the visible signature block - * @author afitzek - */ -public class SignatureDimension { - - /** - * The visible Signature block width - */ - protected int width; - - /** - * The visible Signature block height - */ - protected int height; - - /** - * Sets the width for the dimension - * @param value - */ - public void SetWidth(int value) { - this.width = value; - } - - /** - * Constructor - * @param width The width of the signature block - * @param height The height of the signature block - */ - public SignatureDimension(int width, int height) { - this.width = width; - this.height = height; - } - - /** - * Gets the width of the visible Signature block - * @return - */ - public int GetWidth() { - return this.width; - } - - /** - * Sets the height for the dimension - * @param value - */ - public void SetHeight(int value) { - this.height = value; - } - - /** - * Gets the height of the visible Signature block - * @return - */ - public int GetHeight() { - return this.height; - } -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureParameter.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureParameter.java deleted file mode 100644 index e50b2751..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignatureParameter.java +++ /dev/null @@ -1,106 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -/** - * The Signature Parameter - * @author afitzek - */ -public abstract class SignatureParameter { - - /** - * The Signature Position - * @uml.property name="signaturePosition" - * @uml.associationEnd - */ - protected SignaturePosition signaturePosition = null; - - /** - * Getter of the property signaturePosition - * @return Returns the signaturePosition. - */ - public SignaturePosition GetSignaturePosition() { - return signaturePosition; - } - - /** - * Setter of the property signaturePosition - * @param signaturePosition The signaturePosition to set. - */ - public void SetSignaturePosition(SignaturePosition signaturePosition) { - this.signaturePosition = signaturePosition; - } - - /** - * The signature Device - */ - protected String KeyIdentifier = null; - - /** - * Getter of the property KeyIdentifier - * @return Returns the KeyIdentifier. - */ - public String GetKeyIdentifier() { - return KeyIdentifier; - } - - /** - * Setter of the property KeyIdentifier - * @param value The KeyIdentifier to set. - */ - public void SetKeyIdentifier(String value) { - this.KeyIdentifier = value; - } - - /** - * The signature Device - * @uml.property name="documentSource" - * @uml.associationEnd - */ - protected DocumentSource documentSource = null; - - /** - * Getter of the property documentSource - * @return Returns the documentSource. - */ - public DocumentSource GetInputDocument() { - return documentSource; - } - - /** - * Setter of the property documentSource - * @param value The documentSource to set. - */ - public void SetInputDocument(DocumentSource value) { - this.documentSource = value; - } - - /** - * Gets the Dimension to display the Placeholder - * @return the placeholder dimensions - */ - public abstract SignatureDimension GetPlaceholderDimension(); - - /** - * holds the collimating mark - * @uml.property name="collimark" - * @uml.associationEnd - */ - protected CollimatingMark collimark; - - /** - * Gets the collimating mark - * @return - */ - public CollimatingMark GetCollimatingMark() { - return collimark; - } - - /** - * Sets the collimating mark - * @param value The new colimating mark - */ - public void SetCollimatingMark(CollimatingMark value) { - this.collimark = value; - } - - -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignaturePosition.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignaturePosition.java deleted file mode 100644 index 48b320b3..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SignaturePosition.java +++ /dev/null @@ -1,100 +0,0 @@ -package at.asit.pdfover.pdfsignator; - - -/** - * Represents the position of a visible signature block - * @author afitzek - */ -public class SignaturePosition { - /** - * The x value of the position - */ - protected int x = 0; - - /** - * The y value of the position - */ - protected int y = 0; - - /** - * The page value of the position - */ - protected int page = 1; - - /** - * Default constructor - */ - public SignaturePosition() { - } - - /** - * X - Y Constructor Page = 1 - * @param x The x value of the position - * @param y The y value of the position - */ - public SignaturePosition(int x, int y) { - this.x = x; - this.y = y; - } - - /** - * Constructor - * @param x The x value of the position - * @param y The y value of the position - * @param page The page value of the position - */ - public SignaturePosition(int x, int y, int page) { - this.x = x; - this.y = y; - this.page = page; - } - - /** - * Sets X value of position - * @param value the new x value - */ - public void SetX(int value) { - this.x = value; - } - - /** - * Gets the X value of the position - * @return int the x value of the position - */ - public int GetX() { - return this.x; - } - - /** - * Sets Y value of position - * @param value the new y value - */ - public void SetY(int value) { - this.y = value; - } - - /** - * Gets the Y value of the position - * @return int the y value of the position - */ - public int GetY() { - return this.y; - } - - /** - * Sets Page value of position - * @param value the new page value - */ - public void SetPage(int value) { - this.page = value; - } - - /** - * Gets the Page value of the position - * @return int the page value of the position - */ - public int GetPage() { - return this.page; - } - -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SigningState.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SigningState.java deleted file mode 100644 index 77479c12..00000000 --- a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsignator/SigningState.java +++ /dev/null @@ -1,26 +0,0 @@ -package at.asit.pdfover.pdfsignator; - -/** - * The state of the pdf signing library - * @author afitzek - */ -public interface SigningState { - - /** - * Gets the prepared Document - * @return - */ - public DocumentSource GetPreparedDocument(); - - /** - * Gets the Security Layer Request to create the signature - * @return The SL Signature Request - */ - public String GetSLSignatureRequest(); - - /** - * Sets the Security Layer Request to create the signature - * @param value The SL Signature Request - */ - public void SetSLSignatureResponse(String value); -} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/CollimatingMark.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/CollimatingMark.java new file mode 100644 index 00000000..ad956fa7 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/CollimatingMark.java @@ -0,0 +1,5 @@ +package at.asit.pdfover.pdfsigner; + +public class CollimatingMark { + +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/DocumentSource.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/DocumentSource.java new file mode 100644 index 00000000..af377c44 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/DocumentSource.java @@ -0,0 +1,9 @@ +package at.asit.pdfover.pdfsigner; + +/** + * A Document Source + * @author afitzek + */ +public class DocumentSource { + +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignatureException.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignatureException.java new file mode 100644 index 00000000..19253af1 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignatureException.java @@ -0,0 +1,14 @@ +package at.asit.pdfover.pdfsigner; + +/** + * base class for signature exceptions + * @author afitzek + */ +public class PDFSignatureException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 711578398780816710L; + +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignerInterface.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignerInterface.java new file mode 100644 index 00000000..6c8aa83b --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/PDFSignerInterface.java @@ -0,0 +1,38 @@ +package at.asit.pdfover.pdfsigner; + +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(); +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLRequest.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLRequest.java new file mode 100644 index 00000000..74ad5862 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLRequest.java @@ -0,0 +1,13 @@ +package at.asit.pdfover.pdfsigner; + +/** + * Securtiy Layer Request + * @author afitzek + */ +public interface SLRequest { + /** + * Gets the signature data for this request + * @return The document source + */ + public DocumentSource GetSignatureData(); +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLResponse.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLResponse.java new file mode 100644 index 00000000..4d2e594a --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SLResponse.java @@ -0,0 +1,9 @@ +package at.asit.pdfover.pdfsigner; + +/** + * Securtiy Layer Response + * @author afitzek + */ +public class SLResponse { + +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignResult.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignResult.java new file mode 100644 index 00000000..6357fe11 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignResult.java @@ -0,0 +1,28 @@ +package at.asit.pdfover.pdfsigner; + +import javax.security.cert.Certificate; + +/** + * Signature Result containing the signed document as document source + * @author afitzek + */ +public interface SignResult { + + /** + * Getter of the property signaturePosition + * @return Returns the signaturePosition. + */ + public SignaturePosition GetSignaturePosition(); + + /** + * Gets the signed Document + * @return Returns the documentSource. + */ + public DocumentSource GetSignedDocument(); + + /** + * Gets the signer certificate + * @return The signer x509 certificate + */ + public Certificate GetSignerCertificate(); +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureDimension.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureDimension.java new file mode 100644 index 00000000..57f628af --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureDimension.java @@ -0,0 +1,60 @@ +package at.asit.pdfover.pdfsigner; + +/** + * The Dimensions of the visible signature block + * @author afitzek + */ +public class SignatureDimension { + + /** + * The visible Signature block width + */ + protected int width; + + /** + * The visible Signature block height + */ + protected int height; + + /** + * Sets the width for the dimension + * @param value + */ + public void SetWidth(int value) { + this.width = value; + } + + /** + * Constructor + * @param width The width of the signature block + * @param height The height of the signature block + */ + public SignatureDimension(int width, int height) { + this.width = width; + this.height = height; + } + + /** + * Gets the width of the visible Signature block + * @return + */ + public int GetWidth() { + return this.width; + } + + /** + * Sets the height for the dimension + * @param value + */ + public void SetHeight(int value) { + this.height = value; + } + + /** + * Gets the height of the visible Signature block + * @return + */ + public int GetHeight() { + return this.height; + } +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureParameter.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureParameter.java new file mode 100644 index 00000000..422b2c75 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignatureParameter.java @@ -0,0 +1,106 @@ +package at.asit.pdfover.pdfsigner; + +/** + * The Signature Parameter + * @author afitzek + */ +public abstract class SignatureParameter { + + /** + * The Signature Position + * @uml.property name="signaturePosition" + * @uml.associationEnd + */ + protected SignaturePosition signaturePosition = null; + + /** + * Getter of the property signaturePosition + * @return Returns the signaturePosition. + */ + public SignaturePosition GetSignaturePosition() { + return signaturePosition; + } + + /** + * Setter of the property signaturePosition + * @param signaturePosition The signaturePosition to set. + */ + public void SetSignaturePosition(SignaturePosition signaturePosition) { + this.signaturePosition = signaturePosition; + } + + /** + * The signature Device + */ + protected String KeyIdentifier = null; + + /** + * Getter of the property KeyIdentifier + * @return Returns the KeyIdentifier. + */ + public String GetKeyIdentifier() { + return KeyIdentifier; + } + + /** + * Setter of the property KeyIdentifier + * @param value The KeyIdentifier to set. + */ + public void SetKeyIdentifier(String value) { + this.KeyIdentifier = value; + } + + /** + * The signature Device + * @uml.property name="documentSource" + * @uml.associationEnd + */ + protected DocumentSource documentSource = null; + + /** + * Getter of the property documentSource + * @return Returns the documentSource. + */ + public DocumentSource GetInputDocument() { + return documentSource; + } + + /** + * Setter of the property documentSource + * @param value The documentSource to set. + */ + public void SetInputDocument(DocumentSource value) { + this.documentSource = value; + } + + /** + * Gets the Dimension to display the Placeholder + * @return the placeholder dimensions + */ + public abstract SignatureDimension GetPlaceholderDimension(); + + /** + * holds the collimating mark + * @uml.property name="collimark" + * @uml.associationEnd + */ + protected CollimatingMark collimark; + + /** + * Gets the collimating mark + * @return + */ + public CollimatingMark GetCollimatingMark() { + return collimark; + } + + /** + * Sets the collimating mark + * @param value The new colimating mark + */ + public void SetCollimatingMark(CollimatingMark value) { + this.collimark = value; + } + + +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignaturePosition.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignaturePosition.java new file mode 100644 index 00000000..f6d2aa81 --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SignaturePosition.java @@ -0,0 +1,100 @@ +package at.asit.pdfover.pdfsigner; + + +/** + * Represents the position of a visible signature block + * @author afitzek + */ +public class SignaturePosition { + /** + * The x value of the position + */ + protected int x = 0; + + /** + * The y value of the position + */ + protected int y = 0; + + /** + * The page value of the position + */ + protected int page = 1; + + /** + * Default constructor + */ + public SignaturePosition() { + } + + /** + * X - Y Constructor Page = 1 + * @param x The x value of the position + * @param y The y value of the position + */ + public SignaturePosition(int x, int y) { + this.x = x; + this.y = y; + } + + /** + * Constructor + * @param x The x value of the position + * @param y The y value of the position + * @param page The page value of the position + */ + public SignaturePosition(int x, int y, int page) { + this.x = x; + this.y = y; + this.page = page; + } + + /** + * Sets X value of position + * @param value the new x value + */ + public void SetX(int value) { + this.x = value; + } + + /** + * Gets the X value of the position + * @return int the x value of the position + */ + public int GetX() { + return this.x; + } + + /** + * Sets Y value of position + * @param value the new y value + */ + public void SetY(int value) { + this.y = value; + } + + /** + * Gets the Y value of the position + * @return int the y value of the position + */ + public int GetY() { + return this.y; + } + + /** + * Sets Page value of position + * @param value the new page value + */ + public void SetPage(int value) { + this.page = value; + } + + /** + * Gets the Page value of the position + * @return int the page value of the position + */ + public int GetPage() { + return this.page; + } + +} diff --git a/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SigningState.java b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SigningState.java new file mode 100644 index 00000000..ac0c736a --- /dev/null +++ b/pdf-over/pdf-signer-interface/src/main/java/at/asit/pdfover/pdfsigner/SigningState.java @@ -0,0 +1,20 @@ +package at.asit.pdfover.pdfsigner; + +/** + * The state of the pdf signing library + * @author afitzek + */ +public interface SigningState { + + /** + * Gets the Security Layer Request to create the signature + * @return The SL Signature Request + */ + public SLRequest GetSLSignatureRequest(); + + /** + * Sets the Security Layer Request to create the signature + * @param value The SL Signature Request + */ + public void SetSLSignatureResponse(SLResponse value); +} -- cgit v1.2.3