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

com.adobe.pdfservices.operation.pdfjobs.params.electronicseal.FieldOptions 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.params.electronicseal;

/**
 * Parameters specifying options related to the seal field required for {@link PDFElectronicSealParams}.
 */
public class FieldOptions {

    private FieldLocation fieldLocation;

    private Integer pageNumber;

    private String fieldName;

    private Boolean visible;

    private FieldOptions(Builder builder) {
        this.fieldLocation = builder.fieldLocation;
        this.pageNumber = builder.pageNumber;
        this.fieldName = builder.fieldName;
        this.visible = builder.visible;
    }

    /**
     * Returns the intended field name to be used.
     *
     * @return the seal field name
     */
    public String getFieldName() {
        return fieldName;
    }

    /**
     * Returns the intended visibility flag for the electronic seal.
     *
     * @return the visibility flag
     */
    public Boolean isVisible() {
        return visible;
    }

    /**
     * Returns the intended page number for the electronic seal.
     *
     * @return the page number
     */
    public Integer getPageNumber() {
        return pageNumber;
    }

    /**
     * Returns a {@code FieldLocation} instance specifying coordinates for the electronic seal.
     *
     * @return the seal field location options
     */
    public FieldLocation getFieldLocation() {
        return fieldLocation;
    }

    /**
     * Builds a {@link FieldOptions} instance.
     */
    public static class Builder {

        private FieldLocation fieldLocation;

        private Integer pageNumber;

        private String fieldName;

        private Boolean visible = true;

        /**
         * Constructs a {@code Builder} instance.
         */
        public Builder(String fieldName) {
            this.fieldName = fieldName;
        }

        /**
         * Sets the seal visibility flag.
         * Specifies whether the signature field is visible. The default value of true creates a visible signature.
         *
         * @param visible the seal visibility flag
         * @return this Builder instance to add any additional parameters
         */
        public Builder setVisible(Boolean visible) {
            this.visible = visible;
            return this;
        }

        /**
         * Sets the location for the seal field in the document.
         *
         * @param fieldLocation the seal field location instance
         * @return this Builder instance to add any additional parameters
         */
        public Builder setFieldLocation(FieldLocation fieldLocation) {
            this.fieldLocation = fieldLocation;
            return this;
        }

        /**
         * Sets the page number for seal.
         *
         * @param pageNumber the page number of input pdf document
         * @return this Builder instance to add any additional parameters
         */
        public Builder setPageNumber(Integer pageNumber) {
            this.pageNumber = pageNumber;
            return this;
        }

        /**
         * Returns a new {@link FieldOptions} instance built from the current state of this builder.
         *
         * @return a new {@code FieldOptions} instance
         */
        public FieldOptions build() {
            return new FieldOptions(this);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy