PDFTransformParametersUB1.java
5.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.cos.CosArray
* com.adobe.internal.pdftoolkit.core.cos.CosDictionary
* com.adobe.internal.pdftoolkit.core.cos.CosObject
* com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFUnsupportedFeatureException
* com.adobe.internal.pdftoolkit.core.types.ASName
* com.adobe.internal.pdftoolkit.core.types.ASString
*/
package com.adobe.internal.pdftoolkit.pdf.digsig;
import com.adobe.internal.pdftoolkit.core.cos.CosArray;
import com.adobe.internal.pdftoolkit.core.cos.CosDictionary;
import com.adobe.internal.pdftoolkit.core.cos.CosObject;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFUnsupportedFeatureException;
import com.adobe.internal.pdftoolkit.core.types.ASName;
import com.adobe.internal.pdftoolkit.core.types.ASString;
import com.adobe.internal.pdftoolkit.pdf.digsig.PDFTransformParametersUR;
import com.adobe.internal.pdftoolkit.pdf.digsig.PDFURAnnots;
import com.adobe.internal.pdftoolkit.pdf.digsig.PDFURDocument;
import com.adobe.internal.pdftoolkit.pdf.digsig.PDFURForm;
import com.adobe.internal.pdftoolkit.pdf.digsig.PDFURSignature;
import com.adobe.internal.pdftoolkit.pdf.digsig.PDFUsageRight;
import com.adobe.internal.pdftoolkit.pdf.document.PDFCosObject;
public class PDFTransformParametersUB1
extends PDFTransformParametersUR {
private static final ASName k_TimeOfUbiquitization = ASName.create((String)"TimeOfUbiquitization");
private PDFTransformParametersUB1(CosObject cosObject) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
super(cosObject);
}
public static PDFTransformParametersUB1 getInstance(CosObject cosObject) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
if (PDFCosObject.checkNullCosObject(cosObject) == null) {
return null;
}
PDFTransformParametersUB1 pdfObject = PDFCosObject.getCachedInstance(cosObject, PDFTransformParametersUB1.class);
if (pdfObject == null) {
pdfObject = new PDFTransformParametersUB1(cosObject);
}
return pdfObject;
}
public String getTimeOfUbiquitization() throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
if (this.getCosDictionary().containsKey((Object)k_TimeOfUbiquitization)) {
return this.getDictionaryTextStringValue(k_TimeOfUbiquitization);
}
return "";
}
public String getVersion() throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
return this.getDictionaryDoubleValueAsString(ASName.k_V);
}
public String[] getRightsID() throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
CosArray cosArray = this.getDictionaryArrayValue(ASName.create((String)"RightsID"));
if (cosArray == null || cosArray.size() == 0) {
return null;
}
String[] rightsID = new String[cosArray.size()];
int addAtPos = 0;
for (int pos = 0; pos < cosArray.size(); ++pos) {
ASString asString;
if (cosArray.getType(pos) != 4 || (asString = cosArray.getString(pos)) == null) continue;
rightsID[addAtPos++] = asString.asString();
}
return rightsID;
}
public void setDocumentUsageRights(PDFURDocument[] rights) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setAnnotationUsageRights(PDFURAnnots[] rights) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setFormUsageRights(PDFURForm[] rights) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
void setFormExUsageRights(PDFURForm[] rights) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setSignatureUsageRights(PDFURSignature[] rights) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setEFUsageRights(PDFUsageRight[] rights) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setMessage(String msg) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setRestrictPermissions(boolean value) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
public void setVersion(String version) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
throw new PDFUnsupportedFeatureException("Cannot set any UB1 rights");
}
}