All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.pdfservices.operation.pdfjobs.result.pdfproperties.EncryptionSettings Maven / Gradle / Ivy

Go to download

Adobe PDF Services SDK allows you to access RESTful APIs to create, convert, and manipulate PDFs within your applications. Older versions can be found under groupId: com.adobe.documentservices, artifactId: pdftools-sdk

There is a newer version: 4.2.0
Show newest version
/*
 * Copyright 2024 Adobe
 * All Rights Reserved.
 *
 * NOTICE: Adobe permits you to use, modify, and distribute this file in
 * accordance with the terms of the Adobe license agreement accompanying
 * it. If you have received this file from a source other than Adobe,
 * then your use, modification, or distribution of it requires the prior
 * written permission of Adobe.
 */
package com.adobe.pdfservices.operation.pdfjobs.result.pdfproperties;

/**
 * This class provides information about the encryption settings of the specified PDF file, such as user and owner
 * passwords,
 * encryption algorithm etc.
 */
public class EncryptionSettings {

    public Boolean encryptAttachmentsOnly;

    public Boolean hasOwnerPassword;

    public Boolean encryptMetadata;

    public Boolean hasUserPassword;

    public Integer bitLength;

    public String algorithm;

    /**
     * Returns a boolean specifying whether only the file attachments in the specified PDF file are encrypted.
     *
     * @return {@code true} if only the file attachments in the specified PDF file are encrypted. False otherwise.
     */
    public Boolean onlyAttachmentsEncrypted() {
        return encryptAttachmentsOnly;
    }

    /**
     * Returns a boolean specifying whether the owner password is set for the specified PDF file.
     *
     * @return {@code true} if the owner password is set for the specified PDF file. False otherwise.
     */
    public Boolean isOwnerPasswordSet() {
        return hasOwnerPassword;
    }

    /**
     * Returns a boolean specifying whether the metadata of the specified PDF file is encrypted or not.
     *
     * @return {@code true} if the metadata of the specified PDF file is encrypted. False otherwise.
     */
    public Boolean isMetadataEncrypted() {
        return encryptMetadata;
    }

    /**
     * Returns a boolean specifying whether the user password is set for the specified PDF file.
     *
     * @return {@code true} if the user password is set for the specified PDF file. False otherwise.
     */
    public Boolean isUserPasswordSet() {
        return hasUserPassword;
    }

    /**
     * Returns the number of bits in the key used by a cryptographic algorithm to encrypt the specified PDF file.
     *
     * @return An Integer denoting the number of bits in the key used by a cryptographic algorithm.
     */
    public Integer getBitLength() {
        return bitLength;
    }

    /**
     * Returns a string specifying the encryption algorithm used to encrypt the specified PDF file - e.g. "AES" etc.
     *
     * @return A String denoting the name of the encryption algorithm used to encrypt the specified PDF file.
     */
    public String getAlgorithm() {
        return algorithm;
    }

    void setEncryptAttachmentsOnly(Boolean encryptAttachmentsOnly) {
        this.encryptAttachmentsOnly = encryptAttachmentsOnly;
    }

    void setHasOwnerPassword(Boolean hasOwnerPassword) {
        this.hasOwnerPassword = hasOwnerPassword;
    }

    void setEncryptMetadata(Boolean encryptMetadata) {
        this.encryptMetadata = encryptMetadata;
    }

    void setHasUserPassword(Boolean hasUserPassword) {
        this.hasUserPassword = hasUserPassword;
    }

    void setBitLength(Integer bitLength) {
        this.bitLength = bitLength;
    }

    void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy