Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>com.docusign.App</start-class>
<java.version>1.8</java.version>
<lombok.version>1.14.8</lombok.version>
<lombok.version>1.18.6</lombok.version>
<log4jdbc.log4j2.version>1.16</log4jdbc.log4j2.version>
<rest.assured.version>2.3.3</rest.assured.version>
</properties>
Expand Down
25 changes: 25 additions & 0 deletions 25 src/main/webapp/WEB-INF/templates/views/pages/ds_return.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../partials/head.jsp"/>

<h2>Returned data from DocuSign!</h2>
<p>Data:</p>

<c:if test="${event != null}">
<p><strong>event: ${event}.</strong> This event parameter is supplied by DocuSign via the redirect URL.
Since it could have been spoofed, don't make business decisions based on
its value. Instead, query DocuSign as appropriate.</p>
</c:if>

<c:if test="${qpEnvelopeId != null}">
<p><strong>envelopeId: ${qpEnvelopeId}.</strong> The envelopeId parameter is supplied by DocuSign.</p>
</c:if>

<c:if test="${state != null}">
<p><strong>state: ${state}.</strong> This example state was sent to DocuSign and has now been received back.
It is usually better to store state in your web framework's session.</p>
</c:if>


<p><a href="/">Continue</a></p>

<jsp:include page="../partials/foot.jsp"/>
40 changes: 40 additions & 0 deletions 40 src/main/webapp/WEB-INF/templates/views/pages/examples/eg001.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>1. Embedded Signing</h4>
<p>This example sends an envelope, and then uses Embedded signing for the first signer.</p>
<p>Embedded signing provides a smoother user experience for the signer: DocuSign signing is initiated from
your website.</p>
<c:if test="${showDoc}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API methods used:
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create">Envelopes::create</a>
and
<a target='_blank' rel="noopener noreferrer"
href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient">EnvelopeViews::createRecipient</a>.
</p>
<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<form class="eg" action="" method="post" data-busy="form">
<div class="form-group">
<label for="signerEmail">Signer Email</label>
<input type="email" class="form-control" id="signerEmail" name="signerEmail"
aria-describedby="emailHelp" placeholder="pat@example.com" required
value="${locals.dsConfig.signerEmail}">
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
<div class="form-group">
<label for="signerName">Signer Name</label>
<input type="text" class="form-control" id="signerName" placeholder="Pat Johnson" name="signerName"
value="${locals.dsConfig.signerName}" required>
</div>
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Submit</button>
</form>

<jsp:include page="../../partials/foot.jsp"/>
53 changes: 53 additions & 0 deletions 53 src/main/webapp/WEB-INF/templates/views/pages/examples/eg002.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>2. Send an envelope with a remote (email) signer and cc recipient</h4>
<p>The envelope includes a pdf, Word, and HTML document. Anchor text
(<a href="https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience">AutoPlace</a>)
is used to position the signing fields in the documents.
</p>
<p>This is a general example of creating and sending an envelope (a signing request) to multiple recipients,
with multiple documents, and with signature fields for the documents.</p>
<c:if test="${showDoc}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>

<p>API method used:
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create">Envelopes::create</a>.
</p>

<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<form class="eg" action="" method="post" data-busy="form">
<div class="form-group">
<label for="signerEmail">Signer Email</label>
<input type="email" class="form-control" id="signerEmail" name="signerEmail"
aria-describedby="emailHelp" placeholder="pat@example.com" required
value="${locals.dsConfig.signerEmail}">
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
<div class="form-group">
<label for="signerName">Signer Name</label>
<input type="text" class="form-control" id="signerName" placeholder="Pat Johnson" name="signerName"
value="${locals.dsConfig.signerName}" required>
</div>
<div class="form-group">
<label for="ccEmail">CC Email</label>
<input type="email" class="form-control" id="ccEmail" name="ccEmail"
aria-describedby="emailHelp" placeholder="pat@example.com" required>
<small id="emailHelp" class="form-text text-muted">The email and/or name for the cc recipient must be different
from the signer.
</small>
</div>
<div class="form-group">
<label for="ccName">CC Name</label>
<input type="text" class="form-control" id="ccName" placeholder="Pat Johnson" name="ccName"
required>
</div>
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Submit</button>
</form>

<jsp:include page="../../partials/foot.jsp"/>
25 changes: 25 additions & 0 deletions 25 src/main/webapp/WEB-INF/templates/views/pages/examples/eg003.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>3. List envelopes in the user's account</h4>
<p>List the envelopes created in the last 30 days.</p>
<p>This example demonstrates how to query DocuSign about envelopes sent by the current user.</p>
<c:if test="${showDoc}">
<p><a target='_blank' rel="noopener noreferrer" href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API method used:
<a target='_blank' rel="noopener noreferrer"
href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges">Envelopes::listStatusChanges</a>.
</p>
<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<form class="eg" action="" method="post" data-busy="form">
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Continue</button>
</form>

<jsp:include page="../../partials/foot.jsp"/>
48 changes: 48 additions & 0 deletions 48 src/main/webapp/WEB-INF/templates/views/pages/examples/eg004.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>4. Get an envelope's basic information and status</h4>
<p>List the basic information about an envelope, including its overall status.
Additional API/SDK methods may be used to get additional information about the
envelope, its documents, recipients, etc.</p>

<p>This example demonstrates how to obtain the latest information about
an envelope from DocuSign. Often an alternative is to use Connect
to enable DocuSign to proactively send your application updates when the
status of an envelope changes.
</p>

<c:if test="${showDoc == true}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API method used:
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/get">Envelopes::get</a>.
</p>

<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<c:choose>
<c:when test="${envelopeOk == true}">
<p>The envelope you created via example 2 will be queried.</p>

<form class="eg" action="" method="post" data-busy="form">
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:when>
<c:otherwise>
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
Thank you.</p>

<form class="eg" action="eg002" method="get">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:otherwise>
</c:choose>


<jsp:include page="../../partials/foot.jsp"/>
40 changes: 40 additions & 0 deletions 40 src/main/webapp/WEB-INF/templates/views/pages/examples/eg005.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>5. List an envelope's recipients and their status</h4>
<p>List the envelope's recipients, including their current status.</p>

<c:if test="${showDoc}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API method used:
<a target='_blank' rel="noopener noreferrer"
href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipients/list">EnvelopeRecipients::list</a>.
</p>
<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<c:choose>
<c:when test="${envelopeOk}">
<p>The envelope you created via example 2 will be queried.</p>

<form class="eg" action="" method="post" data-busy="form">
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:when>
<c:otherwise>
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
Thank you.</p>

<form class="eg" action="eg002" method="get">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:otherwise>
</c:choose>


<jsp:include page="../../partials/foot.jsp"/>
43 changes: 43 additions & 0 deletions 43 src/main/webapp/WEB-INF/templates/views/pages/examples/eg006.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>6. List an envelope's documents</h4>
<p>List the envelope's documents. A <em>Certificate of Completion</em> document
is also associated with every envelope.
</p>

<p>This method is often used to dynamically create a list of an envelope's documents
in preparation for enabling your user to download one or more of the documents.</p>
<c:if test="${showDoc}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API method used:
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeDocuments/list">EnvelopeDocuments::list</a>.
</p>

<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<c:choose>
<c:when test="${envelopeOk}">
<p>The envelope you created via example 2 will be queried.</p>

<form class="eg" action="" method="post" data-busy="form">
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:when>
<c:otherwise>
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
Thank you.</p>

<form class="eg" action="eg002" method="get">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:otherwise>
</c:choose>

<jsp:include page="../../partials/foot.jsp"/>
71 changes: 71 additions & 0 deletions 71 src/main/webapp/WEB-INF/templates/views/pages/examples/eg007.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>7. Download a document from an envelope</h4>
<p>An envelope's documents can be downloaded one by one or as a complete set.</p>
<p>Document download options:</p>
<ul>
<li><strong>Combined</strong>: a PDF with the combined content of all documents and the
certificate
</li>
<li><strong>Zip Archive</strong>: a ZIP archive that contains all of the PDF documents,
the certificate, and any .WAV files used for voice authentication.
</li>
<li>The envelope's individual documents</li>
<li>The envelope's Certificate of Completion</li>
</ul>
<c:if test="${showDoc}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API method used:
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeDocuments/get">EnvelopeDocuments::get</a>.
</p>

<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<c:choose>
<c:when test="${not envelopeOk}">
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
You will then need to use example 6 to create the list of documents.<br/>
Thank you.</p>

<form class="eg" action="eg002" method="get">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:when>
<c:when test="${not documentsOk}">
<p>Problem: please first create a list of the envelope's documents using
<a href="eg006">example 6.</a> <br/>
Thank you.</p>

<form class="eg" action="eg006" method="get">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:when>
<c:otherwise>
<p>Please choose a document.<br/>
The document list is from your results for example 6.</p>

<form class="eg" action="" method="post" data-busy="form-download">
<div class="form-group">
<label for="docSelect">Document selection</label>
<select class="custom-select" id="docSelect"
name="docSelect" aria-describedby="emailHelp">
<c:forEach begin="0" end="${documentOptions.size()}" varStatus="loop">
<option value="${documentOptions[loop.index].documentId}">
${documentOptions[loop.index].text}
</option>
</c:forEach>
</select>
</div>
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Continue</button>
</form>
</c:otherwise>
</c:choose>

<jsp:include page="../../partials/foot.jsp"/>
34 changes: 34 additions & 0 deletions 34 src/main/webapp/WEB-INF/templates/views/pages/examples/eg008.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../partials/head.jsp"/>

<h4>8. Create a template</h4>
<p>Create a template with two roles, <strong>signer</strong> and <strong>cc</strong>.
The template includes three documents.
</p>

<p>Templates are usually created using the DocuSign web tool. This example creates
a template that will later be used by other examples in this launcher. </p>

<p>This example first lists the user's templates and only creates a new template if one does not already exist in your
account.
</p>
<c:if test="${showDoc}">
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
</c:if>


<p>API methods used:
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Templates/Templates/list">Templates::list</a>,
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Templates/Templates/create">Templates::create</a>.
</p>

<p>
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
</p>

<form class="eg" action="" method="post" data-busy="form">
<input type="hidden" name="_csrf" value="${csrfToken}">
<button type="submit" class="btn btn-docu">Continue</button>
</form>

<jsp:include page="../../partials/foot.jsp"/>
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.