diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-08-02 15:05:00 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-08-02 15:05:00 +0200 |
commit | 464e7b1df6a0ff5d1450e5ff0f67101640edbc5e (patch) | |
tree | 7e04c408095bc32aec47ed9a4debfd08e1b64a92 /pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java | |
parent | 832cf5d3353a5fef867d177b32681b1295497626 (diff) | |
download | pdf-over-464e7b1df6a0ff5d1450e5ff0f67101640edbc5e.tar.gz pdf-over-464e7b1df6a0ff5d1450e5ff0f67101640edbc5e.tar.bz2 pdf-over-464e7b1df6a0ff5d1450e5ff0f67101640edbc5e.zip |
YAGNI: SignResult interface
Diffstat (limited to 'pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java')
-rw-r--r-- | pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java index 9f9b591c..91bce421 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignResult.java @@ -15,28 +15,51 @@ */ package at.asit.pdfover.signator; +//Imports import java.security.cert.X509Certificate; /** - * Signature Result containing the signed document as document source + * The result of a signature operation */ -public interface SignResult { +public class SignResult { + + private SignaturePosition position; + private DocumentSource source; + private X509Certificate certificate; + + public SignaturePosition getSignaturePosition() { + return this.position; + } + + public DocumentSource getSignedDocument() { + return this.source; + } + + public X509Certificate getSignerCertificate() { + return this.certificate; + } /** - * Getter of the property <tt>signaturePosition</tt> - * @return Returns the signaturePosition. + * Set the signer certificate + * @param x509Certificate the signer certificate */ - public SignaturePosition getSignaturePosition(); + public void setSignerCertificate(X509Certificate x509Certificate) { + this.certificate = x509Certificate; + } /** - * Gets the signed Document - * @return Returns the documentSource. + * Set the signature position + * @param postion the signature position */ - public DocumentSource getSignedDocument(); + public void setSignaturePosition(SignaturePosition postion) { + this.position = postion; + } /** - * Gets the signer certificate - * @return The signer x509 certificate + * Set the signed document + * @param source DocumentSource containing the signed document */ - public X509Certificate getSignerCertificate(); + public void setSignedDocument(DocumentSource source) { + this.source = source; + } } |