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 ADAAB200BCB for ; Thu, 24 Nov 2016 17:38:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AC3CF160B1E; Thu, 24 Nov 2016 16:38:41 +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 CF0F7160AFB for ; Thu, 24 Nov 2016 17:38:40 +0100 (CET) Received: (qmail 83550 invoked by uid 500); 24 Nov 2016 16:38:39 -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 83541 invoked by uid 99); 24 Nov 2016 16:38:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2016 16:38:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6FD76180334 for ; Thu, 24 Nov 2016 16:38:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id K6n8kT4yyRBt for ; Thu, 24 Nov 2016 16:38:37 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5CD705F2C3 for ; Thu, 24 Nov 2016 16:38:37 +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 6697EE01A7 for ; Thu, 24 Nov 2016 16:38:34 +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 1D8D83A0252 for ; Thu, 24 Nov 2016 16:38:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1771184 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/AccessPermission.java Date: Thu, 24 Nov 2016 16:38:34 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161124163834.1D8D83A0252@svn01-us-west.apache.org> archived-at: Thu, 24 Nov 2016 16:38:41 -0000 Author: tilman Date: Thu Nov 24 16:38:33 2016 New Revision: 1771184 URL: http://svn.apache.org/viewvc?rev=1771184&view=rev Log: PDFBOX-3590: improve javadoc Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/AccessPermission.java Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/AccessPermission.java URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/AccessPermission.java?rev=1771184&r1=1771183&r2=1771184&view=diff ============================================================================== --- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/AccessPermission.java (original) +++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/AccessPermission.java Thu Nov 24 16:38:33 2016 @@ -209,7 +209,8 @@ public class AccessPermission /** * Set if the user can print. - * This method will have no effect if the object is in read only mode + *

+ * This method will have no effect if the object is in read only mode. * * @param allowPrinting A boolean determining if the user can print. */ @@ -233,7 +234,8 @@ public class AccessPermission /** * Set if the user can modify the document. - * This method will have no effect if the object is in read only mode + *

+ * This method will have no effect if the object is in read only mode. * * @param allowModifications A boolean determining if the user can modify the document. */ @@ -258,7 +260,8 @@ public class AccessPermission /** * Set if the user can extract content from the document. - * This method will have no effect if the object is in read only mode + *

+ * This method will have no effect if the object is in read only mode. * * @param allowExtraction A boolean determining if the user can extract content * from the document. @@ -272,7 +275,11 @@ public class AccessPermission } /** - * This will tell if the user can add/modify text annotations, fill in interactive forms fields. + * This will tell if the user can add or modify text annotations and fill in interactive forms + * fields and, if {@link #canModify() canModify()} returns true, create or modify interactive + * form fields (including signature fields). Note that if + * {@link #canFillInForm() canFillInForm()} returns true, it is still possible to fill in + * interactive forms (including signature fields) even if this method here returns false. * * @return true If supplied with the user password they are allowed to modify annotations. */ @@ -282,10 +289,15 @@ public class AccessPermission } /** - * Set if the user can modify annotations. - * This method will have no effect if the object is in read only mode + * Set if the user can add or modify text annotations and fill in interactive forms fields and, + * if {@link #canModify() canModify()} returns true, create or modify interactive form fields + * (including signature fields). Note that if {@link #canFillInForm() canFillInForm()} returns + * true, it is still possible to fill in interactive forms (including signature fields) even the + * parameter here is false. + *

+ * This method will have no effect if the object is in read only mode. * - * @param allowAnnotationModification A boolean determining if the user can modify annotations. + * @param allowAnnotationModification A boolean determining the new setting. */ public void setCanModifyAnnotations( boolean allowAnnotationModification ) { @@ -296,7 +308,8 @@ public class AccessPermission } /** - * This will tell if the user can fill in interactive forms. + * This will tell if the user can fill in interactive form fields (including signature fields) + * even if {@link #canModifyAnnotations() canModifyAnnotations()} returns false. * * @return true If supplied with the user password they are allowed to fill in form fields. */ @@ -306,8 +319,12 @@ public class AccessPermission } /** - * Set if the user can fill in interactive forms. - * This method will have no effect if the object is in read only mode + * Set if the user can fill in interactive form fields (including signature fields) even if + * {@link #canModifyAnnotations() canModifyAnnotations()} returns false. Therefore, if you want + * to prevent a user from filling in interactive form fields, you need to call + * {@link #setCanModifyAnnotations(boolean) setCanModifyAnnotations(false)} as well. + *

+ * This method will have no effect if the object is in read only mode. * * @param allowFillingInForm A boolean determining if the user can fill in interactive forms. */ @@ -333,7 +350,8 @@ public class AccessPermission /** * Set if the user can extract content from the document for accessibility purposes. - * This method will have no effect if the object is in read only mode + *

+ * This method will have no effect if the object is in read only mode. * * @param allowExtraction A boolean determining if the user can extract content * from the document. @@ -359,7 +377,8 @@ public class AccessPermission /** * Set if the user can insert/rotate/delete pages. - * This method will have no effect if the object is in read only mode + *

+ * This method will have no effect if the object is in read only mode. * * @param allowAssembly A boolean determining if the user can assemble the document. */ @@ -384,7 +403,8 @@ public class AccessPermission /** * Set if the user can print the document in a degraded format. - * This method will have no effect if the object is in read only mode + *

+ * This method will have no effect if the object is in read only mode. * * @param allowAssembly A boolean determining if the user can print the * document in a degraded format.