Class DocuSignTool


  • public class DocuSignTool
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      DocuSignTool()  
    • Method Summary

      Modifier and Type Method Description
      static java.lang.String authentJWT()  
      static java.lang.String authentJWT​(Grant g)
      Back-end authentication without OAutH redirection
      static void clearCache()  
      static DocuSignTool.DocuSignStatus getDocument​(Grant g, java.lang.String envelopeId, boolean withDocs)
      Call DocuSign with current document status
      static DocuSignTool.DocuSignStatus getDocument​(java.lang.String envelopeId, boolean withDocs)
      Call DocuSign with current document status
      static java.lang.String sendEnvelope​(java.lang.String accountId, java.lang.String subject, java.lang.String[] pdfPaths, java.lang.String[] pdfNames, java.lang.String[] signerEmails, java.lang.String[] signerNames, java.lang.String[][] signerAnchors, java.lang.String[][] initialAnchors, java.lang.String object)
      Send envelope with documents and signers
      static java.lang.String sendEnvelope​(java.lang.String accountId, java.lang.String subject, java.lang.String pdfPath, java.lang.String pdfName, java.lang.String signerEmail, java.lang.String signerName, java.lang.String signerAnchor, java.lang.String object)
      Send envelope with one document and one signer
      static void webhook​(DocuSignTool.DocuSignStatus doc)
      Web-hook callback: call the docuSign hook of target object from public servlet /docusign
      static void webhook​(java.io.InputStream in)
      Web-hook callback: call the docuSign hook of target object from public servlet /docusign
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • STATUS_DELIVERED

        public static final java.lang.String STATUS_DELIVERED
        See Also:
        Constant Field Values
      • STATUS_COMPLETED

        public static final java.lang.String STATUS_COMPLETED
        See Also:
        Constant Field Values
    • Constructor Detail

      • DocuSignTool

        public DocuSignTool()
    • Method Detail

      • sendEnvelope

        public static java.lang.String sendEnvelope​(java.lang.String accountId,
                                                    java.lang.String subject,
                                                    java.lang.String pdfPath,
                                                    java.lang.String pdfName,
                                                    java.lang.String signerEmail,
                                                    java.lang.String signerName,
                                                    java.lang.String signerAnchor,
                                                    java.lang.String object)
        Send envelope with one document and one signer
        Parameters:
        accountId - API account
        subject - Email subject
        pdfPath - Path to PDF document
        pdfName - Name of file
        signerEmail - Signer email
        signerName - Signer full name
        signerAnchor - Anchor to localize the signature
        object - Related object for callback
        Returns:
        envelope ID to store for further usage (web-hook or call)
      • sendEnvelope

        public static java.lang.String sendEnvelope​(java.lang.String accountId,
                                                    java.lang.String subject,
                                                    java.lang.String[] pdfPaths,
                                                    java.lang.String[] pdfNames,
                                                    java.lang.String[] signerEmails,
                                                    java.lang.String[] signerNames,
                                                    java.lang.String[][] signerAnchors,
                                                    java.lang.String[][] initialAnchors,
                                                    java.lang.String object)
        Send envelope with documents and signers
        Parameters:
        accountId - API account
        subject - Email subject
        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)
        object - Related object with hook "docuSign"
        Returns:
        envelope ID to store for further usage (web-hook or call)
      • webhook

        public static void webhook​(java.io.InputStream in)
                            throws java.lang.Exception
        Web-hook callback: call the docuSign hook of target object from public servlet /docusign
        Throws:
        java.lang.Exception
      • webhook

        public static void webhook​(DocuSignTool.DocuSignStatus doc)
        Web-hook callback: call the docuSign hook of target object from public servlet /docusign
      • getDocument

        public static DocuSignTool.DocuSignStatus getDocument​(java.lang.String envelopeId,
                                                              boolean withDocs)
        Call DocuSign with current document status
        Parameters:
        envelopeId - Envelope ID
        withDocs - Get the joined files (slower)
        Returns:
        DocuSign status
      • getDocument

        public static DocuSignTool.DocuSignStatus getDocument​(Grant g,
                                                              java.lang.String envelopeId,
                                                              boolean withDocs)
        Call DocuSign with current document status
        Parameters:
        g - Grant
        envelopeId - Envelope ID
        withDocs - Get the joined files (slower)
        Returns:
        DocuSign status
      • authentJWT

        public static java.lang.String authentJWT()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • authentJWT

        public static java.lang.String authentJWT​(Grant g)
                                           throws java.lang.Exception
        Back-end authentication without OAutH redirection
        Returns:
        accountId or null
        Throws:
        java.lang.Exception
      • clearCache

        public static void clearCache()