Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1A82F200B4A for ; Wed, 20 Jul 2016 20:07:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 190E1160A64; Wed, 20 Jul 2016 18:07:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6838A160A5B for ; Wed, 20 Jul 2016 20:07:27 +0200 (CEST) Received: (qmail 5679 invoked by uid 500); 20 Jul 2016 18:07:26 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 5670 invoked by uid 99); 20 Jul 2016 18:07:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2016 18:07:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 19960C7C09 for ; Wed, 20 Jul 2016 18:07:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.287 X-Spam-Level: X-Spam-Status: No, score=-0.287 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.287] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id G1ni42ZN1ill for ; Wed, 20 Jul 2016 18:07:25 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3FFE95FD3B for ; Wed, 20 Jul 2016 18:07:25 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 60D27E02E4 for ; Wed, 20 Jul 2016 18:07:23 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 5D06B3A0734 for ; Wed, 20 Jul 2016 18:07:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1753588 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java Date: Wed, 20 Jul 2016 18:07:23 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160720180723.5D06B3A0734@svn01-us-west.apache.org> archived-at: Wed, 20 Jul 2016 18:07:28 -0000 Author: tilman Date: Wed Jul 20 18:07:23 2016 New Revision: 1753588 URL: http://svn.apache.org/viewvc?rev=1753588&view=rev Log: PDFBOX-3017: rename parameter names; improve javadoc Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java?rev=1753588&r1=1753587&r2=1753588&view=diff ============================================================================== --- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java (original) +++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java Wed Jul 20 18:07:23 2016 @@ -44,7 +44,8 @@ import org.apache.pdfbox.pdmodel.interac import org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField; /** - * Implementation of {@link PDFTemplateBuilder}. + * Implementation of {@link PDFTemplateBuilder}. This builds the signature PDF but doesn't keep the + * elements, these are kept in its PDF template structure. * * @author Vakhtang Koroghlishvili */ @@ -54,7 +55,7 @@ public class PDVisibleSigBuilder impleme private static final Log log = LogFactory.getLog(PDVisibleSigBuilder.class); /** - * Constructor. + * Constructor, creates PDF template structure. */ public PDVisibleSigBuilder() { @@ -71,6 +72,13 @@ public class PDVisibleSigBuilder impleme log.info("PDF page has been created"); } + /** + * Creates a PDDocument and adds the page parameter to it and keeps this as a template in the + * PDF template Structure. + * + * @param page + * @throws IOException + */ @Override public void createTemplate(PDPage page) throws IOException { @@ -103,15 +111,15 @@ public class PDVisibleSigBuilder impleme } @Override - public void createSignature(PDSignatureField pdSignatureField, PDPage page, - String signatureName) throws IOException + public void createSignature(PDSignatureField pdSignatureField, PDPage page, String signerName) + throws IOException { PDSignature pdSignature = new PDSignature(); PDAnnotationWidget widget = pdSignatureField.getWidgets().get(0); pdSignatureField.setValue(pdSignature); widget.setPage(page); page.getAnnotations().add(widget); - pdSignature.setName(signatureName); + pdSignature.setName(signerName); pdfStructure.setPdSignature(pdSignature); log.info("PDSignature has been created"); }