Class Document


  • public class Document
    extends AbstractResource
    Represents a document and its associated (optional) form fields and custom fields. It is also populated based on the API response. This response typically contains the file name and index of the document within the signature request.
    • Method Detail

      • getFormFields

        public java.util.List<FormField> getFormFields()
        Returns the form fields for this document.
        Returns:
        List
      • setFormFields

        public void setFormFields​(java.util.List<FormField> formFields)
                           throws HelloSignException
        Overwrites the form fields for this document. This is useful when manually migrating form fields from a template.
        Parameters:
        formFields - List
        Throws:
        HelloSignException - thrown if there is a problem adding the FormFields to this Document.
      • addFormField

        public void addFormField​(FormField formField)
                          throws HelloSignException
        Adds the form field to this document.
        Parameters:
        formField - FormField
        Throws:
        HelloSignException - thrown if there is a problem adding the FormFields to this Document.
      • getCustomFields

        public java.util.List<CustomField> getCustomFields()
        Returns the custom fields for this document.
        Returns:
        List
      • getFile

        public java.io.File getFile()
        Returns the File associated with this document.
        Returns:
        File, or null if it hasn't been set
      • setFile

        public void setFile​(java.io.File file)
        Sets the file associated with this document.
        Parameters:
        file - File
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • hasName

        public boolean hasName()
      • getIndex

        public java.lang.Integer getIndex()
      • setIndex

        public void setIndex​(java.lang.Integer index)