Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marp 8 adobe sign connector finishing #2

Merged
merged 24 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4791b78
Get test OAuth authentication working, create URL with dynamic base, …
stefanmasek Sep 7, 2023
cf4342d
Improve getting base url from request
stefanmasek Sep 11, 2023
148dd39
OAuth token storing to Variable, dialog for auth setup
stefanmasek Sep 11, 2023
74691f9
use integration key if set, else use oauth
stefanmasek Sep 12, 2023
b48f953
Admin Setup dialog for global variables
stefanmasek Sep 12, 2023
dee0e27
request token retrieving and setup in Admin page
stefanmasek Sep 13, 2023
90d2795
add redirect uri to admin setup page, create setup documentation
stefanmasek Sep 14, 2023
3405ad6
fix doc images
stefanmasek Sep 14, 2023
edec674
fix integration key doc images
stefanmasek Sep 14, 2023
1b434bf
fix integration key doc images
stefanmasek Sep 14, 2023
b2a70e6
fix issue with storing refreshed tokens, improve admin page and docum…
stefanmasek Sep 15, 2023
1ba7d30
Variables, projects configuration
stefanmasek Sep 15, 2023
ee2d720
Demo documentation
stefanmasek Sep 15, 2023
b0d3a39
create test project
stefanmasek Sep 15, 2023
6e59fdf
service mocks and test base
stefanmasek Sep 18, 2023
5293d9c
remove commented code, fill repo readme
stefanmasek Sep 19, 2023
25c17e7
fix readme
stefanmasek Sep 19, 2023
d8c22a9
enhance demo, fix return url for multiple signers, update demo doc an…
stefanmasek Sep 20, 2023
dfd8474
fix modules pom
stefanmasek Sep 20, 2023
2e883fe
set build plugin version on demo project
stefanmasek Sep 20, 2023
b84dd1a
Fix test sample pdf file
stefanmasek Sep 20, 2023
91d37ce
fix documentation, remove commented code and logs used for development
stefanmasek Sep 21, 2023
56046f9
fix warnings
stefanmasek Sep 22, 2023
3baa634
removed unused code, fix restriction warnings
stefanmasek Sep 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions MY-PRODUCT-NAME-product/README.md

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MY-PRODUCT-NAME
# Adobe Sign Connector

[![CI Build](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml)
[![CI Build](https://github.com/axonivy-market/adobesign-connector/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/adobesign-connector/actions/workflows/ci.yml)

"YOUR SHORT DESCRIPTION GOES HERE"
The Adobe Sign Connector simplifies the authentication process and enables easy integration and use of Adobe Sign services for electronical signing of documents.

Read our [documentation](MY-PRODUCT-NAME-product/README.md).
Read our [documentation](adobe-esign-connector-product/README.md).
26 changes: 26 additions & 0 deletions adobe-esign-connector-demo/cms/cms_en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Dialogs:
com:
axonivy:
connector:
adobe:
esign:
connector:
demo:
Demo:
AdobeSignDemosA: Adobe Sign Demos. Upload PDF file, enter one or multiple signers, create an agreement and sign the document as selected signer
Agreement: Agreement
AgreementID: Agreement ID
AgreementID1: Agreement ID
CreateAgreement: Create Agreement for 1 signer
CreateAgreement1: Create Agreement for 2 signers
Documents: Documents
LoadExisting: Load existing Agreement
LoadExistingToo: Enter Agreement ID and load existing Agreement in case it's already created on Adobe side
PDFFile: PDF file
PDFFileToSign: PDF File to sign
SignAsSigner1: Sign as Signer 1
SignAsSigner2: Sign as Signer 2
Signer1Email: Signer 1 email
Signer2Email: Signer 2 email
Signers: Signers
Signing: Signing
14 changes: 10 additions & 4 deletions adobe-esign-connector-demo/config/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
# '<project>/Config/_<environment>/variables.yaml
#
Variables:
# myVariable: value
adobe-sign-connector:
host: api.eu2.echosign.com
integrationKey:
returnPage: http://localhost:8081/designer/page/adobe-esign-connector$1/signatureReturn.jsp
host: api.eu2.adobesign.com
returnPage: /designer/page/adobe-esign-connector$1/signatureReturn.jsp
baseUri: https://api.eu2.adobesign.com/oauth/v2
authenticationUri: https://secure.eu2.adobesign.com/public/oauth/v2
clientId: ''
clientSecret: ''
permissions: user_read:account user_write:account user_login:account agreement_read:account agreement_write:account agreement_send:account widget_read:account widget_write:account library_read:account library_write:account workflow_read:account workflow_write:account
oauthToken: default-value
accessToken: default-value
integrationKey: ''
7 changes: 5 additions & 2 deletions adobe-esign-connector-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.adobe.esign</groupId>
<artifactId>adobe-esign-connector-demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>10.0.11-SNAPSHOT</version>
ntqdinh-axonivy marked this conversation as resolved.
Show resolved Hide resolved
<packaging>iar</packaging>
<properties>
<build.plugin.version>10.0.6</build.plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>com.axonivy.connector.adobe.esign</groupId>
Expand All @@ -19,7 +22,7 @@
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>10.0.3</version>
<version>${build.plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,88 +1,189 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:ic="http://ivyteam.ch/jsf/component" xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:ic="http://ivyteam.ch/jsf/component"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:body>
<ui:composition template="/layouts/basic-10.xhtml">

<ui:define name="title">Demo</ui:define>
<ui:define name="content">
<ui:composition template="/layouts/basic-10.xhtml">

<script type="text/javascript">
function closeSigningDlg() {
PF('dlgIframe').hide();
updateDocument();
}
</script>
<h3>
Adobe Sign Demos. Please enter a recipient and click one of the buttons to start a demo!
</h3>
<ui:define name="title">Demo</ui:define>
<ui:define name="content">

<h:form id="form" enctype="multipart/form-data">
<p:remoteCommand name="updateDocument" actionListener="#{logic.updateDocuments}" update="@form" />
<p:messages />
<p:panelGrid columns="2" layout="grid" styleClass="ui-panelgrid-blank ui-fluid"
columnClasses="ui-g-12 ui-md-3 ui-lg-2, ui-g-12 ui-md-9 ui-lg-4, ui-g-12 ui-md-3 ui-lg-2, ui-g-12 ui-md-9 ui-lg-4">
<script type="text/javascript">
function closeSigningDlg() {
PF('dlgIframe').hide();
updateDocument();
}
</script>
<h3>
#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/AdobeSignDemosA')}
</h3>

<h:outputText value="Select a file to upload and sign" />
<p:fileUpload value="#{data.file}" mode="simple" id="fileUpload" skinSimple="true" />

<p:outputLabel for="@next" value="Signer 1" />
<p:inputText value="#{data.signer1}" />

<p:outputLabel for="@next" value="Signer 2" />
<p:inputText value="#{data.signer2}" />

<p:outputLabel for="@next" value="Agreement ID" />
<p:inputText id="agreementId" value="#{data.agreementId}" />
<h:form id="form" enctype="multipart/form-data">
<p:remoteCommand name="updateDocument"
actionListener="#{logic.updateDocuments}" update="@form" />
<p:messages />
<p:fieldset
legend="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/PDFFile')}">
<div class="ui-fluid ">
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:outputLabel
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/PDFFileToSign')}" />
</div>
<div class="p-col-12 p-md-6">
<p:fileUpload value="#{data.file}" mode="simple" id="fileUpload"
skinSimple="true" >
</p:fileUpload>
</div>
</div>
</div>
</p:fieldset>

<p:commandButton value="Create Agreement 1" actionListener="#{logic.demo1Signer}" update="@form" process="@form" />
<p:outputLabel value="creates a new agreement for 1 signer " />

<p:commandButton value="Create Agreement 2" actionListener="#{logic.demo2Signer}" update="@form" process="@form" />
<p:outputLabel value="creates a new agreement for 2 signers " />

<p:commandButton value="Load existing Agreement" actionListener="#{logic.updateDocuments}" update="@form" process="@form" />
<p:outputLabel value="loads the data for an existing agreement" />
<p:fieldset id="signersFieldset"
legend="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Signers')}">
<div class="ui-fluid ">
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:outputLabel for="@next"
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Signer1Email')}" />
</div>
<div class="p-col-12 p-md-6">
<p:inputText value="#{data.signer1}">
<p:ajax update="agreementFieldset" />
</p:inputText>
</div>
</div>

<p:commandButton value="Sign as Signer 1" actionListener="#{logic.sign1}"
process="@form"
update="@form #{p:resolveFirstComponentWithId('dlgIframe', view).clientId}"
oncomplete="PF('dlgIframe').show()"/>
<p:outputLabel value="Sign Embedded" />

<p:commandButton value="Sign as Signer 2" actionListener="#{logic.sign2}"
process="@form"
update="@form #{p:resolveFirstComponentWithId('dlgIframe', view).clientId}"
oncomplete="PF('dlgIframe').show()"/>
<p:outputLabel value="Sign Embedded" />

<p:commandButton value="Update documents" actionListener="#{logic.updateDocuments}" update="@form" process="@form" />
<p:outputLabel value="Updates list of documents" />
<p:outputLabel value="list of documents" rendered="#{data.documents.getDocuments().size() gt 0}" />
<p:dataTable id="documentTable" value="#{data.documents.getDocuments()}" rendered="#{data.documents.getDocuments().size() gt 0}" var="d">
<p:column id="doc">
<p:commandLink id="docLink" value="#{d.name}" actionListener="#{logic.downloadDocument(d.id, d.name)}" ajax="false" >
<p:fileDownload value="#{data.documentContent}" />
</p:commandLink>
</p:column>
</p:dataTable>
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:outputLabel for="@next"
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Signer2Email')}" />
</div>
<div class="p-col-12 p-md-6">
<p:inputText value="#{data.signer2}">
<p:ajax update="agreementFieldset" />
</p:inputText>
</div>
</div>
</div>
</p:fieldset>

</p:panelGrid>
<br />
<div class="command-btns">
<p:commandLink id="close" actionListener="#{ivyWorkflowView.cancel()}" value="Close" />
</div>
</h:form>
<p:fieldset id="agreementFieldset"
legend="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Agreement')}">
<div class="ui-fluid ">
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:commandButton
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/CreateAgreement')}"
actionListener="#{logic.demo1Signer}" update="@form"
process="@form" disabled="#{empty data.signer1}" />
</div>
<div class="p-col-12 p-md-6">
<p:commandButton
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/CreateAgreement1')}"
actionListener="#{logic.demo2Signer}" update="@form"
process="@form"
disabled="#{empty data.signer1 or empty data.signer2}" />
</div>
</div>
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:outputLabel for="@next"
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/AgreementID1')}" />
</div>
<div class="p-col-12 p-md-6">
<p:inputText id="agreementId" value="#{data.agreementId}"
placeholder="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/AgreementID')}">
<p:ajax update="signingFieldset" />
</p:inputText>
</div>
</div>

<p:dialog id="dlgIframe" widgetVar="dlgIframe" modal="true" header="Please sign the document" width="80%" height="400" draggable="true" maximizable="true">
<iframe id="signIframe" name="signIframe" src="#{data.signingURI}" style="border-width: 0PX;" width="100%" height="100%">
<p>Your browser does not support iframes.</p>
</iframe>
</p:dialog>
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6"></div>
<div class="p-col-12 p-md-6">
<p:commandButton id="loadExistingAgreementButton" value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/LoadExisting')}"
actionListener="#{logic.updateDocuments}" update="@form"
process="@form" />
<p:tooltip value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/LoadExistingToo')}" for="loadExistingAgreementButton"/>
</div>
</div>

</ui:define>
</ui:composition>
</div>
</p:fieldset>

<p:fieldset id="signingFieldset"
legend="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Signing')}">
<div class="ui-fluid ">
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:commandButton
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/SignAsSigner1')}"
actionListener="#{logic.sign1}" process="@form"
disabled="#{empty data.agreementId}"
update="@form #{p:resolveFirstComponentWithId('dlgIframe', view).clientId}"
oncomplete="PF('dlgIframe').show()" />
</div>
<div class="p-col-12 p-md-6">
<p:commandButton
value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/SignAsSigner2')}"
actionListener="#{logic.sign2}" process="@form"
disabled="#{empty data.agreementId or empty data.signer2}"
update="@form #{p:resolveFirstComponentWithId('dlgIframe', view).clientId}"
oncomplete="PF('dlgIframe').show()" />
</div>
</div>
</div>
</p:fieldset>

<p:fieldset
legend="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Documents')}">


<div class="ui-fluid ">
<div class="p-field p-grid p-align-baseline">
<div class="p-col-12 p-md-6">
<p:dataTable id="documentTable"
value="#{data.documents.getDocuments()}"
rendered="#{data.documents.getDocuments().size() gt 0}" var="d">
<p:column id="doc">
<p:commandLink id="docLink" value="#{d.name}"
actionListener="#{logic.downloadDocument(d.id, d.name)}"
ajax="false">
<p:fileDownload value="#{data.documentContent}" />
</p:commandLink>
</p:column>
</p:dataTable>
</div>
<div class="p-col-12 p-md-6">
<p:commandButton value="Update documents"
actionListener="#{logic.updateDocuments}" update="@form"
process="@form" />
</div>
</div>
</div>
</p:fieldset>
<br />
<div class="command-btns">
<p:commandLink id="close"
actionListener="#{ivyWorkflowView.cancel()}" value="Close" />
</div>
</h:form>

<p:dialog id="dlgIframe" widgetVar="dlgIframe" modal="true"
header="Please sign the document" width="80%" height="400"
draggable="true" maximizable="true">
<iframe id="signIframe" name="signIframe" src="#{data.signingURI}"
style="border-width: 0PX;" width="100%" height="100%">
<p>Your browser does not support iframes.</p>
</iframe>
</p:dialog>

</ui:define>
</ui:composition>
</h:body>

</html>
1 change: 1 addition & 0 deletions adobe-esign-connector-product/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openapi.*
Loading