boolean to Boolean

This commit is contained in:
Ludy87 2025-05-11 08:09:24 +02:00
parent 5312227586
commit c07908d4ed
No known key found for this signature in database
GPG Key ID: 92696155E0220F94
2 changed files with 28 additions and 24 deletions

View File

@ -63,14 +63,16 @@ public class PasswordController {
String ownerPassword = request.getOwnerPassword();
String password = request.getPassword();
int keyLength = request.getKeyLength();
boolean preventAssembly = request.isPreventAssembly();
boolean preventExtractContent = request.isPreventExtractContent();
boolean preventExtractForAccessibility = request.isPreventExtractForAccessibility();
boolean preventFillInForm = request.isPreventFillInForm();
boolean preventModify = request.isPreventModify();
boolean preventModifyAnnotations = request.isPreventModifyAnnotations();
boolean preventPrinting = request.isPreventPrinting();
boolean preventPrintingFaithful = request.isPreventPrintingFaithful();
boolean preventAssembly = Boolean.TRUE.equals(request.getPreventAssembly());
boolean preventExtractContent = Boolean.TRUE.equals(request.getPreventExtractContent());
boolean preventExtractForAccessibility =
Boolean.TRUE.equals(request.getPreventExtractForAccessibility());
boolean preventFillInForm = Boolean.TRUE.equals(request.getPreventFillInForm());
boolean preventModify = Boolean.TRUE.equals(request.getPreventModify());
boolean preventModifyAnnotations =
Boolean.TRUE.equals(request.getPreventModifyAnnotations());
boolean preventPrinting = Boolean.TRUE.equals(request.getPreventPrinting());
boolean preventPrintingFaithful = Boolean.TRUE.equals(request.getPreventPrintingFaithful());
PDDocument document = pdfDocumentFactory.load(fileInput);
AccessPermission ap = new AccessPermission();

View File

@ -32,29 +32,31 @@ public class AddPasswordRequest extends PDFFile {
requiredMode = Schema.RequiredMode.REQUIRED)
private int keyLength = 256;
@Schema(description = "Whether document assembly is prevented", example = "false")
private boolean preventAssembly;
@Schema(description = "Whether document assembly is prevented", defaultValue = "false")
private Boolean preventAssembly;
@Schema(description = "Whether content extraction is prevented", example = "false")
private boolean preventExtractContent;
@Schema(description = "Whether content extraction is prevented", defaultValue = "false")
private Boolean preventExtractContent;
@Schema(
description = "Whether content extraction for accessibility is prevented",
example = "false")
private boolean preventExtractForAccessibility;
defaultValue = "false")
private Boolean preventExtractForAccessibility;
@Schema(description = "Whether form filling is prevented", example = "false")
private boolean preventFillInForm;
@Schema(description = "Whether form filling is prevented", defaultValue = "false")
private Boolean preventFillInForm;
@Schema(description = "Whether document modification is prevented", example = "false")
private boolean preventModify;
@Schema(description = "Whether document modification is prevented", defaultValue = "false")
private Boolean preventModify;
@Schema(description = "Whether modification of annotations is prevented", example = "false")
private boolean preventModifyAnnotations;
@Schema(
description = "Whether modification of annotations is prevented",
defaultValue = "false")
private Boolean preventModifyAnnotations;
@Schema(description = "Whether printing of the document is prevented", example = "false")
private boolean preventPrinting;
@Schema(description = "Whether printing of the document is prevented", defaultValue = "false")
private Boolean preventPrinting;
@Schema(description = "Whether faithful printing is prevented", example = "false")
private boolean preventPrintingFaithful;
@Schema(description = "Whether faithful printing is prevented", defaultValue = "false")
private Boolean preventPrintingFaithful;
}