6
6
import com .docusign .esign .client .ApiException ;
7
7
import com .docusign .esign .model .EnvelopeDefinition ;
8
8
import com .docusign .esign .model .EnvelopeSummary ;
9
- import com .docusign .esign .model .ReturnUrlRequest ;
9
+ import com .docusign .esign .model .EnvelopeViewDocumentSettings ;
10
+ import com .docusign .esign .model .EnvelopeViewRecipientSettings ;
11
+ import com .docusign .esign .model .EnvelopeViewRequest ;
12
+ import com .docusign .esign .model .EnvelopeViewSettings ;
13
+ import com .docusign .esign .model .EnvelopeViewTaggerSettings ;
14
+ import com .docusign .esign .model .EnvelopeViewTemplateSettings ;
10
15
import com .docusign .esign .model .ViewUrl ;
11
16
12
17
import java .io .IOException ;
@@ -17,13 +22,46 @@ public static ViewUrl createSenderView(
17
22
EnvelopesApi envelopesApi ,
18
23
String accountId ,
19
24
String envelopeId ,
20
- String dsReturnUrl
25
+ String dsReturnUrl ,
26
+ String startingScreen
21
27
) throws ApiException {
22
28
// Create the sender view.
23
29
// Set the url where you want the recipient to go once they are done
24
30
// signing should typically be a callback route somewhere in your app.
25
- ReturnUrlRequest viewRequest = new ReturnUrlRequest ();
31
+ EnvelopeViewRecipientSettings recipientSettings = new EnvelopeViewRecipientSettings ();
32
+ recipientSettings .setShowEditRecipients ("false" );
33
+ recipientSettings .setShowContactsList ("false" );
34
+
35
+ EnvelopeViewDocumentSettings documentSettings = new EnvelopeViewDocumentSettings ();
36
+ documentSettings .setShowEditDocuments ("false" );
37
+ documentSettings .setShowEditDocumentVisibility ("false" );
38
+ documentSettings .setShowEditPages ("false" );
39
+
40
+ EnvelopeViewTaggerSettings taggerSettings = new EnvelopeViewTaggerSettings ();
41
+ taggerSettings .setPaletteSections ("default" );
42
+ taggerSettings .setPaletteDefault ("custom" );
43
+
44
+ EnvelopeViewTemplateSettings templateSettings = new EnvelopeViewTemplateSettings ();
45
+ templateSettings .setShowMatchingTemplatesPrompt ("true" );
46
+
47
+ EnvelopeViewSettings viewSettings = new EnvelopeViewSettings ();
48
+ viewSettings .setStartingScreen (startingScreen );
49
+ viewSettings .setSendButtonAction ("send" );
50
+ viewSettings .setShowBackButton ("false" );
51
+ viewSettings .setBackButtonAction ("previousPage" );
52
+ viewSettings .setShowHeaderActions ("false" );
53
+ viewSettings .setShowDiscardAction ("false" );
54
+ viewSettings .setLockToken ("" );
55
+ viewSettings .setRecipientSettings (recipientSettings );
56
+ viewSettings .setDocumentSettings (documentSettings );
57
+ viewSettings .setTaggerSettings (taggerSettings );
58
+ viewSettings .setTemplateSettings (templateSettings );
59
+
60
+ EnvelopeViewRequest viewRequest = new EnvelopeViewRequest ();
26
61
viewRequest .setReturnUrl (dsReturnUrl );
62
+ viewRequest .setViewAccess ("envelope" );
63
+ viewRequest .setSettings (viewSettings );
64
+
27
65
return envelopesApi .createSenderView (accountId , envelopeId , viewRequest );
28
66
}
29
67
//ds-snippet-end:eSign11Step3
0 commit comments