Package com.simplicite.util.tools
Class DocuSignTool
- java.lang.Object
-
- com.simplicite.util.tools.DocuSignTool
-
public class DocuSignTool extends java.lang.Object
DocuSign® toolbox
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DocuSignTool.DocuSignStatus
Document status
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[][]
ENVELOPE_EVENTS
Envelope events: 1=Active | event name | attach documentsstatic java.lang.String[][]
RECIPIENT_EVENTS
Recipient events: 1=Active | event name | attach documentsstatic java.lang.String
STATUS_AVOIDED
static java.lang.String
STATUS_COMPLETED
static java.lang.String
STATUS_DECLINED
static java.lang.String
STATUS_DELIVERED
static java.lang.String
STATUS_SENT
static java.lang.String
STATUS_SIGNED
-
Constructor Summary
Constructors Constructor Description DocuSignTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
authentJWT()
Back-end authentication without OAutH redirectionstatic java.lang.String
authentJWT(Grant g)
Back-end authentication without OAutH redirectionstatic void
clearCache()
Clear cachestatic DocuSignTool.DocuSignStatus
getDocument(Grant g, java.lang.String envelopeId, boolean withDocs)
Call DocuSign with current document statusstatic DocuSignTool.DocuSignStatus
getDocument(java.lang.String envelopeId, boolean withDocs)
Call DocuSign with current document statusstatic 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 signersstatic 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 signerstatic void
webhook(DocuSignTool.DocuSignStatus doc)
Web-hook callback: call the docuSign hook of target object from public servlet /docusignstatic void
webhook(java.io.InputStream in)
Web-hook callback: call the docuSign hook of target object from public servlet /docusign
-
-
-
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_SENT
public static final java.lang.String STATUS_SENT
- See Also:
- Constant Field Values
-
STATUS_DELIVERED
public static final java.lang.String STATUS_DELIVERED
- See Also:
- Constant Field Values
-
STATUS_SIGNED
public static final java.lang.String STATUS_SIGNED
- See Also:
- Constant Field Values
-
STATUS_COMPLETED
public static final java.lang.String STATUS_COMPLETED
- See Also:
- Constant Field Values
-
STATUS_DECLINED
public static final java.lang.String STATUS_DECLINED
- See Also:
- Constant Field Values
-
STATUS_AVOIDED
public static final java.lang.String STATUS_AVOIDED
- See Also:
- Constant Field Values
-
-
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 accountsubject
- Email subjectpdfPath
- Path to PDF documentpdfName
- Name of filesignerEmail
- Signer emailsignerName
- Signer full namesignerAnchor
- Anchor to localize the signatureobject
- 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 accountsubject
- Email subjectpdfPaths
- Paths to PDF documentpdfNames
- Names of filesignerEmails
- Signers emailsignerNames
- Signers full namesignerAnchors
- 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 javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
Web-hook callback: call the docuSign hook of target object from public servlet /docusign- Parameters:
in
- Input stream- Throws:
java.lang.Exception
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
-
webhook
public static void webhook(DocuSignTool.DocuSignStatus doc)
Web-hook callback: call the docuSign hook of target object from public servlet /docusign- Parameters:
doc
- Document
-
getDocument
public static DocuSignTool.DocuSignStatus getDocument(java.lang.String envelopeId, boolean withDocs)
Call DocuSign with current document status- Parameters:
envelopeId
- Envelope IDwithDocs
- 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
- GrantenvelopeId
- Envelope IDwithDocs
- Get the joined files (slower)- Returns:
- DocuSign status
-
authentJWT
public static java.lang.String authentJWT() throws java.lang.Exception
Back-end authentication without OAutH redirection- Returns:
- accountId or null
- Throws:
java.lang.Exception
-
authentJWT
public static java.lang.String authentJWT(Grant g) throws java.lang.Exception
Back-end authentication without OAutH redirection- Parameters:
g
- Grant- Returns:
- accountId or null
- Throws:
java.lang.Exception
-
clearCache
public static void clearCache()
Clear cache
-
-