From 7867e10643288a8ed50bbfd66844401d8f2f6285 Mon Sep 17 00:00:00 2001 From: karissarjacobsen <73908223+karissarjacobsen@users.noreply.github.com> Date: Wed, 2 Dec 2020 16:30:14 -0800 Subject: [PATCH] update apiv2 java launcher and restore jsp pages (#14) --- pom.xml | 2 +- .../templates/views/pages/ds_return.jsp | 25 ++++ .../templates/views/pages/examples/eg001.jsp | 40 ++++++ .../templates/views/pages/examples/eg002.jsp | 53 ++++++++ .../templates/views/pages/examples/eg003.jsp | 25 ++++ .../templates/views/pages/examples/eg004.jsp | 48 ++++++++ .../templates/views/pages/examples/eg005.jsp | 40 ++++++ .../templates/views/pages/examples/eg006.jsp | 43 +++++++ .../templates/views/pages/examples/eg007.jsp | 71 +++++++++++ .../templates/views/pages/examples/eg008.jsp | 34 +++++ .../templates/views/pages/examples/eg009.jsp | 79 ++++++++++++ .../templates/views/pages/examples/eg010.jsp | 53 ++++++++ .../templates/views/pages/examples/eg011.jsp | 66 ++++++++++ .../templates/views/pages/examples/eg012.jsp | 47 +++++++ .../templates/views/pages/examples/eg013.jsp | 116 ++++++++++++++++++ .../templates/views/pages/examples/eg019.jsp | 51 ++++++++ .../templates/views/pages/examples/eg020.jsp | 42 +++++++ .../templates/views/pages/examples/eg021.jsp | 43 +++++++ 18 files changed, 877 insertions(+), 1 deletion(-) create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/ds_return.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg001.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg002.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg003.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg004.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg005.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg006.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg007.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg008.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg009.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg010.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg011.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg012.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg013.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg019.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg020.jsp create mode 100644 src/main/webapp/WEB-INF/templates/views/pages/examples/eg021.jsp diff --git a/pom.xml b/pom.xml index 9dd88a61..36e58e1a 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ UTF-8 com.docusign.App 1.8 - 1.14.8 + 1.18.6 1.16 2.3.3 diff --git a/src/main/webapp/WEB-INF/templates/views/pages/ds_return.jsp b/src/main/webapp/WEB-INF/templates/views/pages/ds_return.jsp new file mode 100644 index 00000000..393bdc79 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/ds_return.jsp @@ -0,0 +1,25 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

Returned data from DocuSign!

+

Data:

+ + +

event: ${event}. 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.

+
+ + +

envelopeId: ${qpEnvelopeId}. The envelopeId parameter is supplied by DocuSign.

+
+ + +

state: ${state}. 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.

+
+ + +

Continue

+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg001.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg001.jsp new file mode 100644 index 00000000..e4b7f241 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg001.jsp @@ -0,0 +1,40 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

1. Embedded Signing

+

This example sends an envelope, and then uses Embedded signing for the first signer.

+

Embedded signing provides a smoother user experience for the signer: DocuSign signing is initiated from + your website.

+ +

Documentation about this example.

+
+ + +

API methods used: + Envelopes::create + and + EnvelopeViews::createRecipient. +

+

+ View source file ${sourceFile} on GitHub. +

+ +
+
+ + + We'll never share your email with anyone else. +
+
+ + +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg002.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg002.jsp new file mode 100644 index 00000000..89a09d5c --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg002.jsp @@ -0,0 +1,53 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

2. Send an envelope with a remote (email) signer and cc recipient

+

The envelope includes a pdf, Word, and HTML document. Anchor text + (AutoPlace) + is used to position the signing fields in the documents. +

+

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.

+ +

Documentation about this example.

+
+ +

API method used: + Envelopes::create. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ +
+
+ + + We'll never share your email with anyone else. +
+
+ + +
+
+ + + The email and/or name for the cc recipient must be different + from the signer. + +
+
+ + +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg003.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg003.jsp new file mode 100644 index 00000000..9ceb15bd --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg003.jsp @@ -0,0 +1,25 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

3. List envelopes in the user's account

+

List the envelopes created in the last 30 days.

+

This example demonstrates how to query DocuSign about envelopes sent by the current user.

+ +

Documentation about this example.

+
+ + +

API method used: + Envelopes::listStatusChanges. +

+

+ View source file ${sourceFile} on GitHub. +

+ +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg004.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg004.jsp new file mode 100644 index 00000000..48807fbb --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg004.jsp @@ -0,0 +1,48 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

4. Get an envelope's basic information and status

+

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.

+ +

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. +

+ + +

Documentation about this example.

+
+ + +

API method used: + Envelopes::get. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ + + +

The envelope you created via example 2 will be queried.

+ +
+ + +
+
+ +

Problem: please first create an envelope using example 2.
+ Thank you.

+ +
+ +
+
+
+ + + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg005.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg005.jsp new file mode 100644 index 00000000..07852cba --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg005.jsp @@ -0,0 +1,40 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

5. List an envelope's recipients and their status

+

List the envelope's recipients, including their current status.

+ + +

Documentation about this example.

+
+ + +

API method used: + EnvelopeRecipients::list. +

+

+ View source file ${sourceFile} on GitHub. +

+ + + +

The envelope you created via example 2 will be queried.

+ +
+ + +
+
+ +

Problem: please first create an envelope using example 2.
+ Thank you.

+ +
+ +
+
+
+ + + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg006.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg006.jsp new file mode 100644 index 00000000..c2bf9a21 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg006.jsp @@ -0,0 +1,43 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

6. List an envelope's documents

+

List the envelope's documents. A Certificate of Completion document + is also associated with every envelope. +

+ +

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.

+ +

Documentation about this example.

+
+ + +

API method used: + EnvelopeDocuments::list. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ + + +

The envelope you created via example 2 will be queried.

+ +
+ + +
+
+ +

Problem: please first create an envelope using example 2.
+ Thank you.

+ +
+ +
+
+
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg007.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg007.jsp new file mode 100644 index 00000000..84bec4ab --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg007.jsp @@ -0,0 +1,71 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

7. Download a document from an envelope

+

An envelope's documents can be downloaded one by one or as a complete set.

+

Document download options:

+
    +
  • Combined: a PDF with the combined content of all documents and the + certificate +
  • +
  • Zip Archive: a ZIP archive that contains all of the PDF documents, + the certificate, and any .WAV files used for voice authentication. +
  • +
  • The envelope's individual documents
  • +
  • The envelope's Certificate of Completion
  • +
+ +

Documentation about this example.

+
+ + +

API method used: + EnvelopeDocuments::get. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ + + +

Problem: please first create an envelope using example 2.
+ You will then need to use example 6 to create the list of documents.
+ Thank you.

+ +
+ +
+
+ +

Problem: please first create a list of the envelope's documents using + example 6.
+ Thank you.

+ +
+ +
+
+ +

Please choose a document.
+ The document list is from your results for example 6.

+ +
+
+ + +
+ + +
+
+
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg008.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg008.jsp new file mode 100644 index 00000000..141e82ca --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg008.jsp @@ -0,0 +1,34 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

8. Create a template

+

Create a template with two roles, signer and cc. + The template includes three documents. +

+ +

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.

+ +

This example first lists the user's templates and only creates a new template if one does not already exist in your + account. +

+ +

Documentation about this example.

+
+ + +

API methods used: + Templates::list, + Templates::create. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg009.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg009.jsp new file mode 100644 index 00000000..b633f5ec --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg009.jsp @@ -0,0 +1,79 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

9. Send an envelope using a template

+

The envelope is defined by the template. + The signer and cc recipient name and email are used to fill in the template's roles.

+ +

This example demonstrates a common pattern for DocuSign integrations: envelopes will + be sent programmatically, based on a template. If the template definition needs to be + updated, the DocuSign web tool can be used to easily update the template, thus + avoiding the need to make software changes. +

+ + +

Documentation about this example.

+
+ + +

API method used: + Envelopes::create. +

+

+ View source file ${sourceFile} on GitHub. +

+ + + +

The template you created via example 8 will be used.

+ +
+
+ +
+
+ + + We'll never share your email with anyone else. + +
+
+ + +
+
+ + + The email and/or name for the cc recipient must be + different from the signer. + +
+
+ + +
+ + +
+
+ +

Problem: please first create the template using example 8.
+ Thank you.

+ +
+ +
+
+
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg010.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg010.jsp new file mode 100644 index 00000000..4ef4f034 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg010.jsp @@ -0,0 +1,53 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

10. Send an envelope using binary document transfer

+

The envelope includes a pdf, Word, and HTML document.

+

Multipart data transfer is used to send the documents in binary format to DocuSign. + Binary transfer is 33% more efficient than base64 encoding and is recommended for documents over 15M Bytes. +

+ +

Since binary transfer is not yet supported by the SDK, this example uses the API directly and + demonstrates how to do so.

+ +

Documentation about this example.

+
+ + +

API method used: + Envelopes::create. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ +
+
+ + + We'll never share your email with anyone else. +
+
+ + +
+
+ + + The email and/or name for the cc recipient must be different from the signer. +
+
+ + +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg011.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg011.jsp new file mode 100644 index 00000000..45c7c5b6 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg011.jsp @@ -0,0 +1,66 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

11. Use embedded sending

+

An envelope will be created in draft mode. Your browser will then be redirected to + the DocuSign web tool where the envelope can be (optionally) updated and then sent.

+

The envelope includes a pdf, Word, and HTML document. Anchor text + (AutoPlace) + is used to position the signing fields in the documents.

+

DocuSign recommends that you enhance your application as needed to avoid the need + for the embedded sender view. +

+

For example, if the sender view is used to optionally + add additional documents to the envelope, enhance your app to provide the + needed feature (see example 13 for adding additional documents programmatically). +

+ +

Documentation about this example.

+
+ + +

API methods used: + Envelopes::create and + EnvelopeViews::createSender. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ +
+
+ + +
+
+ + + We'll never share your email with anyone else. +
+
+ + +
+
+ + + The email and/or name for the cc recipient must be different from the signer. +
+
+ + +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg012.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg012.jsp new file mode 100644 index 00000000..cc3c8905 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg012.jsp @@ -0,0 +1,47 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

12. Embedded DocuSign web tool

+

Redirect the user to the DocuSign web tool.

+

Use this API call to open the DocuSign web tool, the NDSE (New DocuSign Signing Experience), + with the user already logged in.

+

The starting view can be either an envelope's documents or the web tool's front page.

+

The user does not necessarily return from the NDSE, so using this API call is often a final + step for your application. + Or you can open the NDSE in a new tab for the user. +

+ + +

Documentation about this example.

+
+ + +

API method used: + EnvelopeViews::createConsole. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ +

Optional: to use the Envelope's document view please first create an envelope using + example 2.

+
+ + +
+
+ + +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg013.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg013.jsp new file mode 100644 index 00000000..56bf1b82 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg013.jsp @@ -0,0 +1,116 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

13. Use embedded signing from a template with an added document

+ +

This example sends an envelope based on a template.

+

In addition to the template's document(s), the example adds an + additional document to the envelope by using the + Composite + Templates + feature.

+

In this example, the additional document is an HTML document that + includes order details with information from the form below.

+

This example then enables you to sign the envelope using embedded signing.

+

Embedded signing provides a smoother user experience for a signer who is + already logged into your web application since the DocuSign + signing is initiated from your website.

+
+ + +

Documentation about this example.

+
+ + +

API methods used: + Envelopes::create + and + EnvelopeViews::createRecipient. +

+

+ View source file ${sourceFile} on GitHub. +

+ + +

The template you created via example 8 will be used.

+ +
+
+ +
+
+ + + We'll never share your email with anyone else. + +
+
+ + +
+
+ + + The email and/or name for the cc recipient must be + different + from the signer. + +
+
+ + +
+

+


+

+
+ + +
+
+ + +
+ + +
+
+ +

Problem: please first create the template using example 8.
+ Thank you.

+ +
+ +
+
+
+ + + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg019.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg019.jsp new file mode 100644 index 00000000..43a6dc6d --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg019.jsp @@ -0,0 +1,51 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

19. Send an envelope with a recipient using Access Code Authentication.

+ +

+ The envelope includes a pdf document. Anchor text + (AutoPlace) + is used to position the signing fields in the documents. +

+

+ This is a general example of creating and sending an envelope (a signing request) using An Access Code for Recipient Authentication. +

+ + +

Documentation about this example.

+
+ +

API method used: + Envelopes::create. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ + +
+
+ + + Provide this string to a recipient that is different such as in person or by mail or via different email. +
+
+ + + We'll never share your email with anyone else. +
+
+ + +
+ + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg020.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg020.jsp new file mode 100644 index 00000000..6ba63d61 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg020.jsp @@ -0,0 +1,42 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

20. Send an envelope with a recipient using SMS Authentication.

+ + +

Documentation about this example.

+
+ +

API method used: + Envelopes::create. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ + +
+
+ + +
+
+ + + We'll never share your email with anyone else. +
+
+ + +
+ + + +
+ + diff --git a/src/main/webapp/WEB-INF/templates/views/pages/examples/eg021.jsp b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg021.jsp new file mode 100644 index 00000000..5b61baff --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/views/pages/examples/eg021.jsp @@ -0,0 +1,43 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

21. Send an envelope with a recipient using Phone Authentication.

+ + +

Documentation about this example.

+
+ +

API method used: + Envelopes::create. +

+ +

+ View source file ${sourceFile} on GitHub. +

+ + +
+ +
+ + +
+ +
+ + + We'll never share your email with anyone else. +
+
+ + +
+ + +
+ +