Skip to content

Commit 51fbae1

Browse files
authored
Merge branch 'master' into feature/updates-for-example-38
Signed-off-by: Anna Hileta <[email protected]>
2 parents 48fb7ae + c2e34e8 commit 51fbae1

14 files changed

+40
-26
lines changed

src/main/java/com/docusign/controller/admin/services/AddActiveUserService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.util.UUID;
88

99
public class AddActiveUserService {
10-
10+
//ds-snippet-start:Admin1Step5
1111
public static NewUserResponse createNewActiveUser(
1212
String groupId,
1313
String profileId,
@@ -19,7 +19,6 @@ public static NewUserResponse createNewActiveUser(
1919
UUID organizationId,
2020
UUID accountId) throws Exception
2121
{
22-
//ds-snippet-start:Admin1Step5
2322
java.util.List<GroupRequest> groups = new ArrayList<>();
2423
groups.add(new GroupRequest().id(Long.valueOf(groupId)));
2524

src/main/java/com/docusign/controller/admin/services/UserDataManagementService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ public IndividualUserDataRedactionResponse deleteUserDataFromOrganizationByEmail
5151
memberships.accountId(user.getMemberships().get(0).getAccountId());
5252
}
5353

54-
//ds-snippet-start:Admin11Step3
54+
//ds-snippet-start:Admin10Step3
5555
IndividualUserDataRedactionRequest userRedactionRequest = new IndividualUserDataRedactionRequest();
5656
userRedactionRequest.setUserId(user.getId());
5757
userRedactionRequest.setMemberships(Arrays.asList(memberships));
58-
//ds-snippet-end:Admin11Step3
59-
//ds-snippet-start:Admin11Step4
58+
//ds-snippet-end:Admin10Step3
59+
//ds-snippet-start:Admin10Step4
6060
return organizationsApi.redactIndividualUserData(organizationId, userRedactionRequest);
61-
//ds-snippet-end:Admin11Step4
61+
//ds-snippet-end:Admin10Step4
6262
}
6363
}

src/main/java/com/docusign/controller/eSignature/examples/EG003ControllerListEnvelopes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ public EG003ControllerListEnvelopes(DSConfiguration config, Session session, Use
3232
}
3333

3434
@Override
35-
// ***DS.snippet.0.start
3635
protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse response) throws ApiException {
36+
//ds-snippet-start:eSign3Step2
3737
EnvelopesApi envelopesApi = createEnvelopesApi(session.getBasePath(), user.getAccessToken());
3838
EnvelopesInformation envelopesInformation = ListEnvelopesServices.listEnvelopes(
3939
envelopesApi,
4040
session.getAccountId());
41+
//ds-snippet-end:eSign3Step2
4142

4243
DoneExample.createDefault(getTextForCodeExampleByApiType().ExampleName)
4344
.withMessage(getTextForCodeExampleByApiType().ResultsPageText)
4445
.withJsonObject(envelopesInformation)
4546
.addToModel(model, config);
4647
return DONE_EXAMPLE_PAGE;
4748
}
48-
// ***DS.snippet.0.end
4949
}

src/main/java/com/docusign/controller/eSignature/examples/EG010ControllerSendBinaryDocs.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public EG010ControllerSendBinaryDocs(DSConfiguration config, Session session, Us
3131
}
3232

3333
@Override
34-
// ***DS.snippet.0.start
3534
protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse response) throws IOException {
3635
String responseString = SendBinaryDocsService.sendBinaryDocs(
3736
args,
@@ -54,5 +53,4 @@ protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse
5453
.addToModel(model, config);
5554
return DONE_EXAMPLE_PAGE;
5655
}
57-
// ***DS.snippet.0.end
5856
}

src/main/java/com/docusign/controller/eSignature/examples/EG023ControllerIdvAuthentication.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,18 @@ public EG023ControllerIdvAuthentication(DSConfiguration config, Session session,
4141

4242
@Override
4343
protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse response) throws ApiException, IOException {
44-
// Step 2 start
4544
ApiClient apiClient = createApiClient(session.getBasePath(), user.getAccessToken());
46-
// Step 2 end
4745
EnvelopesApi envelopesApi = new EnvelopesApi(apiClient);
4846
String workflowId = IdvAuthenticationService.retrieveWorkflowId(apiClient, session.getAccountId());
4947
logger.info("workflowId = " + workflowId);
5048
if (workflowId.equals(""))
5149
{
5250
throw new ApiException(0, getTextForCodeExampleByApiType().CustomErrorTexts.get(0).ErrorMessage);
5351
}
54-
// Step 4-1 start
5552
EnvelopeDefinition envelope = IdvAuthenticationService.createEnvelope(args.getSignerName(), args.getSignerEmail(), workflowId);
56-
// Step 4-1 end
57-
// Step 5 start
53+
//ds-snippet-start:eSign23Step5
5854
EnvelopeSummary results = IdvAuthenticationService.idvAuthentication(envelopesApi, session.getAccountId(), envelope);
59-
// Step 5 end
55+
//ds-snippet-end:eSign23Step5
6056

6157
session.setEnvelopeId(results.getEnvelopeId());
6258
DoneExample.createDefault(getTextForCodeExampleByApiType().ExampleName)

src/main/java/com/docusign/controller/eSignature/examples/EG038ControllerResponsiveSigning.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public EG038ControllerResponsiveSigning(DSConfiguration config, Session session,
3434
}
3535

3636
@Override
37-
// Step 3 start
37+
//ds-snippet-start:eSign38Step3
3838
protected Object doWork(WorkArguments args, ModelMap model,
3939
HttpServletResponse response) throws ApiException, IOException {
4040
String signerName = args.getSignerName();
@@ -84,5 +84,5 @@ protected Object doWork(WorkArguments args, ModelMap model,
8484

8585
return new RedirectView(viewUrl.getUrl());
8686
}
87-
// Step 3 end
87+
//ds-snippet-end:eSign38Step3
8888
}

src/main/java/com/docusign/controller/eSignature/services/CollectPaymentService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ public final class CollectPaymentService {
2626
private static final String DEFAULT_FONT_SIZE = "size11";
2727
private static final String ANCHOR_UNITS = "pixels";
2828

29+
//ds-snippet-start:eSign14Step4
2930
public static EnvelopeSummary collectPayment(
3031
EnvelopesApi envelopesApi,
3132
EnvelopeDefinition envelope,
3233
String accountId
3334
) throws ApiException {
34-
// Step 2. call Envelopes::create API method
35+
// Call Envelopes::create API method
3536
return envelopesApi.createEnvelope(accountId, envelope);
3637
}
38+
//ds-snippet-end:eSign14Step4
3739
// document 1 (html) has multiple tags:
3840
// /l1q/ and /l2q/ -- quantities: drop down
3941
// /l1e/ and /l2e/ -- extended: payment lines
@@ -44,6 +46,7 @@ public static EnvelopeSummary collectPayment(
4446
// recipient 2 - cc
4547
// The envelope will be sent first to the signer.
4648
// After it is signed, a copy is sent to the cc person.
49+
//ds-snippet-start:eSign14Step3
4750
public static EnvelopeDefinition makeEnvelope(
4851
String signerEmail,
4952
String signerName,
@@ -184,4 +187,5 @@ private static FormulaTab createFormulaTab(String anchor, String label, int pric
184187
.locked(TRUE)
185188
.disableAutoSize(FALSE);
186189
}
190+
//ds-snippet-end:eSign14Step3
187191
}

src/main/java/com/docusign/controller/eSignature/services/EnvelopeGetDocService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ public static byte[] envelopeGetDoc(
1212
String envelopeId,
1313
String documentId
1414
) throws ApiException {
15+
//ds-snippet-start:eSign7Step3
1516
return envelopesApi.getDocument(accountId, envelopeId, documentId);
17+
//ds-snippet-end:eSign7Step3
1618
}
1719

1820
public static String addExtension(String fileName, String extension) {

src/main/java/com/docusign/controller/eSignature/services/EnvelopeInfoService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.docusign.esign.client.ApiException;
55
import com.docusign.esign.model.Envelope;
66

7+
//ds-snippet-start:eSign4Step2
78
public final class EnvelopeInfoService {
89
public static Envelope envelopeInfo(
910
EnvelopesApi envelopesApi,
@@ -13,3 +14,4 @@ public static Envelope envelopeInfo(
1314
return envelopesApi.getEnvelope(accountId, envelopeId);
1415
}
1516
}
17+
//ds-snippet-end:eSign4Step2

src/main/java/com/docusign/controller/eSignature/services/IdvAuthenticationService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static EnvelopeSummary idvAuthentication(
2424
}
2525

2626
public static String retrieveWorkflowId(ApiClient apiClient, String accountId) throws ApiException {
27-
// Step 3 start
27+
//ds-snippet-start:eSign23Step3
2828
AccountsApi workflowDetails = new AccountsApi(apiClient);
2929
AccountIdentityVerificationResponse workflowRes = workflowDetails.getAccountIdentityVerification(accountId);
3030
List<AccountIdentityVerificationWorkflow> identityVerification = workflowRes.getIdentityVerification();
@@ -37,9 +37,10 @@ public static String retrieveWorkflowId(ApiClient apiClient, String accountId) t
3737
}
3838
}
3939
return workflowId;
40-
// Step 3 end
40+
//ds-snippet-end:eSign23Step3
4141
}
4242

43+
//ds-snippet-start:eSign23Step4
4344
public static EnvelopeDefinition createEnvelope(
4445
String signerName,
4546
String signerEmail,
@@ -99,4 +100,5 @@ public static EnvelopeDefinition createEnvelope(
99100
envelopeDefinition.setDocuments(Collections.singletonList(doc1));
100101
return envelopeDefinition;
101102
}
103+
//ds-snippet-end:eSign23Step4
102104
}

0 commit comments

Comments
 (0)