Source Code Cross Referenced for PDFEncryptionParams.java in  » Graphic-Library » fop » org » apache » fop » pdf » 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 » Graphic Library » fop » org.apache.fop.pdf 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        /* $Id: PDFEncryptionParams.java 426576 2006-07-28 15:44:37Z jeremias $ */
019:
020:        package org.apache.fop.pdf;
021:
022:        /**
023:         * This class holds the parameters for PDF encryption.
024:         */
025:        public class PDFEncryptionParams {
026:
027:            private String userPassword = ""; //May not be null
028:            private String ownerPassword = ""; //May not be null
029:            private boolean allowPrint = true;
030:            private boolean allowCopyContent = true;
031:            private boolean allowEditContent = true;
032:            private boolean allowEditAnnotations = true;
033:
034:            /**
035:             * Creates a new instance.
036:             * @param userPassword the user password
037:             * @param ownerPassword the owner password
038:             * @param allowPrint true if printing is allowed
039:             * @param allowCopyContent true if copying content is allowed
040:             * @param allowEditContent true if editing content is allowed
041:             * @param allowEditAnnotations true if editing annotations is allowed
042:             */
043:            public PDFEncryptionParams(String userPassword,
044:                    String ownerPassword, boolean allowPrint,
045:                    boolean allowCopyContent, boolean allowEditContent,
046:                    boolean allowEditAnnotations) {
047:                setUserPassword(userPassword);
048:                setOwnerPassword(ownerPassword);
049:                setAllowPrint(allowPrint);
050:                setAllowCopyContent(allowCopyContent);
051:                setAllowEditContent(allowEditContent);
052:                setAllowEditAnnotations(allowEditAnnotations);
053:            }
054:
055:            /**
056:             * Default constructor initializing to default values.
057:             */
058:            public PDFEncryptionParams() {
059:                //nop
060:            }
061:
062:            /**
063:             * Indicates whether copying content is allowed.
064:             * @return true if copying is allowed
065:             */
066:            public boolean isAllowCopyContent() {
067:                return allowCopyContent;
068:            }
069:
070:            /**
071:             * Indicates whether editing annotations is allowed.
072:             * @return true is editing annotations is allowed
073:             */
074:            public boolean isAllowEditAnnotations() {
075:                return allowEditAnnotations;
076:            }
077:
078:            /**
079:             * Indicates whether editing content is allowed.
080:             * @return true if editing content is allowed
081:             */
082:            public boolean isAllowEditContent() {
083:                return allowEditContent;
084:            }
085:
086:            /**
087:             * Indicates whether printing is allowed.
088:             * @return true if printing is allowed
089:             */
090:            public boolean isAllowPrint() {
091:                return allowPrint;
092:            }
093:
094:            /**
095:             * Returns the owner password.
096:             * @return the owner password, an empty string if no password applies
097:             */
098:            public String getOwnerPassword() {
099:                return ownerPassword;
100:            }
101:
102:            /**
103:             * Returns the user password.
104:             * @return the user password, an empty string if no password applies
105:             */
106:            public String getUserPassword() {
107:                return userPassword;
108:            }
109:
110:            /**
111:             * Sets the permission for copying content.
112:             * @param allowCopyContent true if copying content is allowed
113:             */
114:            public void setAllowCopyContent(boolean allowCopyContent) {
115:                this .allowCopyContent = allowCopyContent;
116:            }
117:
118:            /**
119:             * Sets the permission for editing annotations.
120:             * @param allowEditAnnotations true if editing annotations is allowed
121:             */
122:            public void setAllowEditAnnotations(boolean allowEditAnnotations) {
123:                this .allowEditAnnotations = allowEditAnnotations;
124:            }
125:
126:            /**
127:             * Sets the permission for editing content.
128:             * @param allowEditContent true if editing annotations is allowed
129:             */
130:            public void setAllowEditContent(boolean allowEditContent) {
131:                this .allowEditContent = allowEditContent;
132:            }
133:
134:            /**
135:             * Sets the persmission for printing.
136:             * @param allowPrint true if printing is allowed
137:             */
138:            public void setAllowPrint(boolean allowPrint) {
139:                this .allowPrint = allowPrint;
140:            }
141:
142:            /**
143:             * Sets the owner password.
144:             * @param ownerPassword The owner password to set, null or an empty String
145:             * if no password is applicable
146:             */
147:            public void setOwnerPassword(String ownerPassword) {
148:                if (ownerPassword == null) {
149:                    this .ownerPassword = "";
150:                } else {
151:                    this .ownerPassword = ownerPassword;
152:                }
153:            }
154:
155:            /**
156:             * Sets the user password.
157:             * @param userPassword The user password to set, null or an empty String
158:             * if no password is applicable
159:             */
160:            public void setUserPassword(String userPassword) {
161:                if (userPassword == null) {
162:                    this .userPassword = "";
163:                } else {
164:                    this.userPassword = userPassword;
165:                }
166:            }
167:
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.