Java Doc for AccessPermission.java in  » PDF » PDFBox-0.7.3 » org » pdfbox » pdmodel » encryption » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » PDFBox 0.7.3 » org.pdfbox.pdmodel.encryption 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.pdfbox.pdmodel.encryption.AccessPermission

AccessPermission
public class AccessPermission (Code)
This class represents the access permissions to a document. These permissions are specified in the PDF format specifications, they include:
  • print the document
  • modify the content of the document
  • copy or extract content of the document
  • add or modify annotations
  • fill in interactive form fields
  • extract text and graphics for accessibility to visually impaired people
  • assemble the document
  • print in degraded quality
This class can be used to protect a document by assigning access permissions to recipients. In this case, it must be used with a specific ProtectionPolicy. When a document is decrypted, it has a currentAccessPermission property which is the access permissions granted to the user who decrypted the document.
See Also:   ProtectionPolicy
See Also:   org.pdfbox.pdmodel.PDDocument.getCurrentAccessPermission
author:
   Ben Litchfield
author:
   Benoit Guillon (benoit.guillon@snv.jussieu.fr)
version:
   $Revision: 1.3 $



Constructor Summary
public  AccessPermission(byte[] b)
     Create a new access permission object from a byte array.
public  AccessPermission()
     Create a new access permission object.

Method Summary
public  booleancanAssembleDocument()
     This will tell if the user can insert/rotate/delete pages.
public  booleancanExtractContent()
     This will tell if the user can extract text and images from the PDF document.
public  booleancanExtractForAccessibility()
     This will tell if the user can extract text and images from the PDF document for accessibility purposes.
public  booleancanFillInForm()
     This will tell if the user can fill in interactive forms.
public  booleancanModify()
     This will tell if the user can modify contents of the document.
public  booleancanModifyAnnotations()
     This will tell if the user can add/modify text annotations, fill in interactive forms fields.
public  booleancanPrint()
     This will tell if the user can print.
public  booleancanPrintDegraded()
     This will tell if the user can print the document in a degraded format.
public static  AccessPermissiongetOwnerAccessPermission()
     returns an access permission object for a document owner.
public  intgetPermissionBytes()
     The returns an integer representing the access permissions.
public  intgetPermissionBytesForPublicKey()
     This returns an integer representing the access permissions.
public  booleanisOwnerPermission()
     This will tell if the access permission corresponds to owner access permission (no restriction).
public  booleanisReadOnly()
     This will tell if the object has been set as read only.
public  voidsetCanAssembleDocument(boolean allowAssembly)
     Set if the user can insert/rotate/delete pages.
public  voidsetCanExtractContent(boolean allowExtraction)
     Set if the user can extract content from the document.
public  voidsetCanExtractForAccessibility(boolean allowExtraction)
     Set if the user can extract content from the document for accessibility purposes.
public  voidsetCanFillInForm(boolean allowFillingInForm)
     Set if the user can fill in interactive forms.
public  voidsetCanModify(boolean allowModifications)
     Set if the user can modify the document.
public  voidsetCanModifyAnnotations(boolean allowAnnotationModification)
     Set if the user can modify annotations.
public  voidsetCanPrint(boolean allowPrinting)
     Set if the user can print.
public  voidsetCanPrintDegraded(boolean allowAssembly)
     Set if the user can print the document in a degraded format.
public  voidsetReadOnly()
     Locks the access permission read only (ie, the setters will have no effects).


Constructor Detail
AccessPermission
public AccessPermission(byte[] b)(Code)
Create a new access permission object from a byte array. Bytes are ordered most significant byte first.
Parameters:
  b - the bytes as defined in PDF specs



AccessPermission
public AccessPermission()(Code)
Create a new access permission object. By default, all permissions are granted.




Method Detail
canAssembleDocument
public boolean canAssembleDocument()(Code)
This will tell if the user can insert/rotate/delete pages. true If supplied with the user password they are allowed to extract contentfrom the PDF document



canExtractContent
public boolean canExtractContent()(Code)
This will tell if the user can extract text and images from the PDF document. true If supplied with the user password they are allowed to extract contentfrom the PDF document



canExtractForAccessibility
public boolean canExtractForAccessibility()(Code)
This will tell if the user can extract text and images from the PDF document for accessibility purposes. true If supplied with the user password they are allowed to extract contentfrom the PDF document



canFillInForm
public boolean canFillInForm()(Code)
This will tell if the user can fill in interactive forms. true If supplied with the user password they are allowed to fill in form fields.



canModify
public boolean canModify()(Code)
This will tell if the user can modify contents of the document. true If supplied with the user password they are allowed to modify the document



canModifyAnnotations
public boolean canModifyAnnotations()(Code)
This will tell if the user can add/modify text annotations, fill in interactive forms fields. true If supplied with the user password they are allowed to modify annotations.



canPrint
public boolean canPrint()(Code)
This will tell if the user can print. true If supplied with the user password they are allowed to print.



canPrintDegraded
public boolean canPrintDegraded()(Code)
This will tell if the user can print the document in a degraded format. true If supplied with the user password they are allowed to print thedocument in a degraded format.



getOwnerAccessPermission
public static AccessPermission getOwnerAccessPermission()(Code)
returns an access permission object for a document owner. A standard owner access permission set.



getPermissionBytes
public int getPermissionBytes()(Code)
The returns an integer representing the access permissions. This integer can be used for standard PDF encryption as specified in the PDF specifications. the integer representing the access permissions



getPermissionBytesForPublicKey
public int getPermissionBytesForPublicKey()(Code)
This returns an integer representing the access permissions. This integer can be used for public key encryption. This format is not documented in the PDF specifications but is necessary for compatibility with Adobe Acrobat and Adobe Reader. the integer representing access permissions



isOwnerPermission
public boolean isOwnerPermission()(Code)
This will tell if the access permission corresponds to owner access permission (no restriction). true if the access permission does not restrict the use of the document



isReadOnly
public boolean isReadOnly()(Code)
This will tell if the object has been set as read only. true if the object is in read only mode.



setCanAssembleDocument
public void setCanAssembleDocument(boolean allowAssembly)(Code)
Set if the user can insert/rotate/delete pages. This method will have no effect if the object is in read only mode
Parameters:
  allowAssembly - A boolean determining if the user can assemble the document.



setCanExtractContent
public void setCanExtractContent(boolean allowExtraction)(Code)
Set if the user can extract content from the document. This method will have no effect if the object is in read only mode
Parameters:
  allowExtraction - A boolean determining if the user can extract contentfrom the document.



setCanExtractForAccessibility
public void setCanExtractForAccessibility(boolean allowExtraction)(Code)
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
Parameters:
  allowExtraction - A boolean determining if the user can extract contentfrom the document.



setCanFillInForm
public void setCanFillInForm(boolean allowFillingInForm)(Code)
Set if the user can fill in interactive forms. This method will have no effect if the object is in read only mode
Parameters:
  allowFillingInForm - A boolean determining if the user can fill in interactive forms.



setCanModify
public void setCanModify(boolean allowModifications)(Code)
Set if the user can modify the document. This method will have no effect if the object is in read only mode
Parameters:
  allowModifications - A boolean determining if the user can modify the document.



setCanModifyAnnotations
public void setCanModifyAnnotations(boolean allowAnnotationModification)(Code)
Set if the user can modify annotations. This method will have no effect if the object is in read only mode
Parameters:
  allowAnnotationModification - A boolean determining if the user can modify annotations.



setCanPrint
public void setCanPrint(boolean allowPrinting)(Code)
Set if the user can print. This method will have no effect if the object is in read only mode
Parameters:
  allowPrinting - A boolean determining if the user can print.



setCanPrintDegraded
public void setCanPrintDegraded(boolean allowAssembly)(Code)
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
Parameters:
  allowAssembly - A boolean determining if the user can print thedocument in a degraded format.



setReadOnly
public void setReadOnly()(Code)
Locks the access permission read only (ie, the setters will have no effects). After that, the object cannot be unlocked. This method is used for the currentAccessPermssion of a document to avoid users to change access permission.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.