├── .github
└── workflows
│ └── maven.yml
├── .gitignore
├── .metadata
├── .lock
├── .mylyn
│ └── .taskListIndex
│ │ ├── segments_1
│ │ └── write.lock
├── .plugins
│ ├── org.eclipse.core.resources
│ │ ├── .root
│ │ │ ├── .indexes
│ │ │ │ ├── history.version
│ │ │ │ ├── properties.index
│ │ │ │ └── properties.version
│ │ │ └── 1.tree
│ │ └── .safetable
│ │ │ └── org.eclipse.core.resources
│ ├── org.eclipse.core.runtime
│ │ └── .settings
│ │ │ ├── org.eclipse.core.resources.prefs
│ │ │ ├── org.eclipse.epp.logging.aeri.ide.prefs
│ │ │ ├── org.eclipse.jdt.ui.prefs
│ │ │ ├── org.eclipse.m2e.discovery.prefs
│ │ │ ├── org.eclipse.mylyn.context.core.prefs
│ │ │ ├── org.eclipse.mylyn.monitor.ui.prefs
│ │ │ ├── org.eclipse.mylyn.tasks.ui.prefs
│ │ │ ├── org.eclipse.team.ui.prefs
│ │ │ ├── org.eclipse.ui.editors.prefs
│ │ │ ├── org.eclipse.ui.ide.prefs
│ │ │ └── org.eclipse.ui.workbench.prefs
│ ├── org.eclipse.e4.workbench
│ │ └── workbench.xmi
│ ├── org.eclipse.epp.logging.aeri.ide
│ │ └── org.eclipse.epp.logging.aeri.ide.server
│ │ │ ├── http-cache.lucene60
│ │ │ ├── segments_1
│ │ │ └── write.lock
│ │ │ ├── local-history.lucene60
│ │ │ ├── _0.cfe
│ │ │ ├── _0.cfs
│ │ │ ├── _0.si
│ │ │ ├── segments_1
│ │ │ └── write.lock
│ │ │ └── server-config.json
│ ├── org.eclipse.jdt.core
│ │ ├── assumedExternalFilesCache
│ │ ├── externalFilesCache
│ │ ├── index.db
│ │ ├── nonChainingJarsCache
│ │ └── variablesAndContainers.dat
│ ├── org.eclipse.jdt.ui
│ │ ├── OpenTypeHistory.xml
│ │ ├── QualifiedTypeNameHistory.xml
│ │ └── dialog_settings.xml
│ ├── org.eclipse.m2e.logback.configuration
│ │ └── logback.1.8.2.20171007-0217.xml
│ ├── org.eclipse.oomph.setup
│ │ └── workspace.setup
│ ├── org.eclipse.ui.intro
│ │ └── introstate
│ └── org.eclipse.ui.workbench
│ │ ├── dialog_settings.xml
│ │ └── workingsets.xml
└── version.ini
├── .vscode
├── launch.json
└── settings.json
├── JWT Console App
├── app.config.example
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── docusign
│ └── JWTConsoleApp.java
├── LICENSE
├── PAYMENTS_INSTALLATION.md
├── Quick_ACG
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── docusign
│ │ ├── App.java
│ │ ├── DSConfiguration.java
│ │ ├── OSDetector.java
│ │ ├── WebSecurityConfig.java
│ │ ├── controller
│ │ └── eSignature
│ │ │ └── examples
│ │ │ └── AbstractEsignatureController.java
│ │ └── core
│ │ ├── controller
│ │ └── IndexController.java
│ │ └── model
│ │ └── Session.java
│ └── resources
│ └── application.example.json
├── README.md
├── azure-pipelines.yml
├── checkstyle.xml
├── code-examples-java.iml
├── docs
├── Adding_examples.md
├── IntelliJ_import_highlight.jpg
├── ds-java-auth-final.zip
├── install_fig_1.png
├── install_fig_2.png
├── install_fig_7.png
├── lombok_errors.png
└── stripe_skip_account_form_link.png
├── pom.xml
└── src
├── main
├── java
│ └── com
│ │ └── docusign
│ │ ├── App.java
│ │ ├── DSConfiguration.java
│ │ ├── EG001ControllerEmbeddedSigning.java
│ │ ├── HttpsConnectWebhookhMacValidation.java
│ │ ├── JsonPropertySourceLoader.java
│ │ ├── WebSecurityConfig.java
│ │ ├── common
│ │ ├── ApiIndex.java
│ │ └── WorkArguments.java
│ │ ├── controller
│ │ ├── admin
│ │ │ ├── examples
│ │ │ │ ├── A001AddActiveUser.java
│ │ │ │ ├── A002CreateActiveCLMESignUser.java
│ │ │ │ ├── A003BulkExportUserData.java
│ │ │ │ ├── A003aCheckRequestStatus.java
│ │ │ │ ├── A004BulkImportUserData.java
│ │ │ │ ├── A004CheckImportRequestStatus.java
│ │ │ │ ├── A005AuditUsers.java
│ │ │ │ ├── A006RetrieveDocuSignProfileByEmailAddress.java
│ │ │ │ ├── A007RetrieveDocuSignProfileByUserID.java
│ │ │ │ ├── A008UpdateUserProductPermissionProfile.java
│ │ │ │ ├── A009DeleteUserProductPermissionProfile.java
│ │ │ │ ├── A010DeleteUserDataFromOrganization.java
│ │ │ │ ├── A011DeleteUserDataFromAccount.java
│ │ │ │ ├── A012CloneAccount.java
│ │ │ │ ├── A013CreateAccount.java
│ │ │ │ └── AbstractAdminController.java
│ │ │ └── services
│ │ │ │ ├── AddActiveUserService.java
│ │ │ │ ├── AuditUsersService.java
│ │ │ │ ├── BulkExportUserDataService.java
│ │ │ │ ├── BulkImportUserDataService.java
│ │ │ │ ├── CheckImportRequestStatusService.java
│ │ │ │ ├── CheckRequestStatusService.java
│ │ │ │ ├── CloneAccountService.java
│ │ │ │ ├── CreateAccountService.java
│ │ │ │ ├── CreateActiveCLMESignUserService.java
│ │ │ │ ├── DeleteUserProductPermissionProfileById.java
│ │ │ │ ├── RetrieveDocuSignProfileByEmailAddress.java
│ │ │ │ ├── RetrieveDocuSignProfileByUserId.java
│ │ │ │ ├── UpdateUserProductPermissionProfileByEmail.java
│ │ │ │ └── UserDataManagementService.java
│ │ ├── click
│ │ │ ├── examples
│ │ │ │ ├── AbstractClickController.java
│ │ │ │ ├── C001ControllerCreateClickwrap.java
│ │ │ │ ├── C002ControllerActivateClickwrap.java
│ │ │ │ ├── C003ControllerCreateNewVersionClickwrap.java
│ │ │ │ ├── C004ControllerGetListClickwraps.java
│ │ │ │ ├── C005ControllerGetClickwrapResponses.java
│ │ │ │ ├── C006ControllerEmbedClickwrap.java
│ │ │ │ └── ClickwrapHelper.java
│ │ │ └── services
│ │ │ │ ├── ActivateClickwrapService.java
│ │ │ │ ├── CreateClickwrapService.java
│ │ │ │ ├── CreateNewVersionClickwrapService.java
│ │ │ │ ├── EmbedClickwrapService.java
│ │ │ │ ├── GetClickwrapResponsesService.java
│ │ │ │ └── GetListClickwrapsService.java
│ │ ├── connect
│ │ │ ├── examples
│ │ │ │ ├── AbstractConnectController.java
│ │ │ │ └── EG001ControllerValidateUsingHMAC.java
│ │ │ └── services
│ │ │ │ └── ValidateUsingHmacService.java
│ │ ├── connectedFields
│ │ │ ├── examples
│ │ │ │ ├── AbstractConnectedFieldsController.java
│ │ │ │ └── CF001SetConnectedFields.java
│ │ │ └── services
│ │ │ │ └── SetConnectedFieldsService.java
│ │ ├── eSignature
│ │ │ ├── examples
│ │ │ │ ├── AbstractEsignatureController.java
│ │ │ │ ├── DsModelUtils.java
│ │ │ │ ├── EG002ControllerSigningViaEmail.java
│ │ │ │ ├── EG003ControllerListEnvelopes.java
│ │ │ │ ├── EG004ControllerEnvelopeInfo.java
│ │ │ │ ├── EG005ControllerEnvelopeRecipients.java
│ │ │ │ ├── EG006ControllerEnvelopeDocs.java
│ │ │ │ ├── EG007ControllerEnvelopeGetDoc.java
│ │ │ │ ├── EG008ControllerCreateTemplate.java
│ │ │ │ ├── EG009ControllerUseTemplate.java
│ │ │ │ ├── EG010ControllerSendBinaryDocs.java
│ │ │ │ ├── EG011ControllerEmbeddedSending.java
│ │ │ │ ├── EG012ControllerEmbeddedConsole.java
│ │ │ │ ├── EG013ControllerAddDocToTemplate.java
│ │ │ │ ├── EG014ControllerCollectPayment.java
│ │ │ │ ├── EG015ControllerGetTabValues.java
│ │ │ │ ├── EG016ControllerSetTabValues.java
│ │ │ │ ├── EG017ControllerSetTemplateTabValues.java
│ │ │ │ ├── EG018ControllerEnvelopeCustomFieldValues.java
│ │ │ │ ├── EG019ControllerAccessCodeAuthentication.java
│ │ │ │ ├── EG020ControllerPhoneAuthentication.java
│ │ │ │ ├── EG022ControllerKBAAuthentication.java
│ │ │ │ ├── EG023ControllerIdvAuthentication.java
│ │ │ │ ├── EG024ControllerPermissionCreate.java
│ │ │ │ ├── EG025ControllerPermissionSetUserGroups.java
│ │ │ │ ├── EG026ControllerPermissionChangeSingleSetting.java
│ │ │ │ ├── EG027ControllerPermissionDelete.java
│ │ │ │ ├── EG028ControllerCreateBrand.java
│ │ │ │ ├── EG029ControllerApplyBrandToEnvelope.java
│ │ │ │ ├── EG030ControllerApplyBrandToTemplate.java
│ │ │ │ ├── EG031ControllerBulkSendEnvelopes.java
│ │ │ │ ├── EG032ControllerPauseSignatureWorkflow.java
│ │ │ │ ├── EG033ControllerUnpauseSignatureWorkflow.java
│ │ │ │ ├── EG034ControllerUseConditionalRecipients.java
│ │ │ │ ├── EG035ControllerScheduledSending.java
│ │ │ │ ├── EG036ControllerDelayedRouting.java
│ │ │ │ ├── EG037ControllerSMSDelivery.java
│ │ │ │ ├── EG038ControllerResponsiveSigning.java
│ │ │ │ ├── EG039ControllerInPersonSigning.java
│ │ │ │ ├── EG040ControllerSetDocumentVisibility.java
│ │ │ │ ├── EG041ControllerCfrEmbeddedSigning.java
│ │ │ │ ├── EG042ControllerDocumentGeneration.java
│ │ │ │ ├── EG043ControllerSharedAccess.java
│ │ │ │ ├── EG044ControllerFocusedView.java
│ │ │ │ ├── EnvelopeHelpers.java
│ │ │ │ └── ExampleException.java
│ │ │ └── services
│ │ │ │ ├── AccessCodeAuthenticationService.java
│ │ │ │ ├── AddDocToTemplateService.java
│ │ │ │ ├── ApplyBrandToEnvelopeService.java
│ │ │ │ ├── ApplyBrandToTemplateService.java
│ │ │ │ ├── BulkSendEnvelopesService.java
│ │ │ │ ├── CfrEmbeddedSigningService.java
│ │ │ │ ├── CollectPaymentService.java
│ │ │ │ ├── CreateBrandService.java
│ │ │ │ ├── CreateTemplateService.java
│ │ │ │ ├── DelayedRoutingService.java
│ │ │ │ ├── DocumentGenerationService.java
│ │ │ │ ├── EmbeddedConsoleService.java
│ │ │ │ ├── EmbeddedSendingService.java
│ │ │ │ ├── EmbeddedSigningService.java
│ │ │ │ ├── EnvelopeCustomFieldValuesService.java
│ │ │ │ ├── EnvelopeDocsService.java
│ │ │ │ ├── EnvelopeGetDocService.java
│ │ │ │ ├── EnvelopeInfoService.java
│ │ │ │ ├── EnvelopeRecipientsService.java
│ │ │ │ ├── FocusedViewService.java
│ │ │ │ ├── GetTabValuesService.java
│ │ │ │ ├── IdvAuthenticationService.java
│ │ │ │ ├── InPersonSigningService.java
│ │ │ │ ├── KBAAuthenticationService.java
│ │ │ │ ├── ListEnvelopesServices.java
│ │ │ │ ├── PauseSignatureWorkflowService.java
│ │ │ │ ├── PermissionChangeSingleSettingService.java
│ │ │ │ ├── PermissionCreateService.java
│ │ │ │ ├── PermissionDeleteService.java
│ │ │ │ ├── PermissionSetUserGroupsService.java
│ │ │ │ ├── PhoneAuthenticationService.java
│ │ │ │ ├── ResponsiveSigningService.java
│ │ │ │ ├── SMSDeliveryService.java
│ │ │ │ ├── ScheduledSendlingService.java
│ │ │ │ ├── SendBinaryDocsService.java
│ │ │ │ ├── SetDocumentVisibilityService.java
│ │ │ │ ├── SetTabValuesService.java
│ │ │ │ ├── SetTemplateTabValuesService.java
│ │ │ │ ├── SharedAccessService.java
│ │ │ │ ├── SigningViaEmailService.java
│ │ │ │ ├── UnpauseSignatureWorkflowService.java
│ │ │ │ ├── UseConditionalRecipientsService.java
│ │ │ │ └── UseTemplateService.java
│ │ ├── monitor
│ │ │ ├── examples
│ │ │ │ ├── AbstractMonitorController.java
│ │ │ │ └── M001GetMonitoringData.java
│ │ │ └── services
│ │ │ │ └── GetMonitoringDataService.java
│ │ ├── notary
│ │ │ ├── examples
│ │ │ │ ├── AbstractNotaryController.java
│ │ │ │ └── Neg004SendWithThirdPartyNotaryController.java
│ │ │ └── services
│ │ │ │ └── SendWithThirdPartyNotaryService.java
│ │ ├── rooms
│ │ │ ├── examples
│ │ │ │ ├── AbstractRoomsController.java
│ │ │ │ ├── R001ControllerCreateRoom.java
│ │ │ │ ├── R002ControllerCreateRoomWithTemplate.java
│ │ │ │ ├── R003ControllerExportingDataFromRoom.java
│ │ │ │ ├── R004ControllerAddingFormsToRoom.java
│ │ │ │ ├── R005ControllerGetRoomsWithFilters.java
│ │ │ │ ├── R006ControllerCreateExternalFormFillSession.java
│ │ │ │ ├── R007ControllerCreateFormGroup.java
│ │ │ │ ├── R008ControllerGrantOfficeAccessToFormGroup.java
│ │ │ │ └── R009ControllerAssignFormToFormGroup.java
│ │ │ └── services
│ │ │ │ ├── AddingFormsToRoomService.java
│ │ │ │ ├── AssignFormToFormGroupService.java
│ │ │ │ ├── CreateFormGroupService.java
│ │ │ │ ├── CreateRoomService.java
│ │ │ │ ├── CreateRoomWithTemplateService.java
│ │ │ │ ├── ExportingDataFromRoomService.java
│ │ │ │ ├── ExternalFormSessionService.java
│ │ │ │ ├── GetAdminRolesService.java
│ │ │ │ ├── GetFormSummaryListService.java
│ │ │ │ ├── GetRoomsWithFiltersService.java
│ │ │ │ └── GrantOfficeAccessToFormGroupService.java
│ │ └── webForms
│ │ │ ├── examples
│ │ │ ├── AbstractWebFormsController.java
│ │ │ └── WEB001ControllerCreateAndEmbedForm.java
│ │ │ └── services
│ │ │ └── CreateAndEmbedFormService.java
│ │ └── core
│ │ ├── common
│ │ ├── DiffField.java
│ │ ├── DocumentType.java
│ │ ├── Languages.java
│ │ └── Utils.java
│ │ ├── controller
│ │ ├── AbstractController.java
│ │ ├── GlobalControllerAdvice.java
│ │ └── IndexController.java
│ │ ├── exception
│ │ └── LauncherException.java
│ │ ├── model
│ │ ├── AccountRoleSettingsPatch.java
│ │ ├── ApiType.java
│ │ ├── ApiTypeItem.java
│ │ ├── AuthType.java
│ │ ├── AuthTypeItem.java
│ │ ├── DoneExample.java
│ │ ├── EnvelopeDocumentInfo.java
│ │ ├── Locals.java
│ │ ├── OptionItem.java
│ │ ├── Session.java
│ │ ├── User.java
│ │ └── manifestModels
│ │ │ ├── APIs.java
│ │ │ ├── AdditionalPage.java
│ │ │ ├── CodeExampleText.java
│ │ │ ├── CustomErrorTexts.java
│ │ │ ├── Forms.java
│ │ │ ├── HelpingTexts.java
│ │ │ ├── Inputs.java
│ │ │ ├── LinkToAPIMethods.java
│ │ │ ├── LoginPage.java
│ │ │ ├── ManifestGroup.java
│ │ │ ├── ManifestStructure.java
│ │ │ ├── RedirectsToOtherCodeExamples.java
│ │ │ ├── SelectAPIPage.java
│ │ │ └── SupportingTexts.java
│ │ ├── security
│ │ ├── CustomAuthenticationFailureHandler.java
│ │ ├── JWTOAuth2User.java
│ │ ├── SecurityHelpers.java
│ │ ├── acg
│ │ │ └── ACGAuthenticationMethod.java
│ │ └── jwt
│ │ │ └── JWTAuthenticationMethod.java
│ │ └── utils
│ │ ├── AccountsConverter.java
│ │ ├── DateUtils.java
│ │ └── FileUtils.java
├── resources
│ ├── META-INF
│ │ └── spring.factories
│ ├── Offer_Letter_Dynamic_Table.docx
│ ├── TermsOfService.pdf
│ ├── Welcome.txt
│ ├── Welcome1.txt
│ ├── World_Wide_Corp_Battle_Plan_Trafalgar.docx
│ ├── World_Wide_Corp_Web_Form.pdf
│ ├── World_Wide_Corp_fields.pdf
│ ├── World_Wide_Corp_fields_shown.docx
│ ├── World_Wide_Corp_lorem.pdf
│ ├── World_Wide_Corp_salary.docx
│ ├── application.example.json
│ ├── applicationJsonMissingError.html
│ ├── doc_1.html
│ ├── log4jdbc.log4j2.properties
│ ├── order_form.html
│ ├── public
│ │ └── assets
│ │ │ ├── banner-code.png
│ │ │ ├── css.css
│ │ │ ├── eg_03.js
│ │ │ ├── ejs.min.js
│ │ │ ├── favicon.png
│ │ │ ├── notify.min.js
│ │ │ ├── render.js
│ │ │ ├── search.js
│ │ │ └── site.js
│ ├── templates
│ │ ├── candy-bonbon.ftl
│ │ ├── candy-bonbon2.ftl
│ │ └── order-form.ftl
│ └── web-form-config.json
└── webapp
│ └── WEB-INF
│ └── templates
│ └── views
│ ├── error.jsp
│ ├── pages
│ ├── admin
│ │ └── examples
│ │ │ ├── a001.jsp
│ │ │ ├── a002.jsp
│ │ │ ├── a003.jsp
│ │ │ ├── a003a.jsp
│ │ │ ├── a004.jsp
│ │ │ ├── a004a.jsp
│ │ │ ├── a005.jsp
│ │ │ ├── a006.jsp
│ │ │ ├── a007.jsp
│ │ │ ├── a008.jsp
│ │ │ ├── a009.jsp
│ │ │ ├── a010.jsp
│ │ │ ├── a011.jsp
│ │ │ ├── a012.jsp
│ │ │ └── a013.jsp
│ ├── click
│ │ └── examples
│ │ │ ├── c001.jsp
│ │ │ ├── c002.jsp
│ │ │ ├── c003.jsp
│ │ │ ├── c004.jsp
│ │ │ ├── c005.jsp
│ │ │ └── c006.jsp
│ ├── connect
│ │ └── examples
│ │ │ └── con001.jsp
│ ├── connectedfields
│ │ └── examples
│ │ │ └── cf001.jsp
│ ├── ds_must_authenticate.jsp
│ ├── ds_restart.jsp
│ ├── ds_return.jsp
│ ├── esignature
│ │ ├── examples
│ │ │ ├── eg001.jsp
│ │ │ ├── eg002.jsp
│ │ │ ├── eg003.jsp
│ │ │ ├── eg004.jsp
│ │ │ ├── eg005.jsp
│ │ │ ├── eg006.jsp
│ │ │ ├── eg007.jsp
│ │ │ ├── eg008.jsp
│ │ │ ├── eg009.jsp
│ │ │ ├── eg010.jsp
│ │ │ ├── eg011.jsp
│ │ │ ├── eg012.jsp
│ │ │ ├── eg013.jsp
│ │ │ ├── eg014.jsp
│ │ │ ├── eg015.jsp
│ │ │ ├── eg016.jsp
│ │ │ ├── eg017.jsp
│ │ │ ├── eg018.jsp
│ │ │ ├── eg019.jsp
│ │ │ ├── eg020.jsp
│ │ │ ├── eg022.jsp
│ │ │ ├── eg023.jsp
│ │ │ ├── eg024.jsp
│ │ │ ├── eg025.jsp
│ │ │ ├── eg026.jsp
│ │ │ ├── eg027.jsp
│ │ │ ├── eg028.jsp
│ │ │ ├── eg029.jsp
│ │ │ ├── eg030.jsp
│ │ │ ├── eg031.jsp
│ │ │ ├── eg032.jsp
│ │ │ ├── eg033.jsp
│ │ │ ├── eg034.jsp
│ │ │ ├── eg035.jsp
│ │ │ ├── eg036.jsp
│ │ │ ├── eg037.jsp
│ │ │ ├── eg038.jsp
│ │ │ ├── eg039.jsp
│ │ │ ├── eg040.jsp
│ │ │ ├── eg041.jsp
│ │ │ ├── eg042.jsp
│ │ │ ├── eg043.jsp
│ │ │ ├── eg044.jsp
│ │ │ ├── embed.jsp
│ │ │ └── quickEmbeddedSigning.jsp
│ │ └── index.jsp
│ ├── example_done.jsp
│ ├── example_done_compare.jsp
│ ├── example_pending.jsp
│ ├── links_to_api_methods.jsp
│ ├── monitor
│ │ └── examples
│ │ │ ├── m001.jsp
│ │ │ └── m002.jsp
│ ├── notary
│ │ └── examples
│ │ │ └── n004.jsp
│ ├── rooms
│ │ └── examples
│ │ │ ├── r001.jsp
│ │ │ ├── r002.jsp
│ │ │ ├── r003.jsp
│ │ │ ├── r004.jsp
│ │ │ ├── r005.jsp
│ │ │ ├── r006.jsp
│ │ │ ├── r007.jsp
│ │ │ ├── r008.jsp
│ │ │ └── r009.jsp
│ └── webforms
│ │ └── examples
│ │ ├── embed.jsp
│ │ └── web001.jsp
│ └── partials
│ ├── foot.jsp
│ └── head.jsp
└── test
└── java
└── tests
├── Click
├── ActivateClickwrapTest.java
└── CreateClickwrapTest.java
├── common
├── JWTLoginMethodTest.java
└── TestConfig.java
└── eSignature
├── AddDocToTemplateTest.java
├── ApplyBrandToEnvelopeTest.java
├── BulkSendEnvelopesTest.java
├── CreateBrandTest.java
├── CreateNewTemplateTest.java
├── EmbeddedSigningTest.java
├── PermissionCreateTest.java
├── SetTabValuesTest.java
├── SigningViaEmailTest.java
└── UseTemplateTest.java
/.github/workflows/maven.yml:
--------------------------------------------------------------------------------
1 | name: Java launcher
2 |
3 | on:
4 | push:
5 | branches: [ "master" ]
6 | pull_request:
7 | branches: [ "master" ]
8 |
9 | jobs:
10 | build:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v3
16 | - name: Set up JDK 11
17 | uses: actions/setup-java@v3
18 | with:
19 | java-version: '11'
20 | distribution: 'temurin'
21 | cache: maven
22 | - name: Check code with linters
23 | run: mvn -U checkstyle:check
24 | - name: Download dependancies
25 | env:
26 | CLIENT_ID: ${{ secrets.CLIENT_ID }}
27 | IMPERSONATED_USER_ID: ${{ secrets.IMPERSONATED_USER_ID }}
28 | PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
29 | SIGNER_EMAIL: ${{ secrets.SIGNER_EMAIL }}
30 | SIGNER_NAME: ${{ secrets.SIGNER_NAME }}
31 | run: mvn install
32 | - name: Build with Maven
33 | env:
34 | CLIENT_ID: ${{ secrets.CLIENT_ID }}
35 | IMPERSONATED_USER_ID: ${{ secrets.IMPERSONATED_USER_ID }}
36 | PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
37 | SIGNER_EMAIL: ${{ secrets.SIGNER_EMAIL }}
38 | SIGNER_NAME: ${{ secrets.SIGNER_NAME }}
39 | run: mvn -B package --file pom.xml
40 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # idea
2 | .idea/
3 | #*.iml
4 |
5 |
6 | # target dir
7 | .settings/*
8 | target/*
9 | .classpath
10 | .project
11 |
12 |
13 | # Compiled class file
14 | *.class
15 |
16 | # Log file
17 | *.log
18 |
19 | # BlueJ files
20 | *.ctxt
21 |
22 | # Mobile Tools for Java (J2ME)
23 | .mtj.tmp/
24 |
25 | # Package Files #
26 | *.jar
27 | *.war
28 | *.nar
29 | *.ear
30 | *.zip
31 | *.tar.gz
32 | *.rar
33 |
34 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
35 | hs_err_pid*
36 |
37 | # don't check configuration files/secrets
38 |
39 | private.key
40 | application.properties
41 | /target/
42 | src/main/resources/application.json
43 | src/main/resources/application.properties
44 | src/main/java/com/docusign/admin/
45 |
46 | # according to gitignore.io this shouldnt be shared
47 | .factorypath
48 | src/main/resources/ExportedUserData.csv
49 | app.config
50 | Quick_ACG/target/*
51 | JWT Console App/target/*
52 | Quick_ACG/src/main/resources/application.json
53 |
54 |
--------------------------------------------------------------------------------
/.metadata/.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.lock
--------------------------------------------------------------------------------
/.metadata/.mylyn/.taskListIndex/segments_1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.mylyn/.taskListIndex/segments_1
--------------------------------------------------------------------------------
/.metadata/.mylyn/.taskListIndex/write.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.mylyn/.taskListIndex/write.lock
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index:
--------------------------------------------------------------------------------
1 | / org.eclipse.jdt.core stateVersionNumber 30
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree:
--------------------------------------------------------------------------------
1 | org.eclipse.jdt.core
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | version=1
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.logging.aeri.ide.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | resetSendMode=KEEP
3 | resetSendModeOn=0
4 | sendMode=NOTIFY
5 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs:
--------------------------------------------------------------------------------
1 | content_assist_proposals_background=255,255,255
2 | content_assist_proposals_foreground=0,0,0
3 | eclipse.preferences.version=1
4 | org.eclipse.jdt.ui.formatterprofiles.version=13
5 | spelling_locale_initialized=true
6 | useAnnotationsPrefPage=true
7 | useQuickDiffPrefPage=true
8 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.m2e.discovery.pref.projects=
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | mylyn.attention.migrated=true
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | migrated.task.repositories.secure.store=true
3 | org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
4 | org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true
5 | org.eclipse.mylyn.tasks.ui.welcome.message=true
6 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.team.ui.first_time=false
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | overviewRuler_migration=migrated_3.1
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs:
--------------------------------------------------------------------------------
1 | PROBLEMS_FILTERS_MIGRATE=true
2 | eclipse.preferences.version=1
3 | platformState=1513356134945
4 | quickStart=false
5 | tipsAndTricks=true
6 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs:
--------------------------------------------------------------------------------
1 | //org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
2 | PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery;
3 | eclipse.preferences.version=1
4 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.jdt.core/index.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/.metadata/.plugins/org.eclipse.jdt.core/index.db
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat:
--------------------------------------------------------------------------------
1 | JRE_LIB JRE_SRCROOT
2 | JUNIT_HOME JRE_SRC JUNIT_SRC_HOME M2_REPO
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml:
--------------------------------------------------------------------------------
1 |
2 | Email: {USER_EMAIL} Copy to: {CC_NAME}, {CC_EMAIL}
16 | Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.
17 | Email: ${args.signerEmail} Copy to: ${args.ccName}, ${args.ccEmail}
13 | Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie.
14 | Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée.
15 | Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice.
16 | Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice
17 | cream gummies cheesecake. Email: ${args.signerEmail} Copy to: ${args.ccName}, ${args.ccEmail} Item: ${args.item}, quantity: ${args.quantity} at market price.
14 | Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie.
15 | Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée.
16 | Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice.
17 | Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice
18 | cream gummies cheesecake. Error information: Message: ${done.message} ${done.fixingInstructions} Oops, we have encountered a problem. Message: ${done.message} Dump: ${done.stackTracePrinted} Please check your account configuration. If you are unable to resolve the problem, open a new issue on GitHub. ${launcherTexts.getContinueButton()} ${example.getExampleDescription()} Documentation about this example.
13 | ${viewSourceFile}
14 | ${example.getAdditionalPage().get(0).getResultsPageText()} Documentation about this example.
13 | ${viewSourceFile}
14 |
25 | Problem: please first bulk export user data using Send an envelope with a remote (email) signer and cc recipient.. ${example.getExampleDescription()} Documentation about this example.
13 | ${viewSourceFile}
14 | ${example.getAdditionalPage().get(0).getResultsPageText()} Documentation about this example.
13 | ${viewSourceFile}
14 |
25 | Problem: please first bulk import user data example 4. ${example.getExampleDescription()} Documentation about this example.
16 | ${viewSourceFile}
17 | ${example.getExampleDescription()} Documentation about this example.
16 | ${viewSourceFile}
17 | ${example.getExampleDescription()} Documentation about this example.
17 | ${viewSourceFile}
18 | ${example.getExampleDescription()} Documentation about this example.
19 | ${viewSourceFile}
20 | ${example.getForms().get(formNumber).getFormName().replaceFirst("\\{0}", emailAddress)}
45 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToSecondCodeExample)}
46 | ${example.getExampleDescription()} Documentation about this example.
17 | ${viewSourceFile}
18 | ${example.getExampleDescription()} Documentation about this example.
17 | ${viewSourceFile}
18 | ${example.getExampleDescription()}
11 | ${viewSourceFile}
12 | ${example.getExampleDescription()}
14 | ${viewSourceFile}
15 | ${example.getForms().get(formNumber).getFormName()}
38 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToFirstCodeExample)}
39 | ${example.getExampleDescription()}
9 | ${viewSourceFile}
10 | ${example.getExampleDescription()}
14 | ${viewSourceFile}
15 | ${example.getForms().get(formNumber).getFormName()}
38 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToFirstCodeExample)}
39 | ${example.getExampleDescription()} Documentation about this example.
17 | ${viewSourceFile}
18 |
21 | Prerequisites: See How to validate a webhook message using HMAC.
22 | ${launcherTexts.getLoginPage().getLoginHelperText()} Please restart the app to finish switching to a new API.
8 | Quit the current app with Data: event: ${event}. 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. envelopeId: ${qpEnvelopeId}. The envelopeId parameter is supplied by Docusign. state: ${state}. 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. ${launcherTexts.getContinueButton()} ${example.getExampleDescription()} Documentation about this example.
13 | ${viewSourceFile}
14 | ${example.getExampleDescription()} Documentation about this example.
19 | ${viewSourceFile}
20 |
25 | ${example.getForms().get(formNumber).getFormName()}
26 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToSecondCodeExample)} ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 |
24 | ${example.getForms().get(formNumber).getFormName()}
25 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToSecondCodeExample)} ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 |
24 | ${example.getForms().get(formNumber).getFormName()}
25 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToSecondCodeExample)} ${example.getExampleDescription()} Documentation about this example.
14 | ${viewSourceFile}
15 | ${example.getExampleDescription()} Documentation about this example.
20 | ${viewSourceFile}
21 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToSecondCodeExample)} ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 | ${example.getForms().get(formNumber).getFormName()} ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToNinthCodeExample)} ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 |
24 | ${example.getForms().get(formNumber).getFormName().replaceFirst("\\{0}", redirectTo16CodeExample)}
25 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectTo16CodeExample)} ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 | ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 | ${example.getExampleDescription()} Documentation about this example.
17 | ${viewSourceFile}
18 | ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 | ${example.getExampleDescription()} Documentation about this example.
17 | ${viewSourceFile}
18 | ${example.getExampleDescription()} ${example.getNotes()} Documentation about this example.
18 | ${viewSourceFile}
19 | ${example.getExampleDescription()} Documentation about this example.
18 | ${viewSourceFile}
19 | ${example.getExampleDescription()} Documentation about this example.
14 | ${viewSourceFile}
15 | ${example.getExampleDescription()} Documentation about this example.
16 | ${viewSourceFile}
17 | ${done.message}
16 |
21 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
11 |
12 | 
13 |
14 | An enabled Stripe payment gateway is now associated with your DocuSign developer account and is shown under **Payment Gateway**.
15 |
16 | 1. Save the **Gateway Account ID** GUID to the code example launcher configuration file.
17 |
18 |
19 | ## Additional documentation
20 | * [Managing Payment Gateways](https://support.docusign.com/en/guides/managing-payment-gateways)
21 | * [How to send a request for payment](https://developers.docusign.com/docs/esign-rest-api/how-to/request-a-payment)
22 |
--------------------------------------------------------------------------------
/Quick_ACG/src/main/java/com/docusign/OSDetector.java:
--------------------------------------------------------------------------------
1 | package com.docusign;
2 |
3 | /*
4 | * This class can be used to determine the user's operating system so that the
5 | * application can successfully open a web browser to run the examples.
6 | */
7 | public class OSDetector
8 | {
9 | private static final boolean isWindows;
10 | private static final boolean isLinux;
11 | private static final boolean isMac;
12 |
13 | static
14 | {
15 | String os = System.getProperty("os.name").toLowerCase();
16 | isWindows = os.contains("win");
17 | isLinux = os.contains("nux") || os.contains("nix");
18 | isMac = os.contains("mac");
19 | }
20 |
21 | public static boolean isWindows() { return isWindows; }
22 | public static boolean isLinux() { return isLinux; }
23 | public static boolean isMac() { return isMac; }
24 |
25 | }
--------------------------------------------------------------------------------
/Quick_ACG/src/main/java/com/docusign/core/model/Session.java:
--------------------------------------------------------------------------------
1 | package com.docusign.core.model;
2 |
3 | import com.docusign.esign.client.auth.OAuth;
4 | import lombok.Data;
5 | import org.springframework.context.annotation.Scope;
6 | import org.springframework.context.annotation.ScopedProxyMode;
7 | import org.springframework.stereotype.Component;
8 | import org.springframework.web.context.WebApplicationContext;
9 |
10 | import java.io.Serializable;
11 | import java.util.List;
12 | import java.util.UUID;
13 |
14 | @Component
15 | @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
16 | @Data
17 | public class Session implements Serializable {
18 | private static final long serialVersionUID = 2695379118371574037L;
19 |
20 | public Long tokenExpirationTime;
21 |
22 | private String accountId;
23 |
24 | private String accountName;
25 |
26 | private String basePath;
27 |
28 | private String envelopeId;
29 |
30 | private String statusCFR;
31 |
32 | private Boolean isPKCEWorking = true;
33 | }
34 |
--------------------------------------------------------------------------------
/Quick_ACG/src/main/resources/application.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "quickstart" :"{QUICKSTART_VALUE}",
3 | "quickACG": "{QUICK_ACG_VALUE}",
4 | "DS_SIGNER_NAME": "{SIGNER_NAME}",
5 | "DS_SIGNER_EMAIL": "{SIGNER_EMAIL}",
6 | "DS_APP_URL": "http://localhost:8080",
7 | "DS_TARGET_ACCOUNT_ID": "{IMPERSONATED_USER_ID}",
8 | "DS_BASE_PATH": "https://demo.docusign.net",
9 | "DS_ROOMS_BASE_PATH": "https://demo.rooms.docusign.com",
10 | "DS_CLICK_BASE_PATH": "https://demo.docusign.net",
11 | "DS_MONITOR_BASE_PATH": "https://lens-d.docusign.net",
12 | "DS_ADMIN_BASE_PATH": "https://api-d.docusign.net",
13 |
14 | "Gateway_Name": "{DS_PAYMENT_GATEWAY_NAME}",
15 | "Gateway_Account_Id": "{GATEWAY_ACCOUNT_ID}",
16 | "Gateway_Display_Name": "{DS_PAYMENT_GATEWAY_DISPLAY_NAME}",
17 |
18 | "authorization.code.grant.client.scope": "signature",
19 | "authorization.code.grant.sso.redirect-url": "&type=acg",
20 | "authorization.code.grant.client.client-id": "{INTEGRATION_KEY_AUTH_CODE}",
21 | "authorization.code.grant.client.client-secret": "{SECRET_KEY}",
22 | "authorization.code.grant.client.access-token-uri": "https://account-d.docusign.com/oauth/token",
23 | "authorization.code.grant.client.user-authorization-uri": "https://account-d.docusign.com/oauth/auth?prompt=login",
24 |
25 | "common.client.resource.user-info-uri": "https://account-d.docusign.com/oauth/userinfo",
26 | "com.docusign.github.example-uri": "https://github.com/docusign/code-examples-java/blob/master/src/main/java/",
27 | "com.docusign.documentation-path": "",
28 |
29 | "ESignatureManifest": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/eSignatureManifest.json",
30 |
31 | "server.tomcat.additional-tld-skip-patterns": "*jaxb*.jar",
32 | "server.servlet.session.tracking-modes": "cookie",
33 | "server.servlet.session.persistent": false,
34 | "server.error.include-stacktrace": "always",
35 | "server.error.whitelabel.enabled": false,
36 |
37 | "spring.session.store-type": "none",
38 | "spring.mvc.view.prefix": "/WEB-INF/templates/views/",
39 | "spring.mvc.view.suffix": ".jsp",
40 | "spring.jmx.enabled": false
41 | }
--------------------------------------------------------------------------------
/docs/Adding_examples.md:
--------------------------------------------------------------------------------
1 | # Proposing and Adding Examples
2 |
3 | This page discusses how to add additional examples to this launcher.
4 |
5 | All contributions must use the MIT License.
6 |
7 | ## Discuss
8 | First, discuss your plans with the DevCenter Examples Manager
9 | (Larry Kluger) via apihelp@docusign.com. He'll assign you an example number.
10 |
11 | A new example can be added to any of the `eg-03-` series of
12 | launchers, except for the curl repo.
13 |
14 | After your new example has been accepted, the DevCenter team will
15 | arrange to have it ported to the other SDK examples.
16 |
17 | ### New examples should be not too big, and not too small
18 | Each example should cover a DocuSign feature "appropriately."
19 |
20 | For example, if a feature offers two options then consider
21 | having your example demonstrate both options.
22 |
23 | ### Self-contained
24 | Examples should be self-contained within the scope of the
25 | launcher.
26 |
27 | For example, if your example operates on a template,
28 | then either use the template created by Create a template,
29 | or modify the template created by Create a template (eg add a field),
30 | or programmatically create a new template.
31 |
32 | If you plan to change Create a template, first discuss with the
33 | Examples Manager via apihelp@docusign.com.
34 |
35 | Do not require a user to create or modify a template by
36 | using the Admin tool.
37 |
--------------------------------------------------------------------------------
/docs/IntelliJ_import_highlight.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/IntelliJ_import_highlight.jpg
--------------------------------------------------------------------------------
/docs/ds-java-auth-final.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/ds-java-auth-final.zip
--------------------------------------------------------------------------------
/docs/install_fig_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/install_fig_1.png
--------------------------------------------------------------------------------
/docs/install_fig_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/install_fig_2.png
--------------------------------------------------------------------------------
/docs/install_fig_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/install_fig_7.png
--------------------------------------------------------------------------------
/docs/lombok_errors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/lombok_errors.png
--------------------------------------------------------------------------------
/docs/stripe_skip_account_form_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/docs/stripe_skip_account_form_link.png
--------------------------------------------------------------------------------
/src/main/java/com/docusign/JsonPropertySourceLoader.java:
--------------------------------------------------------------------------------
1 | package com.docusign;
2 |
3 | import org.springframework.boot.env.YamlPropertySourceLoader;
4 |
5 | public class JsonPropertySourceLoader extends YamlPropertySourceLoader {
6 | @Override
7 | public String[] getFileExtensions() {
8 | return new String[]{"json"};
9 | }
10 | }
--------------------------------------------------------------------------------
/src/main/java/com/docusign/common/ApiIndex.java:
--------------------------------------------------------------------------------
1 | package com.docusign.common;
2 |
3 | public enum ApiIndex {
4 | ESIGNATURE("/pages/esignature/index", "/restapi", "/eg001", "/eg"),
5 | ROOMS("/pages/rooms/index", "/restapi", "/r001", "/r"),
6 | CLICK("/pages/click/index", "/clickapi", "/c001", "/c"),
7 | MONITOR("/pages/monitor/index", "", "/m001", "/m"),
8 | ADMIN("/pages/admin/index", "/management", "/a001", "/a"),
9 | CONNECT("/pages/connect/index", "", "/con001", "/con"),
10 | NOTARY("/pages/notary/index", "/restapi", "/n004", "/n"),
11 | WEBFORMS("/pages/webforms/index", "/restapi", "/web001", "/web"),
12 | CONNECTEDFIELDS("/pages/connectedfields/index", "/restapi", "/cf001", "/cf");
13 |
14 | private final String indexPath;
15 |
16 | private final String baseUrlSuffix;
17 |
18 | private final String firstExamplePath;
19 |
20 | private final String examplesPathCode;
21 |
22 | ApiIndex(final String indexPath, final String baseUrlSuffix, final String firstExamplePath,
23 | final String examplesPathCode) {
24 | this.indexPath = indexPath;
25 | this.baseUrlSuffix = baseUrlSuffix;
26 | this.firstExamplePath = firstExamplePath;
27 | this.examplesPathCode = examplesPathCode;
28 | }
29 |
30 | public String getBaseUrlSuffix() {
31 | return baseUrlSuffix;
32 | }
33 |
34 | public String getPathOfFirstExample() {
35 | return firstExamplePath;
36 | }
37 |
38 | public String getExamplesPathCode() {
39 | return examplesPathCode;
40 | }
41 |
42 | @Override
43 | public String toString() {
44 | return this.indexPath;
45 | }
46 | }
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/admin/examples/A005AuditUsers.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.admin.examples;
2 |
3 | import com.docusign.DSConfiguration;
4 | import com.docusign.admin.api.UsersApi;
5 | import com.docusign.admin.model.UserDrilldownResponse;
6 | import com.docusign.common.WorkArguments;
7 | import com.docusign.controller.admin.services.AuditUsersService;
8 | import com.docusign.core.model.DoneExample;
9 | import com.docusign.core.model.Session;
10 | import com.docusign.core.model.User;
11 | import org.springframework.stereotype.Controller;
12 | import org.springframework.ui.ModelMap;
13 | import org.springframework.web.bind.annotation.RequestMapping;
14 |
15 | import javax.servlet.http.HttpServletResponse;
16 | import java.util.ArrayList;
17 | import java.util.UUID;
18 |
19 | /**
20 | * Create new user This example demonstrates how to create a new user with
21 | * methods from Admin API.
22 | */
23 | @Controller
24 | @RequestMapping("/a005")
25 | public class A005AuditUsers extends AbstractAdminController {
26 |
27 | public A005AuditUsers(DSConfiguration config, Session session, User user) {
28 | super(config, "a005", user, session);
29 | }
30 |
31 | @Override
32 | protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse response) throws Exception {
33 | // Collect ids needed for the request
34 | UUID organizationId = this.getOrganizationId(this.user.getAccessToken(), this.session.getBasePath());
35 | UUID accountId = this.getExistingAccountId(this.user.getAccessToken(), this.session.getBasePath(), organizationId);
36 |
37 | UsersApi usersApi = createUsersApi(this.user.getAccessToken(), this.session.getBasePath());
38 |
39 | ArrayList
21 | * List the envelopes created in the last 30 days. This example demonstrates
22 | * how to query DocuSign about envelopes sent by the current user.
23 | */
24 | @Controller
25 | @RequestMapping("/eg003")
26 | public class EG003ControllerListEnvelopes extends AbstractEsignatureController {
27 |
28 | public EG003ControllerListEnvelopes(DSConfiguration config, Session session, User user) {
29 | super(config, "eg003", session, user);
30 | }
31 |
32 | @Override
33 | protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse response) throws ApiException {
34 | //ds-snippet-start:eSign3Step2
35 | EnvelopesApi envelopesApi = createEnvelopesApi(session.getBasePath(), user.getAccessToken());
36 | EnvelopesInformation envelopesInformation = ListEnvelopesServices.listEnvelopes(
37 | envelopesApi,
38 | session.getAccountId());
39 | //ds-snippet-end:eSign3Step2
40 |
41 | DoneExample.createDefault(getTextForCodeExampleByApiType().ExampleName)
42 | .withMessage(getTextForCodeExampleByApiType().ResultsPageText)
43 | .withJsonObject(envelopesInformation)
44 | .addToModel(model, config);
45 | return DONE_EXAMPLE_PAGE;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/examples/EG010ControllerSendBinaryDocs.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.examples;
2 |
3 | import com.docusign.DSConfiguration;
4 | import com.docusign.common.WorkArguments;
5 | import com.docusign.controller.eSignature.services.SendBinaryDocsService;
6 | import com.docusign.core.model.DoneExample;
7 | import com.docusign.core.model.Session;
8 | import com.docusign.core.model.User;
9 | import org.json.JSONObject;
10 | import org.springframework.stereotype.Controller;
11 | import org.springframework.ui.ModelMap;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 |
14 | import javax.servlet.http.HttpServletResponse;
15 | import java.io.IOException;
16 |
17 |
18 | /**
19 | * Send an envelope using binary document transfer.
20 | * The envelope includes a pdf, doc, and HTML document. Multipart data transfer
21 | * is used to send the documents in binary format to DocuSign.
22 | */
23 | @Controller
24 | @RequestMapping("/eg010")
25 | public class EG010ControllerSendBinaryDocs extends AbstractEsignatureController {
26 |
27 | public EG010ControllerSendBinaryDocs(DSConfiguration config, Session session, User user) {
28 | super(config, "eg010", session, user);
29 | }
30 |
31 | @Override
32 | protected Object doWork(WorkArguments args, ModelMap model, HttpServletResponse response) throws IOException {
33 | String responseString = SendBinaryDocsService.sendBinaryDocs(
34 | args,
35 | args.getSignerName(),
36 | args.getSignerEmail(),
37 | args.getCcName(),
38 | args.getCcEmail(),
39 | session.getBasePath(),
40 | session.getAccountId(),
41 | user.getAccessToken()
42 | );
43 | JSONObject obj = new JSONObject(responseString);
44 | String envelopeId = obj.getString("envelopeId");
45 | session.setEnvelopeId(envelopeId);
46 |
47 | DoneExample.createDefault(getTextForCodeExampleByApiType().ExampleName)
48 | .withMessage(getTextForCodeExampleByApiType().ResultsPageText
49 | .replaceFirst("\\{0}", envelopeId)
50 | )
51 | .addToModel(model, config);
52 | return DONE_EXAMPLE_PAGE;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/examples/ExampleException.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.examples;
2 |
3 | /**
4 | * Unchecked exception caused by examples.
5 | */
6 | public class ExampleException extends RuntimeException {
7 |
8 | private static final long serialVersionUID = 1L;
9 |
10 | /**
11 | * Constructs a new exception with the specified detail message and cause.
12 | *
13 | * @param message the detail message, which is kept as member
14 | * @param cause the cause, which is saved as member
15 | */
16 | public ExampleException(String message, Throwable cause) {
17 | super(message, cause);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/AccessCodeAuthenticationService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.controller.eSignature.examples.EnvelopeHelpers;
4 | import com.docusign.esign.api.EnvelopesApi;
5 | import com.docusign.esign.client.ApiException;
6 | import com.docusign.esign.model.*;
7 |
8 | import java.io.IOException;
9 | import java.util.Collections;
10 |
11 | public final class AccessCodeAuthenticationService {
12 | private static final String DOCUMENT_FILE_NAME = "World_Wide_Corp_lorem.pdf";
13 |
14 | private static final String DOCUMENT_NAME = "Lorem";
15 |
16 | public static EnvelopeSummary accessCodeAuthentication(
17 | EnvelopesApi envelopesApi,
18 | String accountId,
19 | EnvelopeDefinition envelope
20 | ) throws ApiException {
21 | //ds-snippet-start:eSign19Step4
22 | return envelopesApi.createEnvelope(accountId, envelope);
23 | //ds-snippet-end:eSign19Step4
24 | }
25 |
26 | //ds-snippet-start:eSign19Step3
27 | public static EnvelopeDefinition createEnvelope(
28 | String signerName,
29 | String signerEmail,
30 | String accessCode
31 | ) throws IOException {
32 | Document doc = EnvelopeHelpers.createDocumentFromFile(DOCUMENT_FILE_NAME, DOCUMENT_NAME, "1");
33 |
34 | Signer signer = KBAAuthenticationService.setSignHereAndSignerForEnvelope(signerName, signerEmail);
35 | signer.setAccessCode(accessCode);
36 |
37 | Recipients recipients = new Recipients();
38 | recipients.setSigners(Collections.singletonList(signer));
39 |
40 | EnvelopeDefinition envelope = new EnvelopeDefinition();
41 | envelope.setEmailSubject("Please Sign");
42 | envelope.setDocuments(Collections.singletonList(doc));
43 | envelope.setEnvelopeIdStamping("true");
44 | envelope.setEmailBlurb("Sample text for email body");
45 | envelope.setStatus(EnvelopeHelpers.ENVELOPE_STATUS_SENT);
46 | envelope.setRecipients(recipients);
47 |
48 | return envelope;
49 | }
50 | //ds-snippet-end:eSign19Step3
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/ApplyBrandToTemplateService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.controller.eSignature.examples.EnvelopeHelpers;
4 | import com.docusign.esign.api.EnvelopesApi;
5 | import com.docusign.esign.client.ApiException;
6 | import com.docusign.esign.model.EnvelopeDefinition;
7 | import com.docusign.esign.model.EnvelopeSummary;
8 | import com.docusign.esign.model.TemplateRole;
9 |
10 | import java.util.Arrays;
11 |
12 | public final class ApplyBrandToTemplateService {
13 | public static EnvelopeSummary applyBrandToTemplate(
14 | EnvelopesApi envelopesApi,
15 | String accountId,
16 | EnvelopeDefinition envelope
17 | ) throws ApiException {
18 | //ds-snippet-start:eSign30Step4
19 | return envelopesApi.createEnvelope(accountId, envelope);
20 | //ds-snippet-end:eSign30Step4
21 | }
22 |
23 | public static EnvelopeDefinition makeEnvelope(
24 | String signerEmail,
25 | String signerName,
26 | String ccEmail,
27 | String ccName,
28 | String templateId,
29 | String brandId
30 | ) {
31 | TemplateRole signer = new TemplateRole()
32 | .email(signerEmail)
33 | .name(signerName)
34 | .roleName(EnvelopeHelpers.SIGNER_ROLE_NAME);
35 |
36 | TemplateRole cc = new TemplateRole()
37 | .email(ccEmail)
38 | .name(ccName)
39 | .roleName(EnvelopeHelpers.CC_ROLE_NAME);
40 |
41 | return new EnvelopeDefinition()
42 | .templateId(templateId)
43 | .templateRoles(Arrays.asList(signer, cc))
44 | .brandId(brandId)
45 | .status(EnvelopeHelpers.ENVELOPE_STATUS_SENT);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/CreateBrandService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.AccountsApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.Brand;
6 | import com.docusign.esign.model.BrandsResponse;
7 |
8 | import java.util.List;
9 |
10 | public final class CreateBrandService {
11 | public static BrandsResponse createBrand(
12 | AccountsApi accountsApi,
13 | String brandName,
14 | String language,
15 | String accountId
16 | ) throws ApiException {
17 | Brand brand = new Brand()
18 | .brandName(brandName)
19 | .defaultBrandLanguage(language)
20 | .brandLanguages(List.of(language));
21 |
22 | // Step 4. Call the eSignature REST API
23 | //ds-snippet-start:eSign28Step4
24 | return accountsApi.createBrand(accountId, brand);
25 | //ds-snippet-end:eSign28Step4
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/EmbeddedConsoleService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.ConsoleViewRequest;
6 | import com.docusign.esign.model.ViewUrl;
7 |
8 | public final class EmbeddedConsoleService {
9 | public static ViewUrl createConsoleView(
10 | EnvelopesApi envelopesApi,
11 | String dsReturnUrl,
12 | String envelopeId,
13 | String startingView,
14 | String accountId) throws ApiException {
15 | // Step 1. Create the Console / Web UI view.
16 | // Set the URL where you want the recipient to go once they are finished in
17 | // the Web UI. There are cases where a user will never click "FINISH" within
18 | // the Web UI, you cannot assume control will be passed back to your application.
19 | //ds-snippet-start:eSign12Step2
20 | ConsoleViewRequest viewRequest = new ConsoleViewRequest();
21 | viewRequest.setReturnUrl(dsReturnUrl);
22 | if ("envelope".equalsIgnoreCase(startingView) && envelopeId != null) {
23 | viewRequest.setEnvelopeId(envelopeId);
24 | }
25 |
26 | // Step 2. Call the CreateSenderView API
27 | return envelopesApi.createConsoleView(accountId, viewRequest);
28 | //ds-snippet-end:eSign12Step2
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/EnvelopeCustomFieldValuesService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.CustomFieldsEnvelope;
6 |
7 | public final class EnvelopeCustomFieldValuesService {
8 | public static CustomFieldsEnvelope envelopeCustomFieldValues(
9 | EnvelopesApi envelopesApi,
10 | String accountId,
11 | String envelopeId
12 | ) throws ApiException {
13 | return envelopesApi.listCustomFields(accountId, envelopeId);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/EnvelopeDocsService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.EnvelopeDocumentsResult;
6 |
7 | public final class EnvelopeDocsService {
8 | public static EnvelopeDocumentsResult envelopeDocs(
9 | EnvelopesApi envelopesApi,
10 | String accountId,
11 | String envelopeId
12 | ) throws ApiException {
13 | // Step 1. List the envelope's documents
14 | return envelopesApi.listDocuments(accountId, envelopeId);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/EnvelopeGetDocService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import org.apache.commons.io.FilenameUtils;
6 |
7 | public final class EnvelopeGetDocService {
8 |
9 | public static byte[] envelopeGetDoc(
10 | EnvelopesApi envelopesApi,
11 | String accountId,
12 | String envelopeId,
13 | String documentId
14 | ) throws ApiException {
15 | //ds-snippet-start:eSign7Step3
16 | return envelopesApi.getDocument(accountId, envelopeId, documentId);
17 | //ds-snippet-end:eSign7Step3
18 | }
19 |
20 | public static String addExtension(String fileName, String extension) {
21 | if (FilenameUtils.isExtension(fileName, extension)) {
22 | return fileName;
23 | }
24 | return String.join(".", fileName, extension);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/EnvelopeInfoService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.Envelope;
6 |
7 | //ds-snippet-start:eSign4Step2
8 | public final class EnvelopeInfoService {
9 | public static Envelope envelopeInfo(
10 | EnvelopesApi envelopesApi,
11 | String accountId,
12 | String envelopeId
13 | ) throws ApiException {
14 | return envelopesApi.getEnvelope(accountId, envelopeId);
15 | }
16 | }
17 | //ds-snippet-end:eSign4Step2
18 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/EnvelopeRecipientsService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.Recipients;
6 |
7 | public final class EnvelopeRecipientsService {
8 | public static Recipients envelopeRecipients(
9 | EnvelopesApi envelopesApi,
10 | String accountId,
11 | String envelopeId
12 | ) throws ApiException {
13 | return envelopesApi.listRecipients(accountId, envelopeId);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/GetTabValuesService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.EnvelopesApi;
4 | import com.docusign.esign.client.ApiException;
5 | import com.docusign.esign.model.EnvelopeFormData;
6 |
7 | public final class GetTabValuesService {
8 | public static EnvelopeFormData getTabValues(
9 | EnvelopesApi envelopesApi,
10 | String accountId,
11 | String envelopeId
12 | ) throws ApiException {
13 | return envelopesApi.getFormData(accountId, envelopeId);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/ListEnvelopesServices.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.core.utils.DateUtils;
4 | import com.docusign.esign.api.EnvelopesApi;
5 | import com.docusign.esign.client.ApiException;
6 | import com.docusign.esign.model.EnvelopesInformation;
7 |
8 | import java.time.LocalDate;
9 |
10 | public final class ListEnvelopesServices {
11 | private static final int FROM_DATE_OFFSET_DAYS = 30;
12 |
13 | public static EnvelopesInformation listEnvelopes(EnvelopesApi envelopesApi, String accountId) throws ApiException {
14 | EnvelopesApi.ListStatusChangesOptions options = envelopesApi.new ListStatusChangesOptions();
15 | LocalDate date = LocalDate.now().minusDays(FROM_DATE_OFFSET_DAYS);
16 | options.setFromDate(DateUtils.DATE_WITH_LINES.format(date));
17 | return envelopesApi.listStatusChanges(accountId, options);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/PermissionCreateService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.controller.eSignature.examples.DsModelUtils;
4 | import com.docusign.core.model.AccountRoleSettingsPatch;
5 | import com.docusign.esign.api.AccountsApi;
6 | import com.docusign.esign.client.ApiException;
7 | import com.docusign.esign.model.AccountRoleSettings;
8 | import com.docusign.esign.model.PermissionProfile;
9 | import com.google.gson.Gson;
10 |
11 | public class PermissionCreateService {
12 | public static PermissionProfile createNewProfile(
13 | AccountsApi accountsApi,
14 | String accountId,
15 | String permissionProfileName
16 | ) throws ApiException {
17 | // Step 3. Construct your request body
18 | // We're extending the AccountSettings class with AccountSettingsPatch to include the signingUIVersion which is missing in the swagger spec at this time.
19 | //ds-snippet-start:eSign24Step3
20 | Gson gson = new Gson();
21 | String signingUiVersion = "1";
22 | AccountRoleSettings settings = DsModelUtils.createDefaultRoleSettings();
23 | AccountRoleSettingsPatch newSettings = gson.fromJson(gson.toJson(settings), AccountRoleSettingsPatch.class);
24 | newSettings.signingUiVersion(signingUiVersion);
25 | PermissionProfile profile = new PermissionProfile()
26 | .permissionProfileName(permissionProfileName)
27 | .settings(newSettings);
28 | //ds-snippet-end:eSign24Step3
29 |
30 | // Step 4. Call the eSignature REST API
31 | //ds-snippet-start:eSign24Step4
32 | return accountsApi.createPermissionProfile(accountId, profile);
33 | //ds-snippet-end:eSign24Step4
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/PermissionDeleteService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 |
4 | import com.docusign.esign.api.AccountsApi;
5 | import com.docusign.esign.client.ApiException;
6 |
7 | public final class PermissionDeleteService {
8 | public static void permissionDelete(
9 | AccountsApi accountsApi,
10 | String accountId,
11 | String curProfileId
12 | ) throws ApiException {
13 | accountsApi.deletePermissionProfile(accountId, curProfileId);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/PermissionSetUserGroupsService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.esign.api.GroupsApi;
4 | import com.docusign.esign.client.ApiClient;
5 | import com.docusign.esign.client.ApiException;
6 | import com.docusign.esign.model.Group;
7 | import com.docusign.esign.model.GroupInformation;
8 |
9 | import java.util.List;
10 |
11 | public final class PermissionSetUserGroupsService {
12 | public static GroupInformation permissionSetUserGroups(
13 | ApiClient apiClient,
14 | String groupId,
15 | String profileId,
16 | String accountId
17 | ) throws ApiException {
18 | GroupsApi groupsApi = new GroupsApi(apiClient);
19 |
20 | // Step 3: Perform request
21 | Group newGroup = new Group()
22 | .groupId(groupId)
23 | .permissionProfileId(profileId);
24 | GroupInformation groupInformation = new GroupInformation()
25 | .groups(List.of(newGroup));
26 | return groupsApi.updateGroups(accountId, groupInformation);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/eSignature/services/UnpauseSignatureWorkflowService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.eSignature.services;
2 |
3 | import com.docusign.controller.eSignature.examples.EnvelopeHelpers;
4 | import com.docusign.esign.api.EnvelopesApi;
5 | import com.docusign.esign.client.ApiException;
6 | import com.docusign.esign.model.Envelope;
7 | import com.docusign.esign.model.EnvelopeUpdateSummary;
8 | import com.docusign.esign.model.Workflow;
9 |
10 | public class UnpauseSignatureWorkflowService {
11 | public static EnvelopeUpdateSummary unpauseSignatureWorkflow(
12 | EnvelopesApi envelopesApi,
13 | String accountId,
14 | String envelopeId
15 | ) throws ApiException {
16 | // Step 3: Construct your envelope JSON body
17 | //ds-snippet-start:eSign33Step3
18 | Workflow workflow = new Workflow();
19 | workflow.setWorkflowStatus(EnvelopeHelpers.WORKFLOW_STATUS_IN_PROGRESS);
20 |
21 | Envelope envelope = new Envelope();
22 | envelope.setWorkflow(workflow);
23 |
24 | EnvelopesApi.UpdateOptions updateOptions = envelopesApi.new UpdateOptions();
25 | updateOptions.setResendEnvelope("true");
26 | //ds-snippet-end:eSign33Step3
27 |
28 | // Step 4: Call the eSignature REST API
29 | //ds-snippet-start:eSign33Step4
30 | return envelopesApi.update(
31 | accountId,
32 | envelopeId,
33 | envelope,
34 | updateOptions
35 | );
36 | //ds-snippet-end:eSign33Step4
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/notary/examples/Neg004SendWithThirdPartyNotaryController.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.notary.examples;
2 |
3 | import java.io.IOException;
4 |
5 | import javax.servlet.http.HttpServletResponse;
6 |
7 | import org.springframework.stereotype.Controller;
8 | import org.springframework.ui.ModelMap;
9 | import org.springframework.web.bind.annotation.RequestMapping;
10 | import com.docusign.DSConfiguration;
11 | import com.docusign.common.WorkArguments;
12 | import com.docusign.core.model.DoneExample;
13 | import com.docusign.core.model.Session;
14 | import com.docusign.core.model.User;
15 | import com.docusign.esign.api.EnvelopesApi;
16 | import com.docusign.esign.client.ApiException;
17 | import com.docusign.controller.notary.services.SendWithThirdPartyNotaryService;
18 |
19 | @Controller
20 | @RequestMapping("/n004")
21 | public class Neg004SendWithThirdPartyNotaryController extends AbstractNotaryController {
22 |
23 | public Neg004SendWithThirdPartyNotaryController(DSConfiguration config, Session session, User user) {
24 | super(config, "n004", session, user);
25 | }
26 |
27 | @Override
28 | protected Object doWork(
29 | WorkArguments args,
30 | ModelMap model,
31 | HttpServletResponse response)
32 | throws ApiException, IOException, com.docusign.webforms.client.ApiException {
33 | EnvelopesApi envelopesApi = createEnvelopesApi(session.getBasePath(), user.getAccessToken());
34 |
35 | // Call the Examples API method to create and send an notary envelope via email
36 | var envelopeId = SendWithThirdPartyNotaryService.sendWithNotary(
37 | args.getSignerEmail(),
38 | args.getSignerName(),
39 | this.session.getAccountId(),
40 | envelopesApi,
41 | args);
42 |
43 | DoneExample.createDefault(getTextForCodeExampleByApiType().ExampleName)
44 | .withMessage(getTextForCodeExampleByApiType().ResultsPageText
45 | .replaceFirst("\\{0}", envelopeId))
46 | .addToModel(model, config);
47 | return DONE_EXAMPLE_PAGE;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/examples/R007ControllerCreateFormGroup.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.examples;
2 |
3 | import com.docusign.DSConfiguration;
4 | import com.docusign.common.WorkArguments;
5 | import com.docusign.controller.rooms.services.CreateFormGroupService;
6 | import com.docusign.core.model.DoneExample;
7 | import com.docusign.core.model.Session;
8 | import com.docusign.core.model.User;
9 | import com.docusign.rooms.api.FormGroupsApi;
10 | import com.docusign.rooms.client.ApiException;
11 | import com.docusign.rooms.model.FormGroup;
12 | import org.springframework.stereotype.Controller;
13 | import org.springframework.ui.ModelMap;
14 | import org.springframework.web.bind.annotation.RequestMapping;
15 |
16 | import javax.servlet.http.HttpServletResponse;
17 | import java.io.IOException;
18 |
19 | /**
20 | * Creating create a form group.
21 | */
22 | @Controller
23 | @RequestMapping("/r007")
24 | public class R007ControllerCreateFormGroup extends AbstractRoomsController {
25 |
26 | public R007ControllerCreateFormGroup(DSConfiguration config, Session session, User user) {
27 | super(config, "r007");
28 | this.session = session;
29 | this.user = user;
30 | }
31 |
32 | @Override
33 | // ***DS.snippet.0.start
34 | protected Object doWork(WorkArguments args, ModelMap model,
35 | HttpServletResponse response) throws IOException, ApiException {
36 |
37 | //ds-snippet-start:Rooms7Step2
38 | FormGroupsApi formGroupsApi = createFormGroupsApi(
39 | this.session.getBasePath(), this.user.getAccessToken()
40 | );
41 | //ds-snippet-end:Rooms7Step2
42 |
43 | FormGroup formGroup = CreateFormGroupService.createFormGroup(
44 | formGroupsApi,
45 | this.session.getAccountId(),
46 | args.getFormGroupName());
47 |
48 | DoneExample.createDefault(this.title)
49 | .withJsonObject(formGroup)
50 | .withMessage(getTextForCodeExampleByApiType().ResultsPageText
51 | .replaceFirst("\\{0}", formGroup.getName()))
52 | .addToModel(model, config);
53 | return DONE_EXAMPLE_PAGE;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/AddingFormsToRoomService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.RoomsApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FormForAdd;
6 | import com.docusign.rooms.model.RoomDocument;
7 |
8 | import java.util.UUID;
9 |
10 | public final class AddingFormsToRoomService {
11 | public static RoomDocument addFormsToRoom(
12 | RoomsApi roomsApi,
13 | String accountId,
14 | UUID formId,
15 | Integer roomId
16 | ) throws ApiException {
17 | FormForAdd formForAdd = new FormForAdd().formId(formId);
18 | return roomsApi.addFormToRoom(accountId, roomId, formForAdd);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/AssignFormToFormGroupService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.FormGroupsApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FormGroupFormToAssign;
6 |
7 | import java.util.UUID;
8 |
9 | public final class AssignFormToFormGroupService {
10 | public static FormGroupFormToAssign assignFormToFormGroup(
11 | FormGroupsApi formGroupsApi,
12 | String accountId,
13 | UUID formId,
14 | UUID formGroupId
15 | ) throws ApiException {
16 | //ds-snippet-start:Rooms9Step5
17 | FormGroupFormToAssign formGroupFormToAssignRequest = new FormGroupFormToAssign()
18 | .formId(formId);
19 | //ds-snippet-end:Rooms9Step5
20 |
21 | return formGroupsApi.assignFormGroupForm(
22 | accountId, formGroupId, formGroupFormToAssignRequest);
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/CreateFormGroupService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.FormGroupsApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FormGroup;
6 | import com.docusign.rooms.model.FormGroupForCreate;
7 |
8 | public final class CreateFormGroupService {
9 | public static FormGroup createFormGroup(
10 | FormGroupsApi formGroupsApi,
11 | String accountId,
12 | String formGroupName
13 | ) throws ApiException {
14 | //ds-snippet-start:Rooms7Step3
15 | FormGroupForCreate formGroupForCreate = new FormGroupForCreate()
16 | .name(formGroupName);
17 | //ds-snippet-end:Rooms7Step3
18 |
19 | //ds-snippet-start:Rooms7Step4
20 | return formGroupsApi.createFormGroup(accountId, formGroupForCreate);
21 | //ds-snippet-end:Rooms7Step4
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/CreateRoomService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.RoomsApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FieldDataForCreate;
6 | import com.docusign.rooms.model.Room;
7 | import com.docusign.rooms.model.RoomForCreate;
8 |
9 | //ds-snippet-start:Rooms1Step4
10 | public final class CreateRoomService {
11 | public static Room createRoomFromModel(
12 | RoomsApi roomsApi,
13 | String accountId,
14 | RoomForCreate roomForCreate
15 | ) throws ApiException {
16 | return roomsApi.createRoom(accountId, roomForCreate);
17 | }
18 | //ds-snippet-end:Rooms1Step4
19 |
20 | public static RoomForCreate createRoomModel(Integer roleId, String roomName) {
21 | return new RoomForCreate()
22 | .name(roomName)
23 | .roleId(roleId)
24 | .transactionSideId("listbuy")
25 | .fieldData(
26 | new FieldDataForCreate()
27 | .putDataItem("address1", "123 EZ Street")
28 | .putDataItem("address2", "unit 10")
29 | .putDataItem("city", "Galaxian")
30 | .putDataItem("state", "US-HI")
31 | .putDataItem("postalCode", "11112")
32 | .putDataItem("companyRoomStatus", "5")
33 | .putDataItem(
34 | "comments",
35 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/CreateRoomWithTemplateService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.RoomsApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FieldDataForCreate;
6 | import com.docusign.rooms.model.Room;
7 | import com.docusign.rooms.model.RoomForCreate;
8 |
9 | public final class CreateRoomWithTemplateService {
10 | public static Room createRoomFromModel(
11 | RoomsApi roomsApi,
12 | String accountId,
13 | RoomForCreate roomForCreate
14 | ) throws ApiException {
15 | return roomsApi.createRoom(accountId, roomForCreate);
16 | }
17 |
18 | public static RoomForCreate createRoom(Integer roleId, String roomName, Integer templateId) {
19 | //ds-snippet-start:Rooms2Step5
20 | return new RoomForCreate()
21 | .name(roomName)
22 | .roleId(roleId)
23 | .templateId(templateId)
24 | .fieldData(
25 | new FieldDataForCreate()
26 | .putDataItem("address1", "123 EZ Street")
27 | .putDataItem("address2", "unit 10")
28 | .putDataItem("city", "Galaxian")
29 | .putDataItem("state", "US-HI")
30 | .putDataItem("postalCode", "11112")
31 | .putDataItem("companyRoomStatus", "5")
32 | .putDataItem("comments", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
33 | );
34 | //ds-snippet-end:Rooms2Step5
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/ExportingDataFromRoomService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.RoomsApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FieldData;
6 |
7 | public final class ExportingDataFromRoomService {
8 | public static FieldData exportDataFromRoom(
9 | RoomsApi roomsApi,
10 | String accountId,
11 | Integer roomId
12 | ) throws ApiException {
13 | return roomsApi.getRoomFieldData(accountId, roomId);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/ExternalFormSessionService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.ExternalFormFillSessionsApi;
4 | import com.docusign.rooms.api.RoomsApi;
5 | import com.docusign.rooms.client.ApiException;
6 | import com.docusign.rooms.model.ExternalFormFillSession;
7 | import com.docusign.rooms.model.ExternalFormFillSessionForCreate;
8 | import com.docusign.rooms.model.RoomDocumentList;
9 | import com.docusign.rooms.model.RoomSummaryList;
10 |
11 | public class ExternalFormSessionService {
12 | public RoomDocumentList getDocuments(
13 | RoomsApi roomsApi,
14 | String accountId,
15 | Integer roomId
16 | ) throws ApiException {
17 | return roomsApi.getDocuments(
18 | accountId,
19 | roomId);
20 | }
21 |
22 | public RoomSummaryList getRooms(
23 | RoomsApi roomsApi,
24 | String accountId
25 | ) throws ApiException {
26 | return roomsApi.getRooms(accountId);
27 | }
28 |
29 | public ExternalFormFillSession createSession(
30 | ExternalFormFillSessionsApi externalFormFillSessionsApi,
31 | String accountId,
32 | ExternalFormFillSessionForCreate sessionForCreate
33 | ) throws ApiException {
34 | return externalFormFillSessionsApi.createExternalFormFillSession(accountId, sessionForCreate);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/GetAdminRolesService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.RolesApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.RoleSummary;
6 | import com.docusign.rooms.model.RoleSummaryList;
7 |
8 | public final class GetAdminRolesService {
9 | public static RoleSummary getAdminRole(RolesApi rolesApi, String accountId)
10 | throws ApiException {
11 | RoleSummaryList roleSummaryList = rolesApi.getRoles(accountId);
12 | return roleSummaryList.getRoles()
13 | .stream()
14 | .filter(RoleSummary::isIsDefaultForAdmin)
15 | .findFirst()
16 | .get();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/docusign/controller/rooms/services/GetFormSummaryListService.java:
--------------------------------------------------------------------------------
1 | package com.docusign.controller.rooms.services;
2 |
3 | import com.docusign.rooms.api.FormLibrariesApi;
4 | import com.docusign.rooms.client.ApiException;
5 | import com.docusign.rooms.model.FormLibrarySummary;
6 | import com.docusign.rooms.model.FormLibrarySummaryList;
7 | import com.docusign.rooms.model.FormSummary;
8 | import com.docusign.rooms.model.FormSummaryList;
9 |
10 | import java.util.ArrayList;
11 | import java.util.List;
12 |
13 |
14 | public final class GetFormSummaryListService {
15 | public static ListWorld Wide Corp
9 | Order Processing Division
12 | Ordered by {USER_FULLNAME}
13 | Agreed: **signature_1**/
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/main/resources/log4jdbc.log4j2.properties:
--------------------------------------------------------------------------------
1 | log4jdbc.dump.sql.maxlinelength=0
2 | log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator
--------------------------------------------------------------------------------
/src/main/resources/public/assets/banner-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/src/main/resources/public/assets/banner-code.png
--------------------------------------------------------------------------------
/src/main/resources/public/assets/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/docusign/code-examples-java/cf83a8e52d9ca3d361da13ca600e8739e124884d/src/main/resources/public/assets/favicon.png
--------------------------------------------------------------------------------
/src/main/resources/public/assets/render.js:
--------------------------------------------------------------------------------
1 | // var templates = {};
2 | //
3 | // function render(template, model, url) {
4 | // var compiledTemplate;
5 | // if (templates[url] === undefined) {
6 | // compiledTemplate = ejs.compile(template);
7 | // templates[url] = compiledTemplate;
8 | // }
9 | // else {
10 | // compiledTemplate = templates[url];
11 | // }
12 | // return compiledTemplate(toJsonObject(model));
13 | // }
14 | //
15 | // // Create a real JSON object from the model Map
16 | // function toJsonObject(model) {
17 | // var o = {};
18 | // for (var k in model) {
19 | // // Convert Iterable like List to real JSON array
20 | // if (model[k] instanceof Java.type("java.lang.Iterable")) {
21 | // o[k] = Java.from(model[k]);
22 | // }
23 | // else {
24 | // o[k] = model[k];
25 | // }
26 | // }
27 | // return o;
28 | // }
29 |
30 | function render(template, model) {
31 |
32 | // Create a real Javascript Object from the model Map
33 | var data = {};
34 | for (var k in model) {
35 | // Convert Java Iterable and List to real Javascript arrays
36 | if (model[k] instanceof Java.type("java.lang.Iterable")) {
37 | data[k] = Java.from(model[k]);
38 | } else {
39 | data[k] = model[k];
40 | }
41 | }
42 | return new EJS({text: template}).render(data);
43 | }
--------------------------------------------------------------------------------
/src/main/resources/public/assets/site.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | $("#Products").on("change", function () {
3 | $list = $("#PermissionProfilesFiltered");
4 | $.ajax({
5 | url: "/a008/getPermissionProfiles",
6 | type: "GET",
7 | data: { productId: $("#Products").val() },
8 | traditional: true,
9 | dataType: "json",
10 | success: function (result) {
11 | console.log(result)
12 | $list.empty();
13 | $.each(result, function (i, item) {
14 | console.log(item)
15 | $list.append('');
16 | });
17 | },
18 | error: function () {
19 | console.warn("Issues with calling the getPermissionProfiles endpoint. Please, check the solution.");
20 | }
21 | });
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/src/main/resources/templates/candy-bonbon.ftl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | World Wide Corp
8 | Order Processing Division
9 | Ordered by ${args.signerName}
10 | Agreed: **signature_1**
20 |
21 | "
--------------------------------------------------------------------------------
/src/main/resources/templates/candy-bonbon2.ftl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | World Wide Corp
8 | Order Processing Division
9 | Ordered by ${args.signerName}
10 | Agreed: **signature_1**
21 |
22 | "
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/templates/views/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2 | <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
3 | Problem: an error occurred
15 |
16 | 3. ${example.getExampleName()}
5 | 3a. ${example.getExampleName()}
5 |
26 | Thank you.
27 | 4. ${example.getExampleName()}
5 | 4a. ${example.getExampleName()}
5 |
26 | Thank you.
27 | 5. ${example.getExampleName()}
6 | 6. ${example.getExampleName()}
8 | 7. ${example.getExampleName()}
8 | 9. ${example.getExampleName()}
10 | 10. ${example.getExampleName()}
8 | 11. ${example.getExampleName()}
8 | ${example.getExampleName()}
8 | ${example.getExampleName()}
10 | ${example.getExampleName()}
5 | ${example.getExampleName()}
10 | ${example.getExampleName()}
9 |
20 |
5 |
6 | Control + C
, then run
9 | mvn package
followed by
10 | java -Dspring.profiles.active=dev -jar target/code-examples-java-1.0-SNAPSHOT.war
11 | again or rerun it using the Run button
in IntelliJ Ultimate or Eclipse.
12 | Returned data from Docusign!
5 | ${example.getExampleName()}
5 | ${example.getExampleName()}
9 | ${example.getExampleName()}
9 | ${example.getExampleName()}
9 | ${example.getExampleName()}
5 | ${example.getExampleName()}
10 | ${example.getExampleName()}
9 | ${example.getExampleName()}
9 | ${example.getExampleName()}
9 | ${example.getExampleName()}
9 | ${example.getExampleName()}
8 | ${example.getExampleName()}
9 | ${example.getExampleName()}
8 | ${example.getExampleName()}
8 | ${example.getExampleName()}
9 | ${example.getExampleName()}
5 | ${example.getExampleName()}
8 | ${done.name}
5 | ${formattedJson}
17 |
22 | ${done.json}
${done.message}
6 | 7 |Property name | 13 |Old value | 14 |New value | 15 |
---|---|---|
${item.name} | 19 |${item.leftValue} | 20 |${item.rightValue} | 21 |
${launcherTexts.getContinueButton()}
27 | 28 |${done.message}
6 | 7 | 8 |
4 |
${example.getExampleDescription()}
6 |Documentation about this example.
8 |13 | ${viewSourceFile} 14 |
15 | 16 | 20 | 21 |${example.getExampleDescription()}
10 |12 | ${viewSourceFile} 13 |
14 | 15 |16 | ${example.getForms().get(formNumber).getFormName()} 17 |
18 | 19 | 48 | 49 |${example.getExampleDescription()}
10 |Documentation about this example.
12 |17 | ${viewSourceFile} 18 |
19 | 20 | 46 | 47 |${example.getExampleDescription()}
9 | 10 |11 | ${viewSourceFile} 12 |
13 |${example.getExampleDescription()}
11 |12 | ${viewSourceFile} 13 |
14 |19 | ${example.getRedirectsToOtherCodeExamples().get(redirectNumber).getRedirectText().replaceFirst("\\{0}", redirectToFirstCodeExample)} 20 |
21 |${example.getExampleDescription()}
10 |11 | ${viewSourceFile} 12 |
13 |${example.getExampleDescription()}
9 |10 | ${viewSourceFile} 11 |
12 |${example.getExampleDescription()}
8 |9 | API methods used: 10 | 11 | Templates::list 12 | , and 13 | 14 | Templates::create 15 | . 16 |
17 |18 | ${viewSourceFile} 19 |
20 | 24 |${page.getResultsPageText().replaceFirst("\\{0}", "src/main/resources")}
29 |38 | locals: 39 | ${locals} 40 |41 |