Class DocuSignTool


  • public class DocuSignTool
    extends DocSignProvider
    DocuSign® toolbox. Use reflection to load DocuSign's dependencies in a dedicated classloader
    • Field Detail

      • ENVELOPE_EVENTS

        public static final java.lang.String[][] ENVELOPE_EVENTS
        Envelope events: 1=Active | event name | attach documents
      • RECIPIENT_EVENTS

        public static final java.lang.String[][] RECIPIENT_EVENTS
        Recipient events: 1=Active | event name | attach documents
    • Constructor Detail

      • DocuSignTool

        public DocuSignTool()
    • Method Detail

      • send

        public java.lang.String send​(DocSignProvider.DocSignAccount account,
                                     java.lang.String subject,
                                     java.util.List<java.lang.String> pdfPaths,
                                     java.util.List<java.lang.String> pdfNames,
                                     java.util.List<java.lang.String> signerEmails,
                                     java.util.List<java.lang.String> signerNames,
                                     java.util.List<java.util.List<java.lang.String>> signerAnchors,
                                     java.util.List<java.util.List<java.lang.String>> initialAnchors,
                                     java.util.List<java.util.List<java.lang.String>> stampAnchors,
                                     java.lang.String object)
        Send envelope with documents and signers
        Specified by:
        send in class DocSignProvider
        Parameters:
        account - API account
        subject - Email subject (truncated to 100)
        pdfPaths - Paths to PDF document
        pdfNames - Names of file
        signerEmails - Signers email
        signerNames - Signers full name
        signerAnchors - Anchor to localize the signature per document and signer (null if none)
        initialAnchors - Optional anchor to localize the initials per document and signer (null if none)
        stampAnchors - Optional anchor to localize the stamps per document and signer (null if none)
        object - Related object with hook "docuSign"
        Returns:
        envelope ID to store for further usage (web-hook or call)
      • cancelDocument

        public boolean cancelDocument​(DocSignProvider.DocSignAccount account,
                                      java.lang.String envelopeId,
                                      java.lang.String voidedReason)
        Void an envelope
        Specified by:
        cancelDocument in class DocSignProvider
        Parameters:
        account - API account
        envelopeId - DocuSign envelop ID
        voidedReason - Optional reason
        Returns:
        true if successful
      • getDocument

        public DocSignProvider.DocSignStatus getDocument​(Grant g,
                                                         java.lang.String envelopeId,
                                                         boolean withDocs)
        Call DocuSign with current document status
        Specified by:
        getDocument in class DocSignProvider
        Parameters:
        g - Grant
        envelopeId - Envelope ID
        withDocs - Get the joined files (slower)
        Returns:
        DocuSign status
      • clearCache

        public static void clearCache()
        Clear cache