Skip to content

Commit e5a5dfd

Browse files
Fix javadoc warnings in sign module
DEVSIX-5133
1 parent 91bea8f commit e5a5dfd

File tree

5 files changed

+43
-11
lines changed

5 files changed

+43
-11
lines changed

sign/src/main/java/com/itextpdf/signatures/PdfPKCS7.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,10 @@ public int getSigningInfoVersion() {
609609
private PdfName filterSubtype;
610610

611611
/**
612-
* Getter for the ID of the digest algorithm, e.g. "2.16.840.1.101.3.4.2.1"
612+
* Getter for the ID of the digest algorithm, e.g. "2.16.840.1.101.3.4.2.1".
613+
* See ISO-32000-1, section 12.8.3.3 PKCS#7 Signatures as used in ISO 32000
614+
*
615+
* @return the ID of the digest algorithm
613616
*/
614617
public String getDigestAlgorithmOid() {
615618
return digestAlgorithmOid;
@@ -632,14 +635,18 @@ public String getHashAlgorithm() {
632635
private String digestEncryptionAlgorithmOid;
633636

634637
/**
635-
* Getter for the digest encryption algorithm
638+
* Getter for the digest encryption algorithm.
639+
* See ISO-32000-1, section 12.8.3.3 PKCS#7 Signatures as used in ISO 32000
640+
*
641+
* @return the encryption algorithm
636642
*/
637643
public String getDigestEncryptionAlgorithmOid() {
638644
return digestEncryptionAlgorithmOid;
639645
}
640646

641647
/**
642648
* Get the algorithm used to calculate the message digest, e.g. "SHA1withRSA".
649+
* See ISO-32000-1, section 12.8.3.3 PKCS#7 Signatures as used in ISO 32000
643650
*
644651
* @return the algorithm used to calculate the message digest
645652
*/
@@ -973,7 +980,6 @@ private ASN1EncodableVector buildUnauthenticatedAttributes(byte[] timeStampToken
973980
* exactly the same as in {@link #getEncodedPKCS7(byte[])}.
974981
* <p>
975982
* A simple example:
976-
* <p>
977983
* <pre>
978984
* Calendar cal = Calendar.getInstance();
979985
* PdfPKCS7 pk7 = new PdfPKCS7(key, chain, null, "SHA1", null, false);
@@ -1009,7 +1015,6 @@ public byte[] getAuthenticatedAttributeBytes(byte[] secondDigest, byte[] ocsp, C
10091015
* exactly the same as in {@link #getEncodedPKCS7(byte[])}.
10101016
* <p>
10111017
* A simple example:
1012-
* <p>
10131018
* <pre>
10141019
* Calendar cal = Calendar.getInstance();
10151020
* PdfPKCS7 pk7 = new PdfPKCS7(key, chain, null, "SHA1", null, false);
@@ -1486,7 +1491,9 @@ public Calendar getTimeStampDate() {
14861491
}
14871492

14881493
/**
1489-
* Returns the filter subtype.
1494+
* Getter for the filter subtype.
1495+
*
1496+
* @return the filter subtype
14901497
*/
14911498
public PdfName getFilterSubtype() {
14921499
return filterSubtype;

sign/src/main/java/com/itextpdf/signatures/PdfSignature.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public void setContents(byte[] contents) {
141141

142142
/**
143143
* Gets the /Contents entry value.
144+
* See ISO 32000-1 12.8.1, Table 252 – Entries in a signature dictionary.
145+
*
146+
* @return the signature content
144147
*/
145148
public PdfString getContents() {
146149
return getPdfObject().getAsString(PdfName.Contents);
@@ -157,6 +160,9 @@ public void setCert(byte[] cert) {
157160

158161
/**
159162
* Gets the /Cert entry value of this signature.
163+
* See ISO 32000-1 12.8.1, Table 252 – Entries in a signature dictionary.
164+
*
165+
* @return the signature cert
160166
*/
161167
public PdfString getCert() {
162168
return getPdfObject().getAsString(PdfName.Cert);

sign/src/main/java/com/itextpdf/signatures/PdfSignatureAppearance.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ public boolean isInvisible() {
634634
*
635635
* @return a top-level signature appearance
636636
* @throws IOException if font cannot be created
637-
* @see <a href="https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PPKAppearances.pdf">
638-
* Adobe Pdf Digital Signature Appearances</a> for further details
637+
* @see <a href="https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PPKAppearances.pdf">Adobe Pdf Digital
638+
* Signature Appearances</a>
639639
*/
640640
protected PdfFormXObject getAppearance() throws IOException {
641641
PdfCanvas canvas;

sign/src/main/java/com/itextpdf/signatures/SignaturePermissions.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,30 @@ public class FieldLock {
6666
PdfName action;
6767
/** An array of PdfString values with fieldnames */
6868
PdfArray fields;
69-
/** Creates a FieldLock instance */
69+
70+
/**
71+
* Creates a FieldLock instance.
72+
*
73+
* @param action indicates the set of fields that should be locked
74+
* @param fields an array of text strings containing field names
75+
*/
7076
public FieldLock(PdfName action, PdfArray fields) {
7177
this.action = action;
7278
this.fields = fields;
7379
}
74-
/** Getter for the field lock action. */
80+
81+
/**
82+
* Getter for the field lock action.
83+
*
84+
* @return the action of field lock dictionary
85+
*/
7586
public PdfName getAction() { return action; }
76-
/** Getter for the fields involved in the lock action. */
87+
88+
/**
89+
* Getter for the fields involved in the lock action.
90+
*
91+
* @return the fields of field lock dictionary
92+
*/
7793
public PdfArray getFields() { return fields; }
7894
/** toString method */
7995
public String toString() {
@@ -94,6 +110,9 @@ public String toString() {
94110
* Creates an object that can inform you about the type of signature
95111
* in a signature dictionary as well as some of the permissions
96112
* defined by the signature.
113+
*
114+
* @param sigDict the signature dictionary
115+
* @param previous the signature permissions
97116
*/
98117
public SignaturePermissions(PdfDictionary sigDict, SignaturePermissions previous) {
99118
if (previous != null) {

sign/src/main/java/com/itextpdf/signatures/SignatureUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public String getTranslatedFieldName(String name) {
340340
*
341341
* @param field the signature field name
342342
* @return an InputStream covering the revision. Returns null if it's not a signature field
343-
* @throws IOException
343+
* @throws IOException signals that an I/O exception has occurred.
344344
*/
345345
public InputStream extractRevision(String field) throws IOException {
346346
getSignatureNames();

0 commit comments

Comments
 (0)