Skip to content

Commit f468142

Browse files
update apiv2 java launcher and restore jsp pages (#14) (#9)
1 parent 67ab476 commit f468142

18 files changed

Lines changed: 877 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2020
<start-class>com.docusign.App</start-class>
2121
<java.version>1.8</java.version>
22-
<lombok.version>1.14.8</lombok.version>
22+
<lombok.version>1.18.6</lombok.version>
2323
<log4jdbc.log4j2.version>1.16</log4jdbc.log4j2.version>
2424
<rest.assured.version>2.3.3</rest.assured.version>
2525
</properties>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../partials/head.jsp"/>
3+
4+
<h2>Returned data from DocuSign!</h2>
5+
<p>Data:</p>
6+
7+
<c:if test="${event != null}">
8+
<p><strong>event: ${event}.</strong> This event parameter is supplied by DocuSign via the redirect URL.
9+
Since it could have been spoofed, don't make business decisions based on
10+
its value. Instead, query DocuSign as appropriate.</p>
11+
</c:if>
12+
13+
<c:if test="${qpEnvelopeId != null}">
14+
<p><strong>envelopeId: ${qpEnvelopeId}.</strong> The envelopeId parameter is supplied by DocuSign.</p>
15+
</c:if>
16+
17+
<c:if test="${state != null}">
18+
<p><strong>state: ${state}.</strong> This example state was sent to DocuSign and has now been received back.
19+
It is usually better to store state in your web framework's session.</p>
20+
</c:if>
21+
22+
23+
<p><a href="/">Continue</a></p>
24+
25+
<jsp:include page="../partials/foot.jsp"/>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>1. Embedded Signing</h4>
5+
<p>This example sends an envelope, and then uses Embedded signing for the first signer.</p>
6+
<p>Embedded signing provides a smoother user experience for the signer: DocuSign signing is initiated from
7+
your website.</p>
8+
<c:if test="${showDoc}">
9+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
10+
</c:if>
11+
12+
13+
<p>API methods used:
14+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create">Envelopes::create</a>
15+
and
16+
<a target='_blank' rel="noopener noreferrer"
17+
href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient">EnvelopeViews::createRecipient</a>.
18+
</p>
19+
<p>
20+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
21+
</p>
22+
23+
<form class="eg" action="" method="post" data-busy="form">
24+
<div class="form-group">
25+
<label for="signerEmail">Signer Email</label>
26+
<input type="email" class="form-control" id="signerEmail" name="signerEmail"
27+
aria-describedby="emailHelp" placeholder="pat@example.com" required
28+
value="${locals.dsConfig.signerEmail}">
29+
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
30+
</div>
31+
<div class="form-group">
32+
<label for="signerName">Signer Name</label>
33+
<input type="text" class="form-control" id="signerName" placeholder="Pat Johnson" name="signerName"
34+
value="${locals.dsConfig.signerName}" required>
35+
</div>
36+
<input type="hidden" name="_csrf" value="${csrfToken}">
37+
<button type="submit" class="btn btn-docu">Submit</button>
38+
</form>
39+
40+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>2. Send an envelope with a remote (email) signer and cc recipient</h4>
5+
<p>The envelope includes a pdf, Word, and HTML document. Anchor text
6+
(<a href="https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience">AutoPlace</a>)
7+
is used to position the signing fields in the documents.
8+
</p>
9+
<p>This is a general example of creating and sending an envelope (a signing request) to multiple recipients,
10+
with multiple documents, and with signature fields for the documents.</p>
11+
<c:if test="${showDoc}">
12+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
13+
</c:if>
14+
15+
<p>API method used:
16+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create">Envelopes::create</a>.
17+
</p>
18+
19+
<p>
20+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
21+
</p>
22+
23+
<form class="eg" action="" method="post" data-busy="form">
24+
<div class="form-group">
25+
<label for="signerEmail">Signer Email</label>
26+
<input type="email" class="form-control" id="signerEmail" name="signerEmail"
27+
aria-describedby="emailHelp" placeholder="pat@example.com" required
28+
value="${locals.dsConfig.signerEmail}">
29+
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
30+
</div>
31+
<div class="form-group">
32+
<label for="signerName">Signer Name</label>
33+
<input type="text" class="form-control" id="signerName" placeholder="Pat Johnson" name="signerName"
34+
value="${locals.dsConfig.signerName}" required>
35+
</div>
36+
<div class="form-group">
37+
<label for="ccEmail">CC Email</label>
38+
<input type="email" class="form-control" id="ccEmail" name="ccEmail"
39+
aria-describedby="emailHelp" placeholder="pat@example.com" required>
40+
<small id="emailHelp" class="form-text text-muted">The email and/or name for the cc recipient must be different
41+
from the signer.
42+
</small>
43+
</div>
44+
<div class="form-group">
45+
<label for="ccName">CC Name</label>
46+
<input type="text" class="form-control" id="ccName" placeholder="Pat Johnson" name="ccName"
47+
required>
48+
</div>
49+
<input type="hidden" name="_csrf" value="${csrfToken}">
50+
<button type="submit" class="btn btn-docu">Submit</button>
51+
</form>
52+
53+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>3. List envelopes in the user's account</h4>
5+
<p>List the envelopes created in the last 30 days.</p>
6+
<p>This example demonstrates how to query DocuSign about envelopes sent by the current user.</p>
7+
<c:if test="${showDoc}">
8+
<p><a target='_blank' rel="noopener noreferrer" href='${documentation}'>Documentation</a> about this example.</p>
9+
</c:if>
10+
11+
12+
<p>API method used:
13+
<a target='_blank' rel="noopener noreferrer"
14+
href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges">Envelopes::listStatusChanges</a>.
15+
</p>
16+
<p>
17+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
18+
</p>
19+
20+
<form class="eg" action="" method="post" data-busy="form">
21+
<input type="hidden" name="_csrf" value="${csrfToken}">
22+
<button type="submit" class="btn btn-docu">Continue</button>
23+
</form>
24+
25+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>4. Get an envelope's basic information and status</h4>
5+
<p>List the basic information about an envelope, including its overall status.
6+
Additional API/SDK methods may be used to get additional information about the
7+
envelope, its documents, recipients, etc.</p>
8+
9+
<p>This example demonstrates how to obtain the latest information about
10+
an envelope from DocuSign. Often an alternative is to use Connect
11+
to enable DocuSign to proactively send your application updates when the
12+
status of an envelope changes.
13+
</p>
14+
15+
<c:if test="${showDoc == true}">
16+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
17+
</c:if>
18+
19+
20+
<p>API method used:
21+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/get">Envelopes::get</a>.
22+
</p>
23+
24+
<p>
25+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
26+
</p>
27+
28+
<c:choose>
29+
<c:when test="${envelopeOk == true}">
30+
<p>The envelope you created via example 2 will be queried.</p>
31+
32+
<form class="eg" action="" method="post" data-busy="form">
33+
<input type="hidden" name="_csrf" value="${csrfToken}">
34+
<button type="submit" class="btn btn-docu">Continue</button>
35+
</form>
36+
</c:when>
37+
<c:otherwise>
38+
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
39+
Thank you.</p>
40+
41+
<form class="eg" action="eg002" method="get">
42+
<button type="submit" class="btn btn-docu">Continue</button>
43+
</form>
44+
</c:otherwise>
45+
</c:choose>
46+
47+
48+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>5. List an envelope's recipients and their status</h4>
5+
<p>List the envelope's recipients, including their current status.</p>
6+
7+
<c:if test="${showDoc}">
8+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
9+
</c:if>
10+
11+
12+
<p>API method used:
13+
<a target='_blank' rel="noopener noreferrer"
14+
href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipients/list">EnvelopeRecipients::list</a>.
15+
</p>
16+
<p>
17+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
18+
</p>
19+
20+
<c:choose>
21+
<c:when test="${envelopeOk}">
22+
<p>The envelope you created via example 2 will be queried.</p>
23+
24+
<form class="eg" action="" method="post" data-busy="form">
25+
<input type="hidden" name="_csrf" value="${csrfToken}">
26+
<button type="submit" class="btn btn-docu">Continue</button>
27+
</form>
28+
</c:when>
29+
<c:otherwise>
30+
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
31+
Thank you.</p>
32+
33+
<form class="eg" action="eg002" method="get">
34+
<button type="submit" class="btn btn-docu">Continue</button>
35+
</form>
36+
</c:otherwise>
37+
</c:choose>
38+
39+
40+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>6. List an envelope's documents</h4>
5+
<p>List the envelope's documents. A <em>Certificate of Completion</em> document
6+
is also associated with every envelope.
7+
</p>
8+
9+
<p>This method is often used to dynamically create a list of an envelope's documents
10+
in preparation for enabling your user to download one or more of the documents.</p>
11+
<c:if test="${showDoc}">
12+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
13+
</c:if>
14+
15+
16+
<p>API method used:
17+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeDocuments/list">EnvelopeDocuments::list</a>.
18+
</p>
19+
20+
<p>
21+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
22+
</p>
23+
24+
<c:choose>
25+
<c:when test="${envelopeOk}">
26+
<p>The envelope you created via example 2 will be queried.</p>
27+
28+
<form class="eg" action="" method="post" data-busy="form">
29+
<input type="hidden" name="_csrf" value="${csrfToken}">
30+
<button type="submit" class="btn btn-docu">Continue</button>
31+
</form>
32+
</c:when>
33+
<c:otherwise>
34+
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
35+
Thank you.</p>
36+
37+
<form class="eg" action="eg002" method="get">
38+
<button type="submit" class="btn btn-docu">Continue</button>
39+
</form>
40+
</c:otherwise>
41+
</c:choose>
42+
43+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>7. Download a document from an envelope</h4>
5+
<p>An envelope's documents can be downloaded one by one or as a complete set.</p>
6+
<p>Document download options:</p>
7+
<ul>
8+
<li><strong>Combined</strong>: a PDF with the combined content of all documents and the
9+
certificate
10+
</li>
11+
<li><strong>Zip Archive</strong>: a ZIP archive that contains all of the PDF documents,
12+
the certificate, and any .WAV files used for voice authentication.
13+
</li>
14+
<li>The envelope's individual documents</li>
15+
<li>The envelope's Certificate of Completion</li>
16+
</ul>
17+
<c:if test="${showDoc}">
18+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
19+
</c:if>
20+
21+
22+
<p>API method used:
23+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeDocuments/get">EnvelopeDocuments::get</a>.
24+
</p>
25+
26+
<p>
27+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
28+
</p>
29+
30+
<c:choose>
31+
<c:when test="${not envelopeOk}">
32+
<p>Problem: please first create an envelope using <a href="eg002">example 2.</a> <br/>
33+
You will then need to use example 6 to create the list of documents.<br/>
34+
Thank you.</p>
35+
36+
<form class="eg" action="eg002" method="get">
37+
<button type="submit" class="btn btn-docu">Continue</button>
38+
</form>
39+
</c:when>
40+
<c:when test="${not documentsOk}">
41+
<p>Problem: please first create a list of the envelope's documents using
42+
<a href="eg006">example 6.</a> <br/>
43+
Thank you.</p>
44+
45+
<form class="eg" action="eg006" method="get">
46+
<button type="submit" class="btn btn-docu">Continue</button>
47+
</form>
48+
</c:when>
49+
<c:otherwise>
50+
<p>Please choose a document.<br/>
51+
The document list is from your results for example 6.</p>
52+
53+
<form class="eg" action="" method="post" data-busy="form-download">
54+
<div class="form-group">
55+
<label for="docSelect">Document selection</label>
56+
<select class="custom-select" id="docSelect"
57+
name="docSelect" aria-describedby="emailHelp">
58+
<c:forEach begin="0" end="${documentOptions.size()}" varStatus="loop">
59+
<option value="${documentOptions[loop.index].documentId}">
60+
${documentOptions[loop.index].text}
61+
</option>
62+
</c:forEach>
63+
</select>
64+
</div>
65+
<input type="hidden" name="_csrf" value="${csrfToken}">
66+
<button type="submit" class="btn btn-docu">Continue</button>
67+
</form>
68+
</c:otherwise>
69+
</c:choose>
70+
71+
<jsp:include page="../../partials/foot.jsp"/>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<jsp:include page="../../partials/head.jsp"/>
3+
4+
<h4>8. Create a template</h4>
5+
<p>Create a template with two roles, <strong>signer</strong> and <strong>cc</strong>.
6+
The template includes three documents.
7+
</p>
8+
9+
<p>Templates are usually created using the DocuSign web tool. This example creates
10+
a template that will later be used by other examples in this launcher. </p>
11+
12+
<p>This example first lists the user's templates and only creates a new template if one does not already exist in your
13+
account.
14+
</p>
15+
<c:if test="${showDoc}">
16+
<p><a target='_blank' href='${documentation}'>Documentation</a> about this example.</p>
17+
</c:if>
18+
19+
20+
<p>API methods used:
21+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Templates/Templates/list">Templates::list</a>,
22+
<a target='_blank' rel="noopener noreferrer" href="https://developers.docusign.com/esign-rest-api/reference/Templates/Templates/create">Templates::create</a>.
23+
</p>
24+
25+
<p>
26+
View source file <a target="_blank" href="${sourceUrl}">${sourceFile}</a> on GitHub.
27+
</p>
28+
29+
<form class="eg" action="" method="post" data-busy="form">
30+
<input type="hidden" name="_csrf" value="${csrfToken}">
31+
<button type="submit" class="btn btn-docu">Continue</button>
32+
</form>
33+
34+
<jsp:include page="../../partials/foot.jsp"/>

0 commit comments

Comments
 (0)