From 51a27ee48e16b78a58f83941112a103f5136bb4c Mon Sep 17 00:00:00 2001
From: ivy-fhe <146715063+ivy-fhe@users.noreply.github.com>
Date: Wed, 4 Oct 2023 11:35:25 +0200
Subject: [PATCH 01/75] Update pom.xml
Specified product name
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 517336b..d5910f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,8 +1,8 @@
4.0.0
com.axonivy.market
- my-product
- my-product-modules
+ threema-connector
+ threema-connector-modules
10.0.0-SNAPSHOT
pom
From cd52aa3d276d41138ce28afb6a403bb6376e5a00 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 11:53:27 +0200
Subject: [PATCH 02/75] initial project creation for threema-connector
---
.project | 17 ++++++
.settings/org.eclipse.m2e.core.prefs | 4 ++
threema-connector-demo/.classpath | 28 +++++++++
threema-connector-demo/.gitignore | 19 +++++++
threema-connector-demo/.project | 49 ++++++++++++++++
threema-connector-demo/.settings/.jsdtscope | 12 ++++
.../.settings/ch.ivyteam.ivy.designer.prefs | 5 ++
.../.settings/org.eclipse.jdt.core.prefs | 10 ++++
.../org.eclipse.wst.common.component | 10 ++++
...se.wst.common.project.facet.core.prefs.xml | 7 +++
....eclipse.wst.common.project.facet.core.xml | 8 +++
.../.settings/org.eclipse.wst.css.core.prefs | 2 +
...rg.eclipse.wst.jsdt.ui.superType.container | 1 +
.../org.eclipse.wst.jsdt.ui.superType.name | 1 +
.../config/custom-fields.yaml | 22 +++++++
threema-connector-demo/config/databases.yaml | 2 +
threema-connector-demo/config/overrides.any | 1 +
threema-connector-demo/config/persistence.xml | 2 +
.../config/rest-clients.yaml | 2 +
threema-connector-demo/config/roles.xml | 4 ++
threema-connector-demo/config/users.xml | 2 +
threema-connector-demo/config/variables.yaml | 6 ++
.../config/webservice-clients.yaml | 2 +
.../threema/connector/demo/Data.ivyClass | 2 +
threema-connector-demo/pom.xml | 27 +++++++++
threema-connector-test/.classpath | 35 ++++++++++++
threema-connector-test/.gitignore | 19 +++++++
threema-connector-test/.project | 49 ++++++++++++++++
threema-connector-test/.settings/.jsdtscope | 12 ++++
.../.settings/ch.ivyteam.ivy.designer.prefs | 5 ++
.../.settings/org.eclipse.jdt.core.prefs | 10 ++++
.../org.eclipse.wst.common.component | 10 ++++
...se.wst.common.project.facet.core.prefs.xml | 7 +++
....eclipse.wst.common.project.facet.core.xml | 8 +++
.../.settings/org.eclipse.wst.css.core.prefs | 2 +
...rg.eclipse.wst.jsdt.ui.superType.container | 1 +
.../org.eclipse.wst.jsdt.ui.superType.name | 1 +
.../config/custom-fields.yaml | 22 +++++++
threema-connector-test/config/databases.yaml | 2 +
threema-connector-test/config/overrides.any | 1 +
threema-connector-test/config/persistence.xml | 2 +
.../config/rest-clients.yaml | 2 +
threema-connector-test/config/roles.xml | 4 ++
threema-connector-test/config/users.xml | 2 +
threema-connector-test/config/variables.yaml | 6 ++
.../config/webservice-clients.yaml | 2 +
.../threema/connector/test/Data.ivyClass | 2 +
threema-connector-test/pom.xml | 45 +++++++++++++++
.../threema/connector/test/SampleIvyTest.java | 33 +++++++++++
.../connector/test/SampleProcessTest.java | 57 +++++++++++++++++++
threema-connector/.classpath | 28 +++++++++
threema-connector/.gitignore | 19 +++++++
threema-connector/.project | 49 ++++++++++++++++
threema-connector/.settings/.jsdtscope | 12 ++++
.../.settings/ch.ivyteam.ivy.designer.prefs | 5 ++
.../.settings/org.eclipse.jdt.core.prefs | 10 ++++
.../org.eclipse.wst.common.component | 10 ++++
...se.wst.common.project.facet.core.prefs.xml | 7 +++
....eclipse.wst.common.project.facet.core.xml | 8 +++
.../.settings/org.eclipse.wst.css.core.prefs | 2 +
...rg.eclipse.wst.jsdt.ui.superType.container | 1 +
.../org.eclipse.wst.jsdt.ui.superType.name | 1 +
threema-connector/config/custom-fields.yaml | 22 +++++++
threema-connector/config/databases.yaml | 2 +
threema-connector/config/overrides.any | 1 +
threema-connector/config/persistence.xml | 2 +
threema-connector/config/rest-clients.yaml | 2 +
threema-connector/config/roles.xml | 4 ++
threema-connector/config/users.xml | 2 +
.../config/webservice-clients.yaml | 2 +
.../threema/connector/Data.ivyClass | 2 +
threema-connector/pom.xml | 19 +++++++
72 files changed, 794 insertions(+)
create mode 100644 .project
create mode 100644 .settings/org.eclipse.m2e.core.prefs
create mode 100644 threema-connector-demo/.classpath
create mode 100644 threema-connector-demo/.gitignore
create mode 100644 threema-connector-demo/.project
create mode 100644 threema-connector-demo/.settings/.jsdtscope
create mode 100644 threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
create mode 100644 threema-connector-demo/.settings/org.eclipse.jdt.core.prefs
create mode 100644 threema-connector-demo/.settings/org.eclipse.wst.common.component
create mode 100644 threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
create mode 100644 threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml
create mode 100644 threema-connector-demo/.settings/org.eclipse.wst.css.core.prefs
create mode 100644 threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container
create mode 100644 threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name
create mode 100644 threema-connector-demo/config/custom-fields.yaml
create mode 100644 threema-connector-demo/config/databases.yaml
create mode 100644 threema-connector-demo/config/overrides.any
create mode 100644 threema-connector-demo/config/persistence.xml
create mode 100644 threema-connector-demo/config/rest-clients.yaml
create mode 100644 threema-connector-demo/config/roles.xml
create mode 100644 threema-connector-demo/config/users.xml
create mode 100644 threema-connector-demo/config/variables.yaml
create mode 100644 threema-connector-demo/config/webservice-clients.yaml
create mode 100644 threema-connector-demo/dataclasses/threema/connector/demo/Data.ivyClass
create mode 100644 threema-connector-demo/pom.xml
create mode 100644 threema-connector-test/.classpath
create mode 100644 threema-connector-test/.gitignore
create mode 100644 threema-connector-test/.project
create mode 100644 threema-connector-test/.settings/.jsdtscope
create mode 100644 threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
create mode 100644 threema-connector-test/.settings/org.eclipse.jdt.core.prefs
create mode 100644 threema-connector-test/.settings/org.eclipse.wst.common.component
create mode 100644 threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
create mode 100644 threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml
create mode 100644 threema-connector-test/.settings/org.eclipse.wst.css.core.prefs
create mode 100644 threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container
create mode 100644 threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name
create mode 100644 threema-connector-test/config/custom-fields.yaml
create mode 100644 threema-connector-test/config/databases.yaml
create mode 100644 threema-connector-test/config/overrides.any
create mode 100644 threema-connector-test/config/persistence.xml
create mode 100644 threema-connector-test/config/rest-clients.yaml
create mode 100644 threema-connector-test/config/roles.xml
create mode 100644 threema-connector-test/config/users.xml
create mode 100644 threema-connector-test/config/variables.yaml
create mode 100644 threema-connector-test/config/webservice-clients.yaml
create mode 100644 threema-connector-test/dataclasses/threema/connector/test/Data.ivyClass
create mode 100644 threema-connector-test/pom.xml
create mode 100644 threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java
create mode 100644 threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java
create mode 100644 threema-connector/.classpath
create mode 100644 threema-connector/.gitignore
create mode 100644 threema-connector/.project
create mode 100644 threema-connector/.settings/.jsdtscope
create mode 100644 threema-connector/.settings/ch.ivyteam.ivy.designer.prefs
create mode 100644 threema-connector/.settings/org.eclipse.jdt.core.prefs
create mode 100644 threema-connector/.settings/org.eclipse.wst.common.component
create mode 100644 threema-connector/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
create mode 100644 threema-connector/.settings/org.eclipse.wst.common.project.facet.core.xml
create mode 100644 threema-connector/.settings/org.eclipse.wst.css.core.prefs
create mode 100644 threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container
create mode 100644 threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name
create mode 100644 threema-connector/config/custom-fields.yaml
create mode 100644 threema-connector/config/databases.yaml
create mode 100644 threema-connector/config/overrides.any
create mode 100644 threema-connector/config/persistence.xml
create mode 100644 threema-connector/config/rest-clients.yaml
create mode 100644 threema-connector/config/roles.xml
create mode 100644 threema-connector/config/users.xml
create mode 100644 threema-connector/config/webservice-clients.yaml
create mode 100644 threema-connector/dataclasses/threema/connector/Data.ivyClass
create mode 100644 threema-connector/pom.xml
diff --git a/.project b/.project
new file mode 100644
index 0000000..d90b7fe
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ threema-connector-modules
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/threema-connector-demo/.classpath b/threema-connector-demo/.classpath
new file mode 100644
index 0000000..aff6211
--- /dev/null
+++ b/threema-connector-demo/.classpath
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector-demo/.gitignore b/threema-connector-demo/.gitignore
new file mode 100644
index 0000000..1b2547b
--- /dev/null
+++ b/threema-connector-demo/.gitignore
@@ -0,0 +1,19 @@
+# general
+Thumbs.db
+.DS_Store
+*~
+*.log
+
+# java
+*.class
+hs_err_pid*
+
+# maven
+target/
+lib/mvn-deps/
+
+# ivy
+classes/
+src_dataClasses/
+src_wsproc/
+logs/
diff --git a/threema-connector-demo/.project b/threema-connector-demo/.project
new file mode 100644
index 0000000..a8e34fb
--- /dev/null
+++ b/threema-connector-demo/.project
@@ -0,0 +1,49 @@
+
+
+ threema-connector-demo
+
+
+
+
+
+ ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder
+
+
+
+
+ ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ ch.ivyteam.ivy.project.IvyProjectNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.jem.beaninfo.BeanInfoNature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/threema-connector-demo/.settings/.jsdtscope b/threema-connector-demo/.settings/.jsdtscope
new file mode 100644
index 0000000..869c01d
--- /dev/null
+++ b/threema-connector-demo/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs b/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
new file mode 100644
index 0000000..48ebc41
--- /dev/null
+++ b/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
@@ -0,0 +1,5 @@
+ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=threema.connector.demo.Data
+ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=threema.connector.demo
+ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
+eclipse.preferences.version=1
diff --git a/threema-connector-demo/.settings/org.eclipse.jdt.core.prefs b/threema-connector-demo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d4540a5
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,10 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/threema-connector-demo/.settings/org.eclipse.wst.common.component b/threema-connector-demo/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..7e0f2c9
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
new file mode 100644
index 0000000..9b4b9fc
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml b/threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..156ecdb
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/threema-connector-demo/.settings/org.eclipse.wst.css.core.prefs b/threema-connector-demo/.settings/org.eclipse.wst.css.core.prefs
new file mode 100644
index 0000000..5ddc6bd
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.wst.css.core.prefs
@@ -0,0 +1,2 @@
+css-profile/=org.eclipse.wst.css.core.cssprofile.css3
+eclipse.preferences.version=1
diff --git a/threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container b/threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name b/threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/threema-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/threema-connector-demo/config/custom-fields.yaml b/threema-connector-demo/config/custom-fields.yaml
new file mode 100644
index 0000000..bb20b70
--- /dev/null
+++ b/threema-connector-demo/config/custom-fields.yaml
@@ -0,0 +1,22 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/custom-fields.json
+#
+# == Custom Fields Information ==
+#
+# You can define here your project custom fields.
+# Have a look at our documentation for more information.
+#
+CustomFields:
+# Tasks:
+# MyTaskCustomField:
+# Label: My task custom field
+# Description: This new task custom field can be used to ...
+# Type: STRING
+# Cases:
+# MyCaseCustomField:
+# Label: My case custom field
+# Description: This new case custom field can be used to ...
+# Type: STRING
+# Starts:
+# MyStartCustomField:
+# Label: My start custom field
+# Description: This new start custom field can be used to ...
diff --git a/threema-connector-demo/config/databases.yaml b/threema-connector-demo/config/databases.yaml
new file mode 100644
index 0000000..10319e2
--- /dev/null
+++ b/threema-connector-demo/config/databases.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/databases.json
+Databases:
diff --git a/threema-connector-demo/config/overrides.any b/threema-connector-demo/config/overrides.any
new file mode 100644
index 0000000..f59ec20
--- /dev/null
+++ b/threema-connector-demo/config/overrides.any
@@ -0,0 +1 @@
+*
\ No newline at end of file
diff --git a/threema-connector-demo/config/persistence.xml b/threema-connector-demo/config/persistence.xml
new file mode 100644
index 0000000..d6b96d7
--- /dev/null
+++ b/threema-connector-demo/config/persistence.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/threema-connector-demo/config/rest-clients.yaml b/threema-connector-demo/config/rest-clients.yaml
new file mode 100644
index 0000000..4bffaca
--- /dev/null
+++ b/threema-connector-demo/config/rest-clients.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json
+RestClients:
diff --git a/threema-connector-demo/config/roles.xml b/threema-connector-demo/config/roles.xml
new file mode 100644
index 0000000..59892fe
--- /dev/null
+++ b/threema-connector-demo/config/roles.xml
@@ -0,0 +1,4 @@
+
+
+ Everybody
+
diff --git a/threema-connector-demo/config/users.xml b/threema-connector-demo/config/users.xml
new file mode 100644
index 0000000..51a6906
--- /dev/null
+++ b/threema-connector-demo/config/users.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/threema-connector-demo/config/variables.yaml b/threema-connector-demo/config/variables.yaml
new file mode 100644
index 0000000..fd14458
--- /dev/null
+++ b/threema-connector-demo/config/variables.yaml
@@ -0,0 +1,6 @@
+# == Variables ==
+#
+# You can define here your project Variables.
+#
+Variables:
+# myVariable: value
diff --git a/threema-connector-demo/config/webservice-clients.yaml b/threema-connector-demo/config/webservice-clients.yaml
new file mode 100644
index 0000000..688047a
--- /dev/null
+++ b/threema-connector-demo/config/webservice-clients.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/webservice-clients.json
+WebServiceClients:
diff --git a/threema-connector-demo/dataclasses/threema/connector/demo/Data.ivyClass b/threema-connector-demo/dataclasses/threema/connector/demo/Data.ivyClass
new file mode 100644
index 0000000..69ce4a5
--- /dev/null
+++ b/threema-connector-demo/dataclasses/threema/connector/demo/Data.ivyClass
@@ -0,0 +1,2 @@
+Data #class
+threema.connector.demo #namespace
diff --git a/threema-connector-demo/pom.xml b/threema-connector-demo/pom.xml
new file mode 100644
index 0000000..8c0fb13
--- /dev/null
+++ b/threema-connector-demo/pom.xml
@@ -0,0 +1,27 @@
+
+
+ 4.0.0
+ threema.connector.demo
+ threema-connector-demo
+ 10.0.0-SNAPSHOT
+ iar
+
+
+ threema.connector
+ threema-connector
+ ${project.version}
+ iar
+
+
+
+
+
+ com.axonivy.ivy.ci
+ project-build-plugin
+ 11.1.0
+ true
+
+
+
+
diff --git a/threema-connector-test/.classpath b/threema-connector-test/.classpath
new file mode 100644
index 0000000..106dc80
--- /dev/null
+++ b/threema-connector-test/.classpath
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector-test/.gitignore b/threema-connector-test/.gitignore
new file mode 100644
index 0000000..1b2547b
--- /dev/null
+++ b/threema-connector-test/.gitignore
@@ -0,0 +1,19 @@
+# general
+Thumbs.db
+.DS_Store
+*~
+*.log
+
+# java
+*.class
+hs_err_pid*
+
+# maven
+target/
+lib/mvn-deps/
+
+# ivy
+classes/
+src_dataClasses/
+src_wsproc/
+logs/
diff --git a/threema-connector-test/.project b/threema-connector-test/.project
new file mode 100644
index 0000000..2ecc6d6
--- /dev/null
+++ b/threema-connector-test/.project
@@ -0,0 +1,49 @@
+
+
+ threema-connector-test
+
+
+
+
+
+ ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder
+
+
+
+
+ ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ ch.ivyteam.ivy.project.IvyProjectNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.jem.beaninfo.BeanInfoNature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/threema-connector-test/.settings/.jsdtscope b/threema-connector-test/.settings/.jsdtscope
new file mode 100644
index 0000000..869c01d
--- /dev/null
+++ b/threema-connector-test/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs b/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
new file mode 100644
index 0000000..b21c360
--- /dev/null
+++ b/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
@@ -0,0 +1,5 @@
+ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=threema.connector.test.Data
+ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=threema.connector.test
+ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
+eclipse.preferences.version=1
diff --git a/threema-connector-test/.settings/org.eclipse.jdt.core.prefs b/threema-connector-test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d4540a5
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,10 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/threema-connector-test/.settings/org.eclipse.wst.common.component b/threema-connector-test/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..41c9806
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
new file mode 100644
index 0000000..9b4b9fc
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml b/threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..156ecdb
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/threema-connector-test/.settings/org.eclipse.wst.css.core.prefs b/threema-connector-test/.settings/org.eclipse.wst.css.core.prefs
new file mode 100644
index 0000000..5ddc6bd
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.wst.css.core.prefs
@@ -0,0 +1,2 @@
+css-profile/=org.eclipse.wst.css.core.cssprofile.css3
+eclipse.preferences.version=1
diff --git a/threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container b/threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name b/threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/threema-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/threema-connector-test/config/custom-fields.yaml b/threema-connector-test/config/custom-fields.yaml
new file mode 100644
index 0000000..bb20b70
--- /dev/null
+++ b/threema-connector-test/config/custom-fields.yaml
@@ -0,0 +1,22 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/custom-fields.json
+#
+# == Custom Fields Information ==
+#
+# You can define here your project custom fields.
+# Have a look at our documentation for more information.
+#
+CustomFields:
+# Tasks:
+# MyTaskCustomField:
+# Label: My task custom field
+# Description: This new task custom field can be used to ...
+# Type: STRING
+# Cases:
+# MyCaseCustomField:
+# Label: My case custom field
+# Description: This new case custom field can be used to ...
+# Type: STRING
+# Starts:
+# MyStartCustomField:
+# Label: My start custom field
+# Description: This new start custom field can be used to ...
diff --git a/threema-connector-test/config/databases.yaml b/threema-connector-test/config/databases.yaml
new file mode 100644
index 0000000..10319e2
--- /dev/null
+++ b/threema-connector-test/config/databases.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/databases.json
+Databases:
diff --git a/threema-connector-test/config/overrides.any b/threema-connector-test/config/overrides.any
new file mode 100644
index 0000000..f59ec20
--- /dev/null
+++ b/threema-connector-test/config/overrides.any
@@ -0,0 +1 @@
+*
\ No newline at end of file
diff --git a/threema-connector-test/config/persistence.xml b/threema-connector-test/config/persistence.xml
new file mode 100644
index 0000000..d6b96d7
--- /dev/null
+++ b/threema-connector-test/config/persistence.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/threema-connector-test/config/rest-clients.yaml b/threema-connector-test/config/rest-clients.yaml
new file mode 100644
index 0000000..4bffaca
--- /dev/null
+++ b/threema-connector-test/config/rest-clients.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json
+RestClients:
diff --git a/threema-connector-test/config/roles.xml b/threema-connector-test/config/roles.xml
new file mode 100644
index 0000000..59892fe
--- /dev/null
+++ b/threema-connector-test/config/roles.xml
@@ -0,0 +1,4 @@
+
+
+ Everybody
+
diff --git a/threema-connector-test/config/users.xml b/threema-connector-test/config/users.xml
new file mode 100644
index 0000000..51a6906
--- /dev/null
+++ b/threema-connector-test/config/users.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/threema-connector-test/config/variables.yaml b/threema-connector-test/config/variables.yaml
new file mode 100644
index 0000000..fd14458
--- /dev/null
+++ b/threema-connector-test/config/variables.yaml
@@ -0,0 +1,6 @@
+# == Variables ==
+#
+# You can define here your project Variables.
+#
+Variables:
+# myVariable: value
diff --git a/threema-connector-test/config/webservice-clients.yaml b/threema-connector-test/config/webservice-clients.yaml
new file mode 100644
index 0000000..688047a
--- /dev/null
+++ b/threema-connector-test/config/webservice-clients.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/webservice-clients.json
+WebServiceClients:
diff --git a/threema-connector-test/dataclasses/threema/connector/test/Data.ivyClass b/threema-connector-test/dataclasses/threema/connector/test/Data.ivyClass
new file mode 100644
index 0000000..de785c2
--- /dev/null
+++ b/threema-connector-test/dataclasses/threema/connector/test/Data.ivyClass
@@ -0,0 +1,2 @@
+Data #class
+threema.connector.test #namespace
diff --git a/threema-connector-test/pom.xml b/threema-connector-test/pom.xml
new file mode 100644
index 0000000..11cadd2
--- /dev/null
+++ b/threema-connector-test/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+ threema.connector.test
+ threema-connector-test
+ 10.0.0-SNAPSHOT
+ iar
+
+
+ threema.connector
+ threema-connector
+ ${project.version}
+ iar
+
+
+ com.axonivy.ivy.test
+ unit-tester
+ 11.1.0
+ test
+
+
+
+ src_test
+
+
+
+ maven-deploy-plugin
+ 3.0.0-M1
+
+ true
+
+
+
+
+
+
+ com.axonivy.ivy.ci
+ project-build-plugin
+ 11.1.0
+ true
+
+
+
+
diff --git a/threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java b/threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java
new file mode 100644
index 0000000..b7debe4
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java
@@ -0,0 +1,33 @@
+package threema.connector.test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+import ch.ivyteam.ivy.environment.Ivy;
+import ch.ivyteam.ivy.environment.IvyTest;
+
+/**
+ * This sample UnitTest runs java code in an environment as it would exists when
+ * being executed in Ivy Process. Popular projects API facades, such as {@link Ivy#persistence()}
+ * are setup and ready to be used.
+ *
+ * The test can either be run
+ * in the Designer IDE ( right click > run as > JUnit Test
)
+ * or in a Maven continuous integration build pipeline ( mvn clean verify
)
+ *
+ *
+ * Detailed guidance on writing these kind of tests can be found in our
+ * Unit Testing docs
+ *
+ */
+@IvyTest
+public class SampleIvyTest{
+
+ @Test
+ public void useIvy(){
+ Ivy.log().info("hi from JUnit");
+ assertThat(true).as("I can use Ivy API facade in tests").isEqualTo(true);
+ }
+
+}
diff --git a/threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java b/threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java
new file mode 100644
index 0000000..740faf7
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java
@@ -0,0 +1,57 @@
+package threema.connector.test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
+import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
+import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
+import ch.ivyteam.ivy.scripting.objects.CompositeObject;
+import ch.ivyteam.ivy.workflow.CaseState;
+
+/**
+ * This sample ProcessTest simulates users and systems working through
+ * your process flow. Created data and tasks can be easily asserted.
+ *
+ * The test can either be run
+ * in the Designer IDE ( right click > run as > JUnit Test
)
+ * or in a Maven continuous integration build pipeline ( mvn clean verify
)
+ *
+ *
+ * Detailed guidance on writing these kind of tests can be found in our
+ * Process Testing docs
+ *
+ */
+@IvyProcessTest
+public class SampleProcessTest{
+
+ private static final BpmProcess testee = BpmProcess.path("MyProcess");
+
+ @Test
+ public void callProcess(BpmClient bpmClient){
+ BpmElement startable = testee.elementName("start.ivp");
+ ExecutionResult result = bpmClient.start().process(startable).execute();
+ CompositeObject data = result.data().last();
+ assertThat(data).isNotNull();
+ }
+
+ @Test
+ @Disabled("illustrative code: needs adaption to your environment")
+ public void workflow(BpmClient bpmClient)
+ {
+ BpmElement startable = testee.elementName("start.ivp");
+
+ // start as authenticated user
+ String myUser = "myUser";
+ ExecutionResult result = bpmClient.start().process(startable).as().user(myUser).execute();
+ assertThat(result.workflow().activeCase()).isEqualTo(CaseState.RUNNING);
+ assertThat(result.workflow().executedTask().activator().name()).isEqualTo(myUser);
+
+ // continue after task/switch
+ bpmClient.start().anyActiveTask(result).as().role("supervisor").execute();
+ }
+}
diff --git a/threema-connector/.classpath b/threema-connector/.classpath
new file mode 100644
index 0000000..aff6211
--- /dev/null
+++ b/threema-connector/.classpath
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector/.gitignore b/threema-connector/.gitignore
new file mode 100644
index 0000000..1b2547b
--- /dev/null
+++ b/threema-connector/.gitignore
@@ -0,0 +1,19 @@
+# general
+Thumbs.db
+.DS_Store
+*~
+*.log
+
+# java
+*.class
+hs_err_pid*
+
+# maven
+target/
+lib/mvn-deps/
+
+# ivy
+classes/
+src_dataClasses/
+src_wsproc/
+logs/
diff --git a/threema-connector/.project b/threema-connector/.project
new file mode 100644
index 0000000..880014f
--- /dev/null
+++ b/threema-connector/.project
@@ -0,0 +1,49 @@
+
+
+ threema-connector
+
+
+
+
+
+ ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder
+
+
+
+
+ ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ ch.ivyteam.ivy.project.IvyProjectNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.jem.beaninfo.BeanInfoNature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/threema-connector/.settings/.jsdtscope b/threema-connector/.settings/.jsdtscope
new file mode 100644
index 0000000..869c01d
--- /dev/null
+++ b/threema-connector/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs b/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs
new file mode 100644
index 0000000..da9f4af
--- /dev/null
+++ b/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs
@@ -0,0 +1,5 @@
+ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=threema.connector.Data
+ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=threema.connector
+ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
+eclipse.preferences.version=1
diff --git a/threema-connector/.settings/org.eclipse.jdt.core.prefs b/threema-connector/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d4540a5
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,10 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/threema-connector/.settings/org.eclipse.wst.common.component b/threema-connector/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..52f4a81
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/threema-connector/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/threema-connector/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
new file mode 100644
index 0000000..9b4b9fc
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/threema-connector/.settings/org.eclipse.wst.common.project.facet.core.xml b/threema-connector/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..156ecdb
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/threema-connector/.settings/org.eclipse.wst.css.core.prefs b/threema-connector/.settings/org.eclipse.wst.css.core.prefs
new file mode 100644
index 0000000..5ddc6bd
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.wst.css.core.prefs
@@ -0,0 +1,2 @@
+css-profile/=org.eclipse.wst.css.core.cssprofile.css3
+eclipse.preferences.version=1
diff --git a/threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container b/threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name b/threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/threema-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/threema-connector/config/custom-fields.yaml b/threema-connector/config/custom-fields.yaml
new file mode 100644
index 0000000..bb20b70
--- /dev/null
+++ b/threema-connector/config/custom-fields.yaml
@@ -0,0 +1,22 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/custom-fields.json
+#
+# == Custom Fields Information ==
+#
+# You can define here your project custom fields.
+# Have a look at our documentation for more information.
+#
+CustomFields:
+# Tasks:
+# MyTaskCustomField:
+# Label: My task custom field
+# Description: This new task custom field can be used to ...
+# Type: STRING
+# Cases:
+# MyCaseCustomField:
+# Label: My case custom field
+# Description: This new case custom field can be used to ...
+# Type: STRING
+# Starts:
+# MyStartCustomField:
+# Label: My start custom field
+# Description: This new start custom field can be used to ...
diff --git a/threema-connector/config/databases.yaml b/threema-connector/config/databases.yaml
new file mode 100644
index 0000000..10319e2
--- /dev/null
+++ b/threema-connector/config/databases.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/databases.json
+Databases:
diff --git a/threema-connector/config/overrides.any b/threema-connector/config/overrides.any
new file mode 100644
index 0000000..f59ec20
--- /dev/null
+++ b/threema-connector/config/overrides.any
@@ -0,0 +1 @@
+*
\ No newline at end of file
diff --git a/threema-connector/config/persistence.xml b/threema-connector/config/persistence.xml
new file mode 100644
index 0000000..d6b96d7
--- /dev/null
+++ b/threema-connector/config/persistence.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/threema-connector/config/rest-clients.yaml b/threema-connector/config/rest-clients.yaml
new file mode 100644
index 0000000..4bffaca
--- /dev/null
+++ b/threema-connector/config/rest-clients.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json
+RestClients:
diff --git a/threema-connector/config/roles.xml b/threema-connector/config/roles.xml
new file mode 100644
index 0000000..59892fe
--- /dev/null
+++ b/threema-connector/config/roles.xml
@@ -0,0 +1,4 @@
+
+
+ Everybody
+
diff --git a/threema-connector/config/users.xml b/threema-connector/config/users.xml
new file mode 100644
index 0000000..51a6906
--- /dev/null
+++ b/threema-connector/config/users.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/threema-connector/config/webservice-clients.yaml b/threema-connector/config/webservice-clients.yaml
new file mode 100644
index 0000000..688047a
--- /dev/null
+++ b/threema-connector/config/webservice-clients.yaml
@@ -0,0 +1,2 @@
+# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/webservice-clients.json
+WebServiceClients:
diff --git a/threema-connector/dataclasses/threema/connector/Data.ivyClass b/threema-connector/dataclasses/threema/connector/Data.ivyClass
new file mode 100644
index 0000000..d6fb40b
--- /dev/null
+++ b/threema-connector/dataclasses/threema/connector/Data.ivyClass
@@ -0,0 +1,2 @@
+Data #class
+threema.connector #namespace
diff --git a/threema-connector/pom.xml b/threema-connector/pom.xml
new file mode 100644
index 0000000..d1bdd4f
--- /dev/null
+++ b/threema-connector/pom.xml
@@ -0,0 +1,19 @@
+
+
+ 4.0.0
+ threema.connector
+ threema-connector
+ 10.0.0-SNAPSHOT
+ iar
+
+
+
+ com.axonivy.ivy.ci
+ project-build-plugin
+ 11.1.0
+ true
+
+
+
+
From 46374e2e44e0ebb93506fcf89f72e8dd9b894ce1 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 15:50:32 +0200
Subject: [PATCH 03/75] initial implementation of message handler enables
keygeneration and message encryption
---
.../connector/test/MsgHanlderTest.java | 32 +++++++++++
.../threema/connector/test/SampleIvyTest.java | 33 -----------
.../connector/test/SampleProcessTest.java | 57 -------------------
threema-connector/src/apitool/MsgHandler.java | 33 +++++++++++
4 files changed, 65 insertions(+), 90 deletions(-)
create mode 100644 threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
delete mode 100644 threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java
delete mode 100644 threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java
create mode 100644 threema-connector/src/apitool/MsgHandler.java
diff --git a/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java b/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
new file mode 100644
index 0000000..ef82187
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
@@ -0,0 +1,32 @@
+package threema.connector.test;
+
+import static apitool.MsgHandler.*;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+
+public class MsgHanlderTest {
+
+ @Test
+ public void generateKeys() {
+ byte[][] keys = genKeyPair();
+ assertThat(keys.length).isEqualTo(2);
+
+ byte[] privKey = keys[0];
+ byte[] pubKey = keys[1];
+ assertThat(privKey).isNotEmpty();
+ assertThat(pubKey).isNotEmpty();
+ }
+
+ @Test
+ public void encryptMsg(){
+ String plainMsg = "Hello World";
+ byte[][] keys = genKeyPair();
+ byte[] privKey = keys[0];
+ byte[] pubKey = keys[1];
+ String encryptedMsg = encryptMessage(plainMsg, privKey, pubKey);
+ assertThat(encryptedMsg).isNotBlank();
+ }
+
+}
diff --git a/threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java b/threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java
deleted file mode 100644
index b7debe4..0000000
--- a/threema-connector-test/src_test/threema/connector/test/SampleIvyTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package threema.connector.test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-import org.junit.jupiter.api.Test;
-
-import ch.ivyteam.ivy.environment.Ivy;
-import ch.ivyteam.ivy.environment.IvyTest;
-
-/**
- * This sample UnitTest runs java code in an environment as it would exists when
- * being executed in Ivy Process. Popular projects API facades, such as {@link Ivy#persistence()}
- * are setup and ready to be used.
- *
- * The test can either be run
- * in the Designer IDE ( right click > run as > JUnit Test
)
- * or in a Maven continuous integration build pipeline ( mvn clean verify
)
- *
- *
- * Detailed guidance on writing these kind of tests can be found in our
- * Unit Testing docs
- *
- */
-@IvyTest
-public class SampleIvyTest{
-
- @Test
- public void useIvy(){
- Ivy.log().info("hi from JUnit");
- assertThat(true).as("I can use Ivy API facade in tests").isEqualTo(true);
- }
-
-}
diff --git a/threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java b/threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java
deleted file mode 100644
index 740faf7..0000000
--- a/threema-connector-test/src_test/threema/connector/test/SampleProcessTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package threema.connector.test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
-import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
-import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
-import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
-import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
-import ch.ivyteam.ivy.scripting.objects.CompositeObject;
-import ch.ivyteam.ivy.workflow.CaseState;
-
-/**
- * This sample ProcessTest simulates users and systems working through
- * your process flow. Created data and tasks can be easily asserted.
- *
- * The test can either be run
- * in the Designer IDE ( right click > run as > JUnit Test
)
- * or in a Maven continuous integration build pipeline ( mvn clean verify
)
- *
- *
- * Detailed guidance on writing these kind of tests can be found in our
- * Process Testing docs
- *
- */
-@IvyProcessTest
-public class SampleProcessTest{
-
- private static final BpmProcess testee = BpmProcess.path("MyProcess");
-
- @Test
- public void callProcess(BpmClient bpmClient){
- BpmElement startable = testee.elementName("start.ivp");
- ExecutionResult result = bpmClient.start().process(startable).execute();
- CompositeObject data = result.data().last();
- assertThat(data).isNotNull();
- }
-
- @Test
- @Disabled("illustrative code: needs adaption to your environment")
- public void workflow(BpmClient bpmClient)
- {
- BpmElement startable = testee.elementName("start.ivp");
-
- // start as authenticated user
- String myUser = "myUser";
- ExecutionResult result = bpmClient.start().process(startable).as().user(myUser).execute();
- assertThat(result.workflow().activeCase()).isEqualTo(CaseState.RUNNING);
- assertThat(result.workflow().executedTask().activator().name()).isEqualTo(myUser);
-
- // continue after task/switch
- bpmClient.start().anyActiveTask(result).as().role("supervisor").execute();
- }
-}
diff --git a/threema-connector/src/apitool/MsgHandler.java b/threema-connector/src/apitool/MsgHandler.java
new file mode 100644
index 0000000..d888412
--- /dev/null
+++ b/threema-connector/src/apitool/MsgHandler.java
@@ -0,0 +1,33 @@
+package apitool;
+
+import static ch.threema.apitool.CryptTool.*;
+
+
+import ch.threema.apitool.results.EncryptResult;
+
+public class MsgHandler{
+ private static String tempId = "9UVR49KD"; // Threema ID Fabian Heuberger
+
+ /**
+ * Function to encrypt TextMessage
+ * @param msg Message to encrypt
+ * @param privateKey Private key of the sender
+ * @param publicKey Public key of the recipient
+ * @return
+ */
+ public static String encryptMessage(String msg, byte[] privateKey, byte[] publicKey) {
+ EncryptResult result = encryptTextMessage(msg, privateKey, publicKey);
+ return result.getResult().toString();
+ }
+
+ /**
+ * Function to generate keyPair
+ * @return private key and public key wrappend in byte[]
+ */
+ public static byte[][] genKeyPair() {
+ byte[] privByte = new byte[32];
+ byte[] pubByte = new byte[32];
+ generateKeyPair(privByte, pubByte);
+ return new byte[][]{privByte, pubByte};
+ }
+}
From b7717f4a419353531ecd50900fd23c299e3286fd Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 15:51:51 +0200
Subject: [PATCH 04/75] initial draft of ApiConnector
---
threema-connector/src/apitool/ApiConnector.java | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 threema-connector/src/apitool/ApiConnector.java
diff --git a/threema-connector/src/apitool/ApiConnector.java b/threema-connector/src/apitool/ApiConnector.java
new file mode 100644
index 0000000..2d3e645
--- /dev/null
+++ b/threema-connector/src/apitool/ApiConnector.java
@@ -0,0 +1,11 @@
+package apitool;
+
+public class ApiConnector {
+
+ public static String getID(String email) {
+ return "";
+ }
+
+
+
+}
From da08f90bd4f53d0c9bff6518e7d454993e262f55 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 15:52:06 +0200
Subject: [PATCH 05/75] added threema-msgapi-tool.jar
---
threema-connector/.classpath | 9 +++++++--
threema-connector/pom.xml | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/threema-connector/.classpath b/threema-connector/.classpath
index aff6211..beb8873 100644
--- a/threema-connector/.classpath
+++ b/threema-connector/.classpath
@@ -15,14 +15,19 @@
+
+
+
+
+
-
-
+
+
diff --git a/threema-connector/pom.xml b/threema-connector/pom.xml
index d1bdd4f..ea2149a 100644
--- a/threema-connector/pom.xml
+++ b/threema-connector/pom.xml
@@ -6,6 +6,15 @@
threema-connector
10.0.0-SNAPSHOT
iar
+
+
+
+ ch.threema.apitool
+ msgapi-sdk-java
+ 2.0.0
+
+
+
From 724e1778c888c909b17d5ef175676058ad080a18 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 16:35:10 +0200
Subject: [PATCH 06/75] added resource folder
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index c6cc0de..7bc9925 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,6 @@ lib/mvn-deps/
logs/
src_dataClasses/
src_wsproc/
+
+# local config
+**/resources/
From 853e56c5e5d798dac7196f8fa63a2589ff090921 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 16:52:08 +0200
Subject: [PATCH 07/75] fixed format to match axonivy standard
---
.../connector/test/MsgHanlderTest.java | 40 +++++++--------
threema-connector/src/apitool/MsgHandler.java | 51 +++++++++----------
2 files changed, 43 insertions(+), 48 deletions(-)
diff --git a/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java b/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
index ef82187..994c244 100644
--- a/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
+++ b/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
@@ -2,31 +2,27 @@
import static apitool.MsgHandler.*;
import static org.assertj.core.api.Assertions.assertThat;
-
import org.junit.jupiter.api.Test;
-
public class MsgHanlderTest {
- @Test
- public void generateKeys() {
- byte[][] keys = genKeyPair();
- assertThat(keys.length).isEqualTo(2);
-
- byte[] privKey = keys[0];
- byte[] pubKey = keys[1];
- assertThat(privKey).isNotEmpty();
- assertThat(pubKey).isNotEmpty();
- }
-
- @Test
- public void encryptMsg(){
- String plainMsg = "Hello World";
- byte[][] keys = genKeyPair();
- byte[] privKey = keys[0];
- byte[] pubKey = keys[1];
- String encryptedMsg = encryptMessage(plainMsg, privKey, pubKey);
- assertThat(encryptedMsg).isNotBlank();
- }
+ @Test
+ public void generateKeys() {
+ byte[][] keys = genKeyPair();
+ assertThat(keys.length).isEqualTo(2);
+ byte[] privKey = keys[0];
+ byte[] pubKey = keys[1];
+ assertThat(privKey).isNotEmpty();
+ assertThat(pubKey).isNotEmpty();
+ }
+ @Test
+ public void encryptMsg() {
+ String plainMsg = "Hello World";
+ byte[][] keys = genKeyPair();
+ byte[] privKey = keys[0];
+ byte[] pubKey = keys[1];
+ String encryptedMsg = encryptMessage(plainMsg, privKey, pubKey);
+ assertThat(encryptedMsg).isNotBlank();
+ }
}
diff --git a/threema-connector/src/apitool/MsgHandler.java b/threema-connector/src/apitool/MsgHandler.java
index d888412..15d988c 100644
--- a/threema-connector/src/apitool/MsgHandler.java
+++ b/threema-connector/src/apitool/MsgHandler.java
@@ -1,33 +1,32 @@
package apitool;
import static ch.threema.apitool.CryptTool.*;
+import ch.threema.apitool.results.EncryptResult;
+public class MsgHandler {
-import ch.threema.apitool.results.EncryptResult;
+ private static String tempId = "9UVR49KD"; // Threema ID Fabian Heuberger
+
+ /**
+ * Function to encrypt TextMessage
+ * @param msg Message to encrypt
+ * @param privateKey Private key of the sender
+ * @param publicKey Public key of the recipient
+ * @return
+ */
+ public static String encryptMessage(String msg, byte[] privateKey, byte[] publicKey) {
+ EncryptResult result = encryptTextMessage(msg, privateKey, publicKey);
+ return result.getResult().toString();
+ }
-public class MsgHandler{
- private static String tempId = "9UVR49KD"; // Threema ID Fabian Heuberger
-
- /**
- * Function to encrypt TextMessage
- * @param msg Message to encrypt
- * @param privateKey Private key of the sender
- * @param publicKey Public key of the recipient
- * @return
- */
- public static String encryptMessage(String msg, byte[] privateKey, byte[] publicKey) {
- EncryptResult result = encryptTextMessage(msg, privateKey, publicKey);
- return result.getResult().toString();
- }
-
- /**
- * Function to generate keyPair
- * @return private key and public key wrappend in byte[]
- */
- public static byte[][] genKeyPair() {
- byte[] privByte = new byte[32];
- byte[] pubByte = new byte[32];
- generateKeyPair(privByte, pubByte);
- return new byte[][]{privByte, pubByte};
- }
+ /**
+ * Function to generate keyPair
+ * @return private key and public key wrappend in byte[]
+ */
+ public static byte[][] genKeyPair() {
+ byte[] privByte = new byte[32];
+ byte[] pubByte = new byte[32];
+ generateKeyPair(privByte, pubByte);
+ return new byte[][] {privByte, pubByte};
+ }
}
From 721426e48b81ad519c59f15ccd73dce002923088 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 16:54:29 +0200
Subject: [PATCH 08/75] added first implementation of property helper
---
.../connector/sendThreemaMessageData.ivyClass | 2 ++
.../processes/sendThreemaMessage.p.json | 8 ++++++++
.../src/apitool/ApiConnector.java | 17 +++++++++++------
.../src/util/LocalPropHandler.java | 19 +++++++++++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
create mode 100644 threema-connector/processes/sendThreemaMessage.p.json
create mode 100644 threema-connector/src/util/LocalPropHandler.java
diff --git a/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass b/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
new file mode 100644
index 0000000..8272b96
--- /dev/null
+++ b/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
@@ -0,0 +1,2 @@
+sendThreemaMessageData #class
+threema.connector #namespace
diff --git a/threema-connector/processes/sendThreemaMessage.p.json b/threema-connector/processes/sendThreemaMessage.p.json
new file mode 100644
index 0000000..b5bacba
--- /dev/null
+++ b/threema-connector/processes/sendThreemaMessage.p.json
@@ -0,0 +1,8 @@
+{
+ "$schema" : "https://json-schema.axonivy.com/process/11.2.1/process.json",
+ "id" : "18AFB09430C43E71",
+ "config" : {
+ "data" : "threema.connector.sendThreemaMessageData"
+ },
+ "elements" : [ ]
+}
\ No newline at end of file
diff --git a/threema-connector/src/apitool/ApiConnector.java b/threema-connector/src/apitool/ApiConnector.java
index 2d3e645..72f9478 100644
--- a/threema-connector/src/apitool/ApiConnector.java
+++ b/threema-connector/src/apitool/ApiConnector.java
@@ -1,11 +1,16 @@
package apitool;
+import static util.LocalPropHandler.*;
+
public class ApiConnector {
-
- public static String getID(String email) {
- return "";
- }
-
-
+ public static String getID(String email) {
+ String id = getProperty("th.id");
+ System.out.println(id);
+ return "";
+ }
+
+ public static void main(String[] args) {
+ getID("");
+ }
}
diff --git a/threema-connector/src/util/LocalPropHandler.java b/threema-connector/src/util/LocalPropHandler.java
new file mode 100644
index 0000000..3ab7650
--- /dev/null
+++ b/threema-connector/src/util/LocalPropHandler.java
@@ -0,0 +1,19 @@
+package util;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class LocalPropHandler {
+
+ public static String getProperty(String name) {
+ try (InputStream input = new FileInputStream("src/resources/config.properties")) {
+ Properties props = new Properties();
+ return props.getProperty(name);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return "Property not found";
+ }
+}
From 4d55a70e0eb166c7888bfeca11804445c44b4708 Mon Sep 17 00:00:00 2001
From: ivy-fhe <146715063+ivy-fhe@users.noreply.github.com>
Date: Wed, 4 Oct 2023 17:02:30 +0200
Subject: [PATCH 09/75] Downgraded from 11 to 10.0
---
threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs b/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
index 48ebc41..471c536 100644
--- a/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
+++ b/threema-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
@@ -1,5 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=threema.connector.demo.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=threema.connector.demo
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
-ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
eclipse.preferences.version=1
From 679e297ff04998061b4597e0fe22d159052672c3 Mon Sep 17 00:00:00 2001
From: ivy-fhe <146715063+ivy-fhe@users.noreply.github.com>
Date: Wed, 4 Oct 2023 17:03:01 +0200
Subject: [PATCH 10/75] Downgraded from 11.0 to 10.0
---
threema-connector/.settings/ch.ivyteam.ivy.designer.prefs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs b/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs
index da9f4af..99bffe8 100644
--- a/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs
+++ b/threema-connector/.settings/ch.ivyteam.ivy.designer.prefs
@@ -1,5 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=threema.connector.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=threema.connector
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
-ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
eclipse.preferences.version=1
From df00f9344b1f347c1418cab89e78bc6821358753 Mon Sep 17 00:00:00 2001
From: ivy-fhe <146715063+ivy-fhe@users.noreply.github.com>
Date: Wed, 4 Oct 2023 17:03:23 +0200
Subject: [PATCH 11/75] Downgraded from 11.0 to 10.0
---
threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs b/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
index b21c360..c370ccd 100644
--- a/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
+++ b/threema-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
@@ -1,5 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=threema.connector.test.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=threema.connector.test
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
-ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
eclipse.preferences.version=1
From 89293ef174027d9187d1f4f9c24458f8f1f73ae5 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 17:04:52 +0200
Subject: [PATCH 12/75] Downgraded version to 10.0.6 to match latest LTS
---
threema-connector-demo/pom.xml | 2 +-
threema-connector-test/pom.xml | 2 +-
threema-connector/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/threema-connector-demo/pom.xml b/threema-connector-demo/pom.xml
index 8c0fb13..11794b0 100644
--- a/threema-connector-demo/pom.xml
+++ b/threema-connector-demo/pom.xml
@@ -19,7 +19,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 11.1.0
+ 10.0.6
true
diff --git a/threema-connector-test/pom.xml b/threema-connector-test/pom.xml
index 11cadd2..f587f4c 100644
--- a/threema-connector-test/pom.xml
+++ b/threema-connector-test/pom.xml
@@ -37,7 +37,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 11.1.0
+ 10.0.6
true
diff --git a/threema-connector/pom.xml b/threema-connector/pom.xml
index ea2149a..f7d2d15 100644
--- a/threema-connector/pom.xml
+++ b/threema-connector/pom.xml
@@ -20,7 +20,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 11.1.0
+ 10.0.6
true
From fa1784224bba65ead816afa9eed5e70ae055e2de Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 17:20:08 +0200
Subject: [PATCH 13/75] fixed propertyhandler
---
threema-connector/src/util/LocalPropHandler.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/threema-connector/src/util/LocalPropHandler.java b/threema-connector/src/util/LocalPropHandler.java
index 3ab7650..7357e8d 100644
--- a/threema-connector/src/util/LocalPropHandler.java
+++ b/threema-connector/src/util/LocalPropHandler.java
@@ -10,7 +10,8 @@ public class LocalPropHandler {
public static String getProperty(String name) {
try (InputStream input = new FileInputStream("src/resources/config.properties")) {
Properties props = new Properties();
- return props.getProperty(name);
+ props.load(input);
+ return props.getProperty(name, "Empty");
} catch (IOException e) {
e.printStackTrace();
}
From 8742de826216d24d9782f36d6d65104a229729bc Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 4 Oct 2023 17:26:21 +0200
Subject: [PATCH 14/75] streamlined file
---
.../src/apitool/ApiConnector.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/threema-connector/src/apitool/ApiConnector.java b/threema-connector/src/apitool/ApiConnector.java
index 72f9478..b9206a4 100644
--- a/threema-connector/src/apitool/ApiConnector.java
+++ b/threema-connector/src/apitool/ApiConnector.java
@@ -1,16 +1,21 @@
package apitool;
-import static util.LocalPropHandler.*;
+import static util.LocalPropHandler.getProperty;
public class ApiConnector {
+ private String threemaId;
+ private String secret;
+ private String privateKey;
- public static String getID(String email) {
- String id = getProperty("th.id");
- System.out.println(id);
- return "";
+ public ApiConnector(){
+ threemaId = getProperty("th.id");
+ secret = getProperty("th.secret");
+ privateKey = getProperty("th.privatekey");
}
- public static void main(String[] args) {
- getID("");
+ public String getID(String email) {
+
+
+ return "";
}
}
From a52ea992ac8fa8313b122a915ca227bfcd0454bb Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Wed, 11 Oct 2023 16:55:04 +0200
Subject: [PATCH 15/75] deconstructed Java code into ivy process
---
threema-connector-demo/config/variables.yaml | 8 +-
.../demo/sendDemoMessageData.ivyClass | 8 ++
.../processes/sendDemoMessage.p.json | 74 ++++++++++++
.../inputDemoMessage.rddescriptor | 7 ++
.../inputDemoMessage/inputDemoMessage.xhtml | 46 +++++++
.../inputDemoMessageData.ivyClass | 4 +
.../inputDemoMessageProcess.p.json | 60 +++++++++
.../webContent/layouts/basic-10.xhtml | 67 ++++++++++
.../layouts/includes/exception-details.xhtml | 109 +++++++++++++++++
.../layouts/includes/exception.xhtml | 47 ++++++++
.../webContent/layouts/includes/footer.xhtml | 18 +++
.../layouts/includes/progress-loader.xhtml | 15 +++
.../connector/test/EncryptionTest.java | 32 +++++
...sgHanlderTest.java => MsgHandlerTest.java} | 17 ++-
threema-connector/config/rest-clients.yaml | 6 +-
.../threema/connector/receiverData.ivyClass | 10 ++
.../connector/sendThreemaMessageData.ivyClass | 11 ++
.../processes/encryptMessage.p.json | 73 +++++++++++
.../processes/handleSingleMessage.p.json | 114 ++++++++++++++++++
.../processes/lookupReceiverInfo.p.json | 95 +++++++++++++++
.../processes/sendMessage.p.json | 72 +++++++++++
.../processes/sendThreemaMessage.p.json | 8 --
.../src/apiConnection/Connector.java | 61 ++++++++++
.../MsgHandler.java | 2 +-
.../src/apitool/ApiConnector.java | 21 ----
threema-connector/src/util/LookupType.java | 21 ++++
threema-connector/src/util/TypeConverter.java | 13 ++
27 files changed, 980 insertions(+), 39 deletions(-)
create mode 100644 threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass
create mode 100644 threema-connector-demo/processes/sendDemoMessage.p.json
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.rddescriptor
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json
create mode 100644 threema-connector-demo/webContent/layouts/basic-10.xhtml
create mode 100644 threema-connector-demo/webContent/layouts/includes/exception-details.xhtml
create mode 100644 threema-connector-demo/webContent/layouts/includes/exception.xhtml
create mode 100644 threema-connector-demo/webContent/layouts/includes/footer.xhtml
create mode 100644 threema-connector-demo/webContent/layouts/includes/progress-loader.xhtml
create mode 100644 threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
rename threema-connector-test/src_test/threema/connector/test/{MsgHanlderTest.java => MsgHandlerTest.java} (62%)
create mode 100644 threema-connector/dataclasses/threema/connector/receiverData.ivyClass
create mode 100644 threema-connector/processes/encryptMessage.p.json
create mode 100644 threema-connector/processes/handleSingleMessage.p.json
create mode 100644 threema-connector/processes/lookupReceiverInfo.p.json
create mode 100644 threema-connector/processes/sendMessage.p.json
delete mode 100644 threema-connector/processes/sendThreemaMessage.p.json
create mode 100644 threema-connector/src/apiConnection/Connector.java
rename threema-connector/src/{apitool => apiConnection}/MsgHandler.java (97%)
delete mode 100644 threema-connector/src/apitool/ApiConnector.java
create mode 100644 threema-connector/src/util/LookupType.java
create mode 100644 threema-connector/src/util/TypeConverter.java
diff --git a/threema-connector-demo/config/variables.yaml b/threema-connector-demo/config/variables.yaml
index fd14458..d0f17d7 100644
--- a/threema-connector-demo/config/variables.yaml
+++ b/threema-connector-demo/config/variables.yaml
@@ -1,6 +1,4 @@
-# == Variables ==
-#
-# You can define here your project Variables.
-#
Variables:
-# myVariable: value
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass b/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass
new file mode 100644
index 0000000..9b1b41a
--- /dev/null
+++ b/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass
@@ -0,0 +1,8 @@
+sendDemoMessageData #class
+threema.connector.demo #namespace
+receiver String #field
+receiver PERSISTENT #fieldModifier
+plainMessage String #field
+plainMessage PERSISTENT #fieldModifier
+type String #field
+type PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/processes/sendDemoMessage.p.json b/threema-connector-demo/processes/sendDemoMessage.p.json
new file mode 100644
index 0000000..0d50531
--- /dev/null
+++ b/threema-connector-demo/processes/sendDemoMessage.p.json
@@ -0,0 +1,74 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1ED116183D822",
+ "config" : {
+ "data" : "threema.connector.demo.sendDemoMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "RequestStart",
+ "name" : "start.ivp",
+ "config" : {
+ "callSignature" : "start",
+ "outLink" : "start.ivp"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "TaskEnd",
+ "visual" : {
+ "at" : { "x" : 584, "y" : 64 }
+ }
+ }, {
+ "id" : "f4",
+ "type" : "SubProcessCall",
+ "name" : "handleSingleMessage",
+ "config" : {
+ "processCall" : "handleSingleMessage:call(threema.connector.sendThreemaMessageData)",
+ "call" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "param.sendThreemaMessageData.receiverData.identifier" : "in.receiver",
+ "param.sendThreemaMessageData.receiverData.type" : "util.LookupType.getByString(in.type)"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 416, "y" : 64 }
+ },
+ "connect" : { "id" : "f6", "to" : "f1" }
+ }, {
+ "id" : "f2",
+ "type" : "DialogCall",
+ "name" : "inputDemoMessage",
+ "config" : {
+ "dialogId" : "threema.connector.demo.inputDemoMessage",
+ "startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
+ "output" : {
+ "map" : {
+ "out" : [
+ "in",
+ "result.sendDemoMessageData"
+ ]
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "param.sendDemoMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 240, "y" : 64 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.rddescriptor b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.rddescriptor
new file mode 100644
index 0000000..ae605f0
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.rddescriptor
@@ -0,0 +1,7 @@
+
+
+
+ viewTechnology
+ JSF
+
+
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml
new file mode 100644
index 0000000..a8e4f09
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml
@@ -0,0 +1,46 @@
+
+
+
+ inputDemoMessage
+
+
+
+ This is an
+ Html Dialog
+ implemented with JSF and Primefaces as widget library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass
new file mode 100644
index 0000000..caf828c
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass
@@ -0,0 +1,4 @@
+inputDemoMessageData #class
+threema.connector.demo.inputDemoMessage #namespace
+sendDemoMessageData threema.connector.demo.sendDemoMessageData #field
+sendDemoMessageData PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json
new file mode 100644
index 0000000..89c1ee3
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json
@@ -0,0 +1,60 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1ED5505127E5F",
+ "kind" : "HTML_DIALOG",
+ "config" : {
+ "data" : "threema.connector.demo.inputDemoMessage.inputDemoMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "HtmlDialogStart",
+ "name" : "start(sendDemoMessageData)",
+ "config" : {
+ "callSignature" : "start",
+ "result" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "result.sendDemoMessageData" : "in.sendDemoMessageData"
+ }
+ },
+ "input" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "out.sendDemoMessageData" : "param.sendDemoMessageData"
+ }
+ },
+ "guid" : "18B1ED550539A833"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f2", "to" : "f1" }
+ }, {
+ "id" : "f1",
+ "type" : "HtmlDialogEnd",
+ "visual" : {
+ "at" : { "x" : 224, "y" : 64 }
+ }
+ }, {
+ "id" : "f3",
+ "type" : "HtmlDialogEventStart",
+ "name" : "close",
+ "config" : {
+ "guid" : "18B1ED550566E4E3"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 160 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ }, {
+ "id" : "f4",
+ "type" : "HtmlDialogExit",
+ "visual" : {
+ "at" : { "x" : 224, "y" : 160 }
+ }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector-demo/webContent/layouts/basic-10.xhtml b/threema-connector-demo/webContent/layouts/basic-10.xhtml
new file mode 100644
index 0000000..2e4b7b8
--- /dev/null
+++ b/threema-connector-demo/webContent/layouts/basic-10.xhtml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+ Ivy Html Dialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ default content
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/webContent/layouts/includes/exception-details.xhtml b/threema-connector-demo/webContent/layouts/includes/exception-details.xhtml
new file mode 100644
index 0000000..bbc3cce
--- /dev/null
+++ b/threema-connector-demo/webContent/layouts/includes/exception-details.xhtml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+ Error id
+ #{errorPage.exceptionId}
+ Error Timestamp
+ #{errorPage.createdAt}
+
+
+
+
+
+ Attributes
+
+
+
+
+ Name
+ Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Thrown by
+ Process:
+
+ Element:
+
+
+
+
+
+ Process call stack
+
+ #{caller.callerElement}
+
+
+
+ Technical cause
+ #{causedBy.class.simpleName}: #{causedBy.message.trim()}
+
+
+
+ Request Uri
+ #{errorPage.getRequestUri()}
+
+ Servlet
+ #{errorPage.getServletName()}
+
+
+ Application
+ #{errorPage.applicationName}
+
+
+
+ Thread local values
+
+
+
+
+ Key
+ Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Stack-Trace
+ #{errorPage.getStackTrace()}
+
+
diff --git a/threema-connector-demo/webContent/layouts/includes/exception.xhtml b/threema-connector-demo/webContent/layouts/includes/exception.xhtml
new file mode 100644
index 0000000..1b255a2
--- /dev/null
+++ b/threema-connector-demo/webContent/layouts/includes/exception.xhtml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/webContent/layouts/includes/footer.xhtml b/threema-connector-demo/webContent/layouts/includes/footer.xhtml
new file mode 100644
index 0000000..f21699e
--- /dev/null
+++ b/threema-connector-demo/webContent/layouts/includes/footer.xhtml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/webContent/layouts/includes/progress-loader.xhtml b/threema-connector-demo/webContent/layouts/includes/progress-loader.xhtml
new file mode 100644
index 0000000..0d68a75
--- /dev/null
+++ b/threema-connector-demo/webContent/layouts/includes/progress-loader.xhtml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java b/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
new file mode 100644
index 0000000..0cff485
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
@@ -0,0 +1,32 @@
+package threema.connector.test;
+
+import org.junit.jupiter.api.Test;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
+import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
+import threema.connector.receiverData;
+import threema.connector.sendThreemaMessageData;
+
+@IvyProcessTest
+public class EncryptionTest {
+ private static final BpmProcess GET_ENCRYPTION_PROCESS = BpmProcess.path("encrptMessage");
+ private static final BpmElement GET_ENCRYPTION_START = GET_ENCRYPTION_PROCESS.elementName("call(sendThreemaMessageData)");
+
+ @Test
+ void encryptMessage() {
+ sendThreemaMessageData msgData = new sendThreemaMessageData();
+ receiverData recData = new receiverData();
+
+ recData.setIdentifier("");
+ recData.setPublicKey("");
+
+ msgData.setApiResponse("");
+ msgData.setEncryptedMessage("");
+ msgData.setNonce("");
+ msgData.setPlainMessage("Hello World");
+ msgData.setReceiver(null);
+ msgData.setReceiverData(recData);
+
+ }
+
+}
diff --git a/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java b/threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java
similarity index 62%
rename from threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
rename to threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java
index 994c244..82fdb84 100644
--- a/threema-connector-test/src_test/threema/connector/test/MsgHanlderTest.java
+++ b/threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java
@@ -1,15 +1,26 @@
package threema.connector.test;
-import static apitool.MsgHandler.*;
+import static apiConnection.MsgHandler.encryptMessage;
+import static apiConnection.MsgHandler.genKeyPair;
import static org.assertj.core.api.Assertions.assertThat;
+import javax.xml.bind.DatatypeConverter;
import org.junit.jupiter.api.Test;
-public class MsgHanlderTest {
+public class MsgHandlerTest {
@Test
public void generateKeys() {
+
+ String key = "7858e5cadef8f3109ad19f28595eef3683803554830eb4cfe1d85db7093134a4";
+ byte[] enc = DatatypeConverter.parseHexBinary(key);
+
+
+ System.out.println(enc.length);
+
+
byte[][] keys = genKeyPair();
assertThat(keys.length).isEqualTo(2);
+ System.out.println(keys[0].length);
byte[] privKey = keys[0];
byte[] pubKey = keys[1];
assertThat(privKey).isNotEmpty();
@@ -25,4 +36,4 @@ public void encryptMsg() {
String encryptedMsg = encryptMessage(plainMsg, privKey, pubKey);
assertThat(encryptedMsg).isNotBlank();
}
-}
+}
\ No newline at end of file
diff --git a/threema-connector/config/rest-clients.yaml b/threema-connector/config/rest-clients.yaml
index 4bffaca..c842ecc 100644
--- a/threema-connector/config/rest-clients.yaml
+++ b/threema-connector/config/rest-clients.yaml
@@ -1,2 +1,6 @@
-# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json
RestClients:
+ ThreemaGateway:
+ UUID: af315689-b538-4142-a823-0632d66754d7
+ Url: https://msgapi.threema.ch/
+ Features:
+ - ch.ivyteam.ivy.rest.client.mapper.JsonFeature
diff --git a/threema-connector/dataclasses/threema/connector/receiverData.ivyClass b/threema-connector/dataclasses/threema/connector/receiverData.ivyClass
new file mode 100644
index 0000000..d302dbd
--- /dev/null
+++ b/threema-connector/dataclasses/threema/connector/receiverData.ivyClass
@@ -0,0 +1,10 @@
+receiverData #class
+threema.connector #namespace
+identifier String #field
+identifier PERSISTENT #fieldModifier
+threemaId String #field
+threemaId PERSISTENT #fieldModifier
+type util.LookupType #field
+type PERSISTENT #fieldModifier
+publicKey String #field
+publicKey PERSISTENT #fieldModifier
diff --git a/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass b/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
index 8272b96..68a3e3f 100644
--- a/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
+++ b/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
@@ -1,2 +1,13 @@
sendThreemaMessageData #class
threema.connector #namespace
+receiver List #field
+receiver PERSISTENT #fieldModifier
+apiResponse String #field
+apiResponse PERSISTENT #fieldModifier
+plainMessage String #field
+plainMessage PERSISTENT #fieldModifier
+encryptedMessage String #field
+receiverData threema.connector.receiverData #field
+receiverData PERSISTENT #fieldModifier
+nonce String #field
+nonce PERSISTENT #fieldModifier
diff --git a/threema-connector/processes/encryptMessage.p.json b/threema-connector/processes/encryptMessage.p.json
new file mode 100644
index 0000000..3af62e3
--- /dev/null
+++ b/threema-connector/processes/encryptMessage.p.json
@@ -0,0 +1,73 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1EAF321633A72",
+ "kind" : "CALLABLE_SUB",
+ "config" : {
+ "data" : "threema.connector.sendThreemaMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "CallSubStart",
+ "name" : "call(sendThreemaMessageData)",
+ "config" : {
+ "callSignature" : "call",
+ "input" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "out" : "param.sendThreemaMessageData"
+ }
+ },
+ "result" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "result.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "CallSubEnd",
+ "visual" : {
+ "at" : { "x" : 408, "y" : 64 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "Script",
+ "name" : "Encrypt Message",
+ "config" : {
+ "output" : {
+ "code" : [
+ "import ch.threema.apitool.results.EncryptResult;",
+ "import ch.threema.apitool.CryptTool;",
+ "import javax.xml.bind.DatatypeConverter;",
+ "",
+ "String privateKey = ivy.var.connector_privateKey;",
+ "String publicKey = in.receiverData.publicKey;",
+ "String msg = in.plainMessage;",
+ "",
+ "Array encPrivKey = DatatypeConverter.parseHexBinary(privateKey);",
+ "Array encPubKey = DatatypeConverter.parseHexBinary(publicKey);",
+ "",
+ "CryptTool tool = new CryptTool();",
+ "EncryptResult result = tool.encryptTextMessage(msg, encPrivKey, encPubKey);",
+ "",
+ "out = in;",
+ "out.encryptedMessage = new String(result.getResult());",
+ "out.nonce = DatatypeConverter.printHexBinary(result.getNonce());"
+ ]
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 264, "y" : 64 }
+ },
+ "connect" : { "id" : "f4", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector/processes/handleSingleMessage.p.json b/threema-connector/processes/handleSingleMessage.p.json
new file mode 100644
index 0000000..4cc9d60
--- /dev/null
+++ b/threema-connector/processes/handleSingleMessage.p.json
@@ -0,0 +1,114 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1ECBC88A8B325",
+ "kind" : "CALLABLE_SUB",
+ "config" : {
+ "data" : "threema.connector.sendThreemaMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "CallSubStart",
+ "name" : "call(sendThreemaMessageData)",
+ "config" : {
+ "callSignature" : "call",
+ "input" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "out" : "param.sendThreemaMessageData"
+ }
+ },
+ "result" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "result.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "CallSubEnd",
+ "visual" : {
+ "at" : { "x" : 720, "y" : 64 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "SubProcessCall",
+ "name" : "lookupReceiverInfo",
+ "config" : {
+ "processCall" : "lookupReceiverInfo:call(threema.connector.sendThreemaMessageData)",
+ "output" : {
+ "map" : {
+ "out" : "result.sendThreemaMessageData"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "param.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 240, "y" : 64 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ }, {
+ "id" : "f4",
+ "type" : "SubProcessCall",
+ "name" : "encryptMessage",
+ "config" : {
+ "processCall" : "encryptMessage:call(threema.connector.sendThreemaMessageData)",
+ "output" : {
+ "map" : {
+ "out" : "result.sendThreemaMessageData"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "param.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 432, "y" : 64 }
+ },
+ "connect" : { "id" : "f7", "to" : "f6" }
+ }, {
+ "id" : "f6",
+ "type" : "SubProcessCall",
+ "name" : "sendMessage",
+ "config" : {
+ "processCall" : "sendMessage:call(threema.connector.sendThreemaMessageData)",
+ "output" : {
+ "map" : {
+ "out" : "result.sendThreemaMessageData"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "param.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 624, "y" : 64 }
+ },
+ "connect" : { "id" : "f8", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector/processes/lookupReceiverInfo.p.json b/threema-connector/processes/lookupReceiverInfo.p.json
new file mode 100644
index 0000000..2ff535b
--- /dev/null
+++ b/threema-connector/processes/lookupReceiverInfo.p.json
@@ -0,0 +1,95 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1EAB8BACFEBFB",
+ "kind" : "CALLABLE_SUB",
+ "config" : {
+ "data" : "threema.connector.sendThreemaMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "CallSubStart",
+ "name" : "call(sendThreemaMessageData)",
+ "config" : {
+ "callSignature" : "call",
+ "input" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "out" : "param.sendThreemaMessageData"
+ }
+ },
+ "result" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "result.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f2", "to" : "f3" }
+ }, {
+ "id" : "f1",
+ "type" : "CallSubEnd",
+ "visual" : {
+ "at" : { "x" : 552, "y" : 64 }
+ }
+ }, {
+ "id" : "f3",
+ "type" : "RestClientCall",
+ "name" : "LookupId",
+ "config" : {
+ "path" : "/lookup/{type}/{id}",
+ "clientId" : "af315689-b538-4142-a823-0632d66754d7",
+ "clientErrorCode" : "ivy:error:rest:client",
+ "queryParams" : {
+ "secret" : "ivy.var.connector_secret",
+ "from" : "ivy.var.connector_threemaId"
+ },
+ "statusErrorCode" : "ivy:error:rest:client",
+ "responseMapping" : {
+ "out" : "in",
+ "out.receiverData.threemaId" : "result"
+ },
+ "templateParams" : {
+ "id" : "in.receiverData.identifier",
+ "type" : "in.receiverData.type.toString()"
+ },
+ "resultType" : "java.lang.String"
+ },
+ "visual" : {
+ "at" : { "x" : 248, "y" : 64 }
+ },
+ "connect" : { "id" : "f4", "to" : "f6" }
+ }, {
+ "id" : "f6",
+ "type" : "RestClientCall",
+ "name" : "LookupPubKey",
+ "config" : {
+ "path" : "/pubkeys/{threemaId}",
+ "clientId" : "af315689-b538-4142-a823-0632d66754d7",
+ "clientErrorCode" : "ivy:error:rest:client",
+ "queryParams" : {
+ "from" : "ivy.var.connector_threemaId",
+ "secret" : "ivy.var.connector_secret"
+ },
+ "statusErrorCode" : "ivy:error:rest:client",
+ "responseMapping" : {
+ "out" : "in",
+ "out.receiverData.publicKey" : "result"
+ },
+ "templateParams" : {
+ "threemaId" : "in.receiverData.threemaId"
+ },
+ "resultType" : "java.lang.String"
+ },
+ "visual" : {
+ "at" : { "x" : 416, "y" : 64 }
+ },
+ "connect" : { "id" : "f5", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector/processes/sendMessage.p.json b/threema-connector/processes/sendMessage.p.json
new file mode 100644
index 0000000..5818413
--- /dev/null
+++ b/threema-connector/processes/sendMessage.p.json
@@ -0,0 +1,72 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1EB743B2E7969",
+ "kind" : "CALLABLE_SUB",
+ "config" : {
+ "data" : "threema.connector.sendThreemaMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "CallSubStart",
+ "name" : "call(sendThreemaMessageData)",
+ "config" : {
+ "callSignature" : "call",
+ "input" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "out" : "param.sendThreemaMessageData"
+ }
+ },
+ "result" : {
+ "params" : [
+ { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ ],
+ "map" : {
+ "result.sendThreemaMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "CallSubEnd",
+ "visual" : {
+ "at" : { "x" : 424, "y" : 64 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "RestClientCall",
+ "name" : "sendMessage",
+ "config" : {
+ "bodyRaw" : [
+ "import static util.TypeConverter.*;",
+ "{",
+ " from: <%=ivy.var.connector_threemaId%>,",
+ " to: <%=in.receiverData.threemaId%>,",
+ " nonce: <%=decode()%>,",
+ " box: <%=in.encryptedMessage%>",
+ "}"
+ ],
+ "path" : "send_e2e",
+ "clientId" : "af315689-b538-4142-a823-0632d66754d7",
+ "clientErrorCode" : "ivy:error:rest:client",
+ "method" : "POST",
+ "statusErrorCode" : "ivy:error:rest:client",
+ "responseMapping" : {
+ "out" : "in",
+ "out.apiResponse" : "result"
+ },
+ "resultType" : "java.lang.String",
+ "bodyInputType" : "RAW"
+ },
+ "visual" : {
+ "at" : { "x" : 248, "y" : 64 }
+ },
+ "connect" : { "id" : "f4", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector/processes/sendThreemaMessage.p.json b/threema-connector/processes/sendThreemaMessage.p.json
deleted file mode 100644
index b5bacba..0000000
--- a/threema-connector/processes/sendThreemaMessage.p.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "$schema" : "https://json-schema.axonivy.com/process/11.2.1/process.json",
- "id" : "18AFB09430C43E71",
- "config" : {
- "data" : "threema.connector.sendThreemaMessageData"
- },
- "elements" : [ ]
-}
\ No newline at end of file
diff --git a/threema-connector/src/apiConnection/Connector.java b/threema-connector/src/apiConnection/Connector.java
new file mode 100644
index 0000000..278094f
--- /dev/null
+++ b/threema-connector/src/apiConnection/Connector.java
@@ -0,0 +1,61 @@
+package apiConnection;
+
+import ch.threema.apitool.APIConnector;
+import ch.threema.apitool.PublicKeyStore;
+import ch.threema.apitool.exceptions.ApiException;
+import ch.threema.apitool.utils.ApiResponse;
+
+public class Connector {
+ private String threemaId;
+ private String secret;
+ private String privateKey;
+ private String publicKey;
+ private APIConnector tool;
+
+ /*
+ * th.id=*IVYDEV0
+ * th.secret=riQNL7ajASmLCHD9
+ * th.privateKey=7858e5cadef8f3109ad19f28595eef3683803554830eb4cfe1d85db7093134a4
+ * th.publicKey=7b60359098863205c544865726e22396e2603c
+ */
+
+ public Connector(){
+ /*
+ threemaId = getProperty("th.id");
+ secret = getProperty("th.secret");
+ privateKey = getProperty("th.privateKey");
+ publicKey = getProperty("th.publicKey");
+ */
+ threemaId = "*IVYDEV0";
+ secret = "riQNL7ajASmLCHD9";
+ privateKey = "7858e5cadef8f3109ad19f28595eef3683803554830eb4cfe1d85db7093134a4";
+ publicKey = "7b60359098863205c544865726e22396e2603c";
+ tool = new APIConnector(threemaId, secret, new PublicKeyStore() {
+ @Override
+ protected byte[] fetchPublicKey(String id) {
+ //TODO: Implementation
+ return null;
+ }
+
+ @Override
+ protected void save(String id, byte[] pubKey) {
+ //TODO: Implementation
+ }
+ });
+ }
+
+ public String getID(String email) {
+ String id = "not found";
+ ApiResponse resp = null;
+ try {
+ resp = tool.lookupEmail(email);
+ id = resp.getData();
+ }catch(ApiException e) {
+ String cause = e.getMessage();
+ System.out.println(cause);
+
+ }
+ return id;
+ }
+
+}
\ No newline at end of file
diff --git a/threema-connector/src/apitool/MsgHandler.java b/threema-connector/src/apiConnection/MsgHandler.java
similarity index 97%
rename from threema-connector/src/apitool/MsgHandler.java
rename to threema-connector/src/apiConnection/MsgHandler.java
index 15d988c..e5399c0 100644
--- a/threema-connector/src/apitool/MsgHandler.java
+++ b/threema-connector/src/apiConnection/MsgHandler.java
@@ -1,4 +1,4 @@
-package apitool;
+package apiConnection;
import static ch.threema.apitool.CryptTool.*;
import ch.threema.apitool.results.EncryptResult;
diff --git a/threema-connector/src/apitool/ApiConnector.java b/threema-connector/src/apitool/ApiConnector.java
deleted file mode 100644
index b9206a4..0000000
--- a/threema-connector/src/apitool/ApiConnector.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package apitool;
-
-import static util.LocalPropHandler.getProperty;
-
-public class ApiConnector {
- private String threemaId;
- private String secret;
- private String privateKey;
-
- public ApiConnector(){
- threemaId = getProperty("th.id");
- secret = getProperty("th.secret");
- privateKey = getProperty("th.privatekey");
- }
-
- public String getID(String email) {
-
-
- return "";
- }
-}
diff --git a/threema-connector/src/util/LookupType.java b/threema-connector/src/util/LookupType.java
new file mode 100644
index 0000000..3142e78
--- /dev/null
+++ b/threema-connector/src/util/LookupType.java
@@ -0,0 +1,21 @@
+package util;
+
+
+public enum LookupType {
+ PHONE,
+ EMAIL,
+ INVALID;
+
+ @Override
+ public String toString() {
+ return this.name().toLowerCase();
+ }
+
+ public static LookupType getByString(String id) {
+ return switch(id) {
+ case "phone" -> LookupType.PHONE;
+ case "email" -> LookupType.EMAIL;
+ default -> LookupType.INVALID;
+ };
+ }
+}
diff --git a/threema-connector/src/util/TypeConverter.java b/threema-connector/src/util/TypeConverter.java
new file mode 100644
index 0000000..138327f
--- /dev/null
+++ b/threema-connector/src/util/TypeConverter.java
@@ -0,0 +1,13 @@
+package util;
+
+import javax.xml.bind.DatatypeConverter;
+
+public class TypeConverter {
+ public static String encode(byte[] data) {
+ return DatatypeConverter.printHexBinary(data);
+ }
+
+ public static byte[] decode(String data) {
+ return DatatypeConverter.parseHexBinary(data);
+ }
+}
From cef7c9a2318f27747cb6fe9d98ebc5ebbc463a37 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Thu, 12 Oct 2023 15:10:01 +0200
Subject: [PATCH 16/75] added functionality to send message to one or multiple
recipients added demo dialogs
---
.../threema/connector/demo/Status.ivyClass | 6 +
.../demo/sendDemoMessageData.ivyClass | 2 +
.../MessageMultipleRecipients.p.json | 105 ++++++++++++++
.../processes/MessageSingleRecipient.p.json | 112 +++++++++++++++
.../processes/sendDemoMessage.p.json | 74 ----------
.../ResultPage.rddescriptor} | 0
.../demo/ResultPage/ResultPage.xhtml | 44 ++++++
.../demo/ResultPage/ResultPageData.ivyClass | 6 +
.../demo/ResultPage/ResultPageProcess.p.json | 84 +++++++++++
.../multipleRecipients.rddescriptor | 7 +
.../multipleRecipients.xhtml | 37 +++++
.../multipleRecipientsData.ivyClass | 4 +
.../multipleRecipientsProcess.p.json | 60 ++++++++
.../singleRecipient.rddescriptor | 7 +
.../singleRecipient.xhtml} | 26 ++--
.../singleRecipientData.ivyClass} | 4 +-
.../singleRecipientProcess.p.json} | 8 +-
.../connector/test/EncryptionTest.java | 8 --
.../threema/connector/receiverData.ivyClass | 10 ++
.../connector/sendThreemaMessageData.ivyClass | 11 +-
.../processes/handleSingleMessage.p.json | 114 ---------------
.../processes/multipleRecipients.p.json | 119 ++++++++++++++++
.../processes/singleRecipient.p.json | 133 ++++++++++++++++++
.../getReceiverInfo.p.json} | 58 +++++---
.../messageEncryption.p.json} | 27 ++--
.../processes/{ => util}/sendMessage.p.json | 43 +++---
.../src/util/LocalPropHandler.java | 20 ---
threema-connector/src/util/LookupType.java | 14 ++
threema-connector/src/util/TypeConverter.java | 2 +-
29 files changed, 848 insertions(+), 297 deletions(-)
create mode 100644 threema-connector-demo/dataclasses/threema/connector/demo/Status.ivyClass
create mode 100644 threema-connector-demo/processes/MessageMultipleRecipients.p.json
create mode 100644 threema-connector-demo/processes/MessageSingleRecipient.p.json
delete mode 100644 threema-connector-demo/processes/sendDemoMessage.p.json
rename threema-connector-demo/src_hd/threema/connector/demo/{inputDemoMessage/inputDemoMessage.rddescriptor => ResultPage/ResultPage.rddescriptor} (100%)
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPage.xhtml
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageData.ivyClass
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageProcess.p.json
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.rddescriptor
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.xhtml
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsData.ivyClass
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsProcess.p.json
create mode 100644 threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.rddescriptor
rename threema-connector-demo/src_hd/threema/connector/demo/{inputDemoMessage/inputDemoMessage.xhtml => singleRecipient/singleRecipient.xhtml} (69%)
rename threema-connector-demo/src_hd/threema/connector/demo/{inputDemoMessage/inputDemoMessageData.ivyClass => singleRecipient/singleRecipientData.ivyClass} (59%)
rename threema-connector-demo/src_hd/threema/connector/demo/{inputDemoMessage/inputDemoMessageProcess.p.json => singleRecipient/singleRecipientProcess.p.json} (88%)
delete mode 100644 threema-connector/processes/handleSingleMessage.p.json
create mode 100644 threema-connector/processes/multipleRecipients.p.json
create mode 100644 threema-connector/processes/singleRecipient.p.json
rename threema-connector/processes/{lookupReceiverInfo.p.json => util/getReceiverInfo.p.json} (53%)
rename threema-connector/processes/{encryptMessage.p.json => util/messageEncryption.p.json} (65%)
rename threema-connector/processes/{ => util}/sendMessage.p.json (50%)
delete mode 100644 threema-connector/src/util/LocalPropHandler.java
diff --git a/threema-connector-demo/dataclasses/threema/connector/demo/Status.ivyClass b/threema-connector-demo/dataclasses/threema/connector/demo/Status.ivyClass
new file mode 100644
index 0000000..ea4d952
--- /dev/null
+++ b/threema-connector-demo/dataclasses/threema/connector/demo/Status.ivyClass
@@ -0,0 +1,6 @@
+Status #class
+threema.connector.demo #namespace
+recipient String #field
+recipient PERSISTENT #fieldModifier
+status String #field
+status PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass b/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass
index 9b1b41a..54168df 100644
--- a/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass
+++ b/threema-connector-demo/dataclasses/threema/connector/demo/sendDemoMessageData.ivyClass
@@ -6,3 +6,5 @@ plainMessage String #field
plainMessage PERSISTENT #fieldModifier
type String #field
type PERSISTENT #fieldModifier
+apiResponse List #field
+apiResponse PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/processes/MessageMultipleRecipients.p.json b/threema-connector-demo/processes/MessageMultipleRecipients.p.json
new file mode 100644
index 0000000..518dade
--- /dev/null
+++ b/threema-connector-demo/processes/MessageMultipleRecipients.p.json
@@ -0,0 +1,105 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B1ED116183D822",
+ "config" : {
+ "data" : "threema.connector.demo.sendDemoMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "RequestStart",
+ "name" : "start.ivp",
+ "config" : {
+ "callSignature" : "start",
+ "outLink" : "start.ivp"
+ },
+ "visual" : {
+ "at" : { "x" : 112, "y" : 64 }
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "TaskEnd",
+ "visual" : {
+ "at" : { "x" : 704, "y" : 64 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "DialogCall",
+ "name" : "multipleRecipients",
+ "config" : {
+ "dialogId" : "threema.connector.demo.multipleRecipients",
+ "startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
+ "output" : {
+ "map" : {
+ "out" : [
+ "in",
+ "result.sendDemoMessageData",
+ "result.sendDemoMessageData"
+ ]
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "param.sendDemoMessageData" : [
+ "in",
+ "in"
+ ]
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 240, "y" : 64 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ }, {
+ "id" : "f4",
+ "type" : "SubProcessCall",
+ "name" : "handleMessage",
+ "config" : {
+ "processCall" : "multipleRecipients:call(String,List)",
+ "output" : {
+ "map" : {
+ "out" : "in",
+ "out.apiResponse" : "result.apiResponse"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "plainMsg", "type" : "String" },
+ { "name" : "receivers", "type" : "List" }
+ ],
+ "map" : {
+ "param.plainMsg" : "in.plainMessage",
+ "param.receivers" : "in.receiver.split(\"\\n\")"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 408, "y" : 64 }
+ },
+ "connect" : { "id" : "f7", "to" : "f6" }
+ }, {
+ "id" : "f6",
+ "type" : "DialogCall",
+ "name" : "ResultPage",
+ "config" : {
+ "dialogId" : "threema.connector.demo.ResultPage",
+ "startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
+ "call" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "param.sendDemoMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 576, "y" : 64 }
+ },
+ "connect" : { "id" : "f8", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector-demo/processes/MessageSingleRecipient.p.json b/threema-connector-demo/processes/MessageSingleRecipient.p.json
new file mode 100644
index 0000000..12fe52d
--- /dev/null
+++ b/threema-connector-demo/processes/MessageSingleRecipient.p.json
@@ -0,0 +1,112 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B22F69680901D3",
+ "config" : {
+ "data" : "threema.connector.demo.sendDemoMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "RequestStart",
+ "name" : "start.ivp",
+ "config" : {
+ "callSignature" : "start",
+ "outLink" : "start.ivp"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "TaskEnd",
+ "visual" : {
+ "at" : { "x" : 768, "y" : 64 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "DialogCall",
+ "name" : "singleRecipient",
+ "config" : {
+ "dialogId" : "threema.connector.demo.singleRecipient",
+ "startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
+ "output" : {
+ "map" : {
+ "out" : [
+ "in",
+ "result.sendDemoMessageData"
+ ]
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "param.sendDemoMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 272, "y" : 64 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ }, {
+ "id" : "f4",
+ "type" : "SubProcessCall",
+ "name" : "singleMessage",
+ "config" : {
+ "processCall" : "singleRecipient:call(String,String,String)",
+ "output" : {
+ "map" : {
+ "out" : "in",
+ "out.plainMessage" : "in.plainMessage"
+ },
+ "code" : "out.apiResponse.add(result.apiResponse);"
+ },
+ "call" : {
+ "params" : [
+ { "name" : "plainMsg", "type" : "String" },
+ { "name" : "receiverID", "type" : "String" },
+ { "name" : "lookupType", "type" : "String" }
+ ],
+ "map" : {
+ "param.plainMsg" : "in.plainMessage",
+ "param.receiverID" : "in.receiver",
+ "param.lookupType" : "in.type"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 464, "y" : 64 }
+ },
+ "connect" : { "id" : "f7", "to" : "f6" }
+ }, {
+ "id" : "f6",
+ "type" : "DialogCall",
+ "name" : "ResultPage",
+ "config" : {
+ "dialogId" : "threema.connector.demo.ResultPage",
+ "startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
+ "output" : {
+ "map" : {
+ "out" : [
+ "in",
+ "result.sendDemoMessageData"
+ ]
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "param.sendDemoMessageData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 640, "y" : 64 }
+ },
+ "connect" : { "id" : "f8", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector-demo/processes/sendDemoMessage.p.json b/threema-connector-demo/processes/sendDemoMessage.p.json
deleted file mode 100644
index 0d50531..0000000
--- a/threema-connector-demo/processes/sendDemoMessage.p.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "format" : "10.0.0",
- "id" : "18B1ED116183D822",
- "config" : {
- "data" : "threema.connector.demo.sendDemoMessageData"
- },
- "elements" : [ {
- "id" : "f0",
- "type" : "RequestStart",
- "name" : "start.ivp",
- "config" : {
- "callSignature" : "start",
- "outLink" : "start.ivp"
- },
- "visual" : {
- "at" : { "x" : 96, "y" : 64 }
- },
- "connect" : { "id" : "f3", "to" : "f2" }
- }, {
- "id" : "f1",
- "type" : "TaskEnd",
- "visual" : {
- "at" : { "x" : 584, "y" : 64 }
- }
- }, {
- "id" : "f4",
- "type" : "SubProcessCall",
- "name" : "handleSingleMessage",
- "config" : {
- "processCall" : "handleSingleMessage:call(threema.connector.sendThreemaMessageData)",
- "call" : {
- "params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
- ],
- "map" : {
- "param.sendThreemaMessageData.receiverData.identifier" : "in.receiver",
- "param.sendThreemaMessageData.receiverData.type" : "util.LookupType.getByString(in.type)"
- }
- }
- },
- "visual" : {
- "at" : { "x" : 416, "y" : 64 }
- },
- "connect" : { "id" : "f6", "to" : "f1" }
- }, {
- "id" : "f2",
- "type" : "DialogCall",
- "name" : "inputDemoMessage",
- "config" : {
- "dialogId" : "threema.connector.demo.inputDemoMessage",
- "startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
- "output" : {
- "map" : {
- "out" : [
- "in",
- "result.sendDemoMessageData"
- ]
- }
- },
- "call" : {
- "params" : [
- { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
- ],
- "map" : {
- "param.sendDemoMessageData" : "in"
- }
- }
- },
- "visual" : {
- "at" : { "x" : 240, "y" : 64 }
- },
- "connect" : { "id" : "f5", "to" : "f4" }
- } ]
-}
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.rddescriptor b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPage.rddescriptor
similarity index 100%
rename from threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.rddescriptor
rename to threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPage.rddescriptor
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPage.xhtml b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPage.xhtml
new file mode 100644
index 0000000..bb3fba1
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPage.xhtml
@@ -0,0 +1,44 @@
+
+
+
+ ResultPage
+
+
+ Message Status
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageData.ivyClass b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageData.ivyClass
new file mode 100644
index 0000000..26676ce
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageData.ivyClass
@@ -0,0 +1,6 @@
+ResultPageData #class
+threema.connector.demo.ResultPage #namespace
+sendDemoMessageData threema.connector.demo.sendDemoMessageData #field
+sendDemoMessageData PERSISTENT #fieldModifier
+statusData List #field
+statusData PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageProcess.p.json b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageProcess.p.json
new file mode 100644
index 0000000..7f85581
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/ResultPage/ResultPageProcess.p.json
@@ -0,0 +1,84 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B23815CA49935E",
+ "kind" : "HTML_DIALOG",
+ "config" : {
+ "data" : "threema.connector.demo.ResultPage.ResultPageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "HtmlDialogStart",
+ "name" : "start(sendDemoMessageData)",
+ "config" : {
+ "callSignature" : "start",
+ "result" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "result.sendDemoMessageData" : "in.sendDemoMessageData"
+ }
+ },
+ "input" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "out.sendDemoMessageData" : "param.sendDemoMessageData"
+ }
+ },
+ "guid" : "18B23815CA5CE936"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f6", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "HtmlDialogEnd",
+ "visual" : {
+ "at" : { "x" : 312, "y" : 64 }
+ }
+ }, {
+ "id" : "f3",
+ "type" : "HtmlDialogEventStart",
+ "name" : "close",
+ "config" : {
+ "guid" : "18B23815CA6B079E"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 160 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ }, {
+ "id" : "f4",
+ "type" : "HtmlDialogExit",
+ "visual" : {
+ "at" : { "x" : 312, "y" : 160 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "Script",
+ "name" : "loadData",
+ "config" : {
+ "output" : {
+ "code" : [
+ "import threema.connector.demo.Status;",
+ "",
+ "List recipients = in.sendDemoMessageData.receiver.split(\"\\n\");",
+ "",
+ "for(int i = 0; i < recipients.size(); i++){",
+ " Status s = new Status();",
+ " s.recipient = recipients.get(i);",
+ " s.status = in.sendDemoMessageData.apiResponse.get(i);",
+ " out.statusData.add(s);",
+ "}"
+ ]
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 208, "y" : 64 }
+ },
+ "connect" : { "id" : "f7", "to" : "f1" }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.rddescriptor b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.rddescriptor
new file mode 100644
index 0000000..ae605f0
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.rddescriptor
@@ -0,0 +1,7 @@
+
+
+
+ viewTechnology
+ JSF
+
+
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.xhtml b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.xhtml
new file mode 100644
index 0000000..731b70e
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipients.xhtml
@@ -0,0 +1,37 @@
+
+
+
+ multipleRecipients
+
+
+ Send Message via Threema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsData.ivyClass b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsData.ivyClass
new file mode 100644
index 0000000..ab92c58
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsData.ivyClass
@@ -0,0 +1,4 @@
+multipleRecipientsData #class
+threema.connector.demo.multipleRecipients #namespace
+sendDemoMessageData threema.connector.demo.sendDemoMessageData #field
+sendDemoMessageData PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsProcess.p.json b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsProcess.p.json
new file mode 100644
index 0000000..246dd30
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/multipleRecipients/multipleRecipientsProcess.p.json
@@ -0,0 +1,60 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B23798EF7AA160",
+ "kind" : "HTML_DIALOG",
+ "config" : {
+ "data" : "threema.connector.demo.multipleRecipients.multipleRecipientsData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "HtmlDialogStart",
+ "name" : "start(sendDemoMessageData)",
+ "config" : {
+ "callSignature" : "start",
+ "result" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "result.sendDemoMessageData" : "in.sendDemoMessageData"
+ }
+ },
+ "input" : {
+ "params" : [
+ { "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
+ ],
+ "map" : {
+ "out.sendDemoMessageData" : "param.sendDemoMessageData"
+ }
+ },
+ "guid" : "18B23798EF997276"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 }
+ },
+ "connect" : { "id" : "f2", "to" : "f1" }
+ }, {
+ "id" : "f1",
+ "type" : "HtmlDialogEnd",
+ "visual" : {
+ "at" : { "x" : 224, "y" : 64 }
+ }
+ }, {
+ "id" : "f3",
+ "type" : "HtmlDialogEventStart",
+ "name" : "close",
+ "config" : {
+ "guid" : "18B23798EFB1720A"
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 160 }
+ },
+ "connect" : { "id" : "f5", "to" : "f4" }
+ }, {
+ "id" : "f4",
+ "type" : "HtmlDialogExit",
+ "visual" : {
+ "at" : { "x" : 224, "y" : 160 }
+ }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.rddescriptor b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.rddescriptor
new file mode 100644
index 0000000..ae605f0
--- /dev/null
+++ b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.rddescriptor
@@ -0,0 +1,7 @@
+
+
+
+ viewTechnology
+ JSF
+
+
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.xhtml
similarity index 69%
rename from threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml
rename to threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.xhtml
index a8e4f09..c0215ea 100644
--- a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessage.xhtml
+++ b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipient.xhtml
@@ -4,32 +4,28 @@
xmlns:pe="http://primefaces.org/ui/extensions">
- inputDemoMessage
+ singleRecipient
-
- This is an
- Html Dialog
- implemented with JSF and Primefaces as widget library
-
+ Send Message via Threema
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipientData.ivyClass
similarity index 59%
rename from threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass
rename to threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipientData.ivyClass
index caf828c..55cea03 100644
--- a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageData.ivyClass
+++ b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipientData.ivyClass
@@ -1,4 +1,4 @@
-inputDemoMessageData #class
-threema.connector.demo.inputDemoMessage #namespace
+singleRecipientData #class
+threema.connector.demo.singleRecipient #namespace
sendDemoMessageData threema.connector.demo.sendDemoMessageData #field
sendDemoMessageData PERSISTENT #fieldModifier
diff --git a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipientProcess.p.json
similarity index 88%
rename from threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json
rename to threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipientProcess.p.json
index 89c1ee3..02b40b9 100644
--- a/threema-connector-demo/src_hd/threema/connector/demo/inputDemoMessage/inputDemoMessageProcess.p.json
+++ b/threema-connector-demo/src_hd/threema/connector/demo/singleRecipient/singleRecipientProcess.p.json
@@ -1,9 +1,9 @@
{
"format" : "10.0.0",
- "id" : "18B1ED5505127E5F",
+ "id" : "18B22F7818988EDB",
"kind" : "HTML_DIALOG",
"config" : {
- "data" : "threema.connector.demo.inputDemoMessage.inputDemoMessageData"
+ "data" : "threema.connector.demo.singleRecipient.singleRecipientData"
},
"elements" : [ {
"id" : "f0",
@@ -27,7 +27,7 @@
"out.sendDemoMessageData" : "param.sendDemoMessageData"
}
},
- "guid" : "18B1ED550539A833"
+ "guid" : "18B22F7818A93A33"
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
@@ -44,7 +44,7 @@
"type" : "HtmlDialogEventStart",
"name" : "close",
"config" : {
- "guid" : "18B1ED550566E4E3"
+ "guid" : "18B22F7818C5C347"
},
"visual" : {
"at" : { "x" : 96, "y" : 160 }
diff --git a/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java b/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
index 0cff485..9b3bf94 100644
--- a/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
+++ b/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
@@ -17,15 +17,7 @@ void encryptMessage() {
sendThreemaMessageData msgData = new sendThreemaMessageData();
receiverData recData = new receiverData();
- recData.setIdentifier("");
- recData.setPublicKey("");
- msgData.setApiResponse("");
- msgData.setEncryptedMessage("");
- msgData.setNonce("");
- msgData.setPlainMessage("Hello World");
- msgData.setReceiver(null);
- msgData.setReceiverData(recData);
}
diff --git a/threema-connector/dataclasses/threema/connector/receiverData.ivyClass b/threema-connector/dataclasses/threema/connector/receiverData.ivyClass
index d302dbd..5c04ddf 100644
--- a/threema-connector/dataclasses/threema/connector/receiverData.ivyClass
+++ b/threema-connector/dataclasses/threema/connector/receiverData.ivyClass
@@ -8,3 +8,13 @@ type util.LookupType #field
type PERSISTENT #fieldModifier
publicKey String #field
publicKey PERSISTENT #fieldModifier
+nonce String #field
+nonce PERSISTENT #fieldModifier
+encryptedMessage String #field
+encryptedMessage PERSISTENT #fieldModifier
+plainMessage String #field
+plainMessage PERSISTENT #fieldModifier
+messageJson String #field
+messageJson PERSISTENT #fieldModifier
+apiResponse String #field
+apiResponse PERSISTENT #fieldModifier
diff --git a/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass b/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
index 68a3e3f..a735433 100644
--- a/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
+++ b/threema-connector/dataclasses/threema/connector/sendThreemaMessageData.ivyClass
@@ -2,12 +2,11 @@ sendThreemaMessageData #class
threema.connector #namespace
receiver List #field
receiver PERSISTENT #fieldModifier
-apiResponse String #field
-apiResponse PERSISTENT #fieldModifier
plainMessage String #field
plainMessage PERSISTENT #fieldModifier
-encryptedMessage String #field
-receiverData threema.connector.receiverData #field
+receiverData List #field
receiverData PERSISTENT #fieldModifier
-nonce String #field
-nonce PERSISTENT #fieldModifier
+sendCount Number #field
+sendCount PERSISTENT #fieldModifier
+apiResponses List #field
+apiResponses PERSISTENT #fieldModifier
diff --git a/threema-connector/processes/handleSingleMessage.p.json b/threema-connector/processes/handleSingleMessage.p.json
deleted file mode 100644
index 4cc9d60..0000000
--- a/threema-connector/processes/handleSingleMessage.p.json
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- "format" : "10.0.0",
- "id" : "18B1ECBC88A8B325",
- "kind" : "CALLABLE_SUB",
- "config" : {
- "data" : "threema.connector.sendThreemaMessageData"
- },
- "elements" : [ {
- "id" : "f0",
- "type" : "CallSubStart",
- "name" : "call(sendThreemaMessageData)",
- "config" : {
- "callSignature" : "call",
- "input" : {
- "params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
- ],
- "map" : {
- "out" : "param.sendThreemaMessageData"
- }
- },
- "result" : {
- "params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
- ],
- "map" : {
- "result.sendThreemaMessageData" : "in"
- }
- }
- },
- "visual" : {
- "at" : { "x" : 96, "y" : 64 }
- },
- "connect" : { "id" : "f3", "to" : "f2" }
- }, {
- "id" : "f1",
- "type" : "CallSubEnd",
- "visual" : {
- "at" : { "x" : 720, "y" : 64 }
- }
- }, {
- "id" : "f2",
- "type" : "SubProcessCall",
- "name" : "lookupReceiverInfo",
- "config" : {
- "processCall" : "lookupReceiverInfo:call(threema.connector.sendThreemaMessageData)",
- "output" : {
- "map" : {
- "out" : "result.sendThreemaMessageData"
- }
- },
- "call" : {
- "params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
- ],
- "map" : {
- "param.sendThreemaMessageData" : "in"
- }
- }
- },
- "visual" : {
- "at" : { "x" : 240, "y" : 64 }
- },
- "connect" : { "id" : "f5", "to" : "f4" }
- }, {
- "id" : "f4",
- "type" : "SubProcessCall",
- "name" : "encryptMessage",
- "config" : {
- "processCall" : "encryptMessage:call(threema.connector.sendThreemaMessageData)",
- "output" : {
- "map" : {
- "out" : "result.sendThreemaMessageData"
- }
- },
- "call" : {
- "params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
- ],
- "map" : {
- "param.sendThreemaMessageData" : "in"
- }
- }
- },
- "visual" : {
- "at" : { "x" : 432, "y" : 64 }
- },
- "connect" : { "id" : "f7", "to" : "f6" }
- }, {
- "id" : "f6",
- "type" : "SubProcessCall",
- "name" : "sendMessage",
- "config" : {
- "processCall" : "sendMessage:call(threema.connector.sendThreemaMessageData)",
- "output" : {
- "map" : {
- "out" : "result.sendThreemaMessageData"
- }
- },
- "call" : {
- "params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
- ],
- "map" : {
- "param.sendThreemaMessageData" : "in"
- }
- }
- },
- "visual" : {
- "at" : { "x" : 624, "y" : 64 }
- },
- "connect" : { "id" : "f8", "to" : "f1" }
- } ]
-}
\ No newline at end of file
diff --git a/threema-connector/processes/multipleRecipients.p.json b/threema-connector/processes/multipleRecipients.p.json
new file mode 100644
index 0000000..6f2aea2
--- /dev/null
+++ b/threema-connector/processes/multipleRecipients.p.json
@@ -0,0 +1,119 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B22DA4C8AA09A2",
+ "kind" : "CALLABLE_SUB",
+ "config" : {
+ "data" : "threema.connector.sendThreemaMessageData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "CallSubStart",
+ "name" : "call(String,List)",
+ "config" : {
+ "callSignature" : "call",
+ "input" : {
+ "params" : [
+ { "name" : "plainMsg", "type" : "String" },
+ { "name" : "receivers", "type" : "List" }
+ ],
+ "map" : {
+ "out.plainMessage" : "param.plainMsg",
+ "out.receiver" : "param.receivers"
+ }
+ },
+ "result" : {
+ "params" : [
+ { "name" : "apiResponse", "type" : "List" }
+ ],
+ "map" : {
+ "result.apiResponse" : "in.apiResponses"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 96, "y" : 64 },
+ "description" : "Subprocess to create receiverData for each recipient"
+ },
+ "connect" : { "id" : "f3", "to" : "f2" }
+ }, {
+ "id" : "f1",
+ "type" : "CallSubEnd",
+ "visual" : {
+ "at" : { "x" : 840, "y" : 64 }
+ }
+ }, {
+ "id" : "f2",
+ "type" : "Script",
+ "name" : "createReceiverData",
+ "config" : {
+ "output" : {
+ "map" : {
+ "out" : "in",
+ "out.sendCount" : "0"
+ },
+ "code" : [
+ "import util.LookupType;",
+ "import threema.connector.receiverData;",
+ "",
+ "import ch.ivyteam.ivy.environment.Ivy;",
+ "",
+ "for(String rec : in.receiver){",
+ " receiverData recDat = new receiverData();",
+ " recDat.plainMessage = in.plainMessage;",
+ " recDat.identifier = rec;",
+ " recDat.type = LookupType.getByPattern(rec);",
+ " out.receiverData.add(recDat);",
+ "}",
+ "",
+ "for(receiverData rec : out.receiverData){",
+ " Ivy.log().debug(rec.identifier + \" \" + rec.type + \" \" + rec.plainMessage);",
+ "}"
+ ]
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 288, "y" : 64 }
+ },
+ "connect" : { "id" : "f4", "to" : "f6" }
+ }, {
+ "id" : "f6",
+ "type" : "Alternative",
+ "visual" : {
+ "at" : { "x" : 432, "y" : 64 }
+ },
+ "connect" : [
+ { "id" : "f11", "to" : "f7", "via" : [ { "x" : 528, "y" : 208 } ], "condition" : "in.sendCount < in.receiverData.size()" },
+ { "id" : "f10", "to" : "f1" }
+ ]
+ }, {
+ "id" : "f7",
+ "type" : "SubProcessCall",
+ "name" : "singleRecipient",
+ "config" : {
+ "processCall" : "singleRecipient:call(String,String,String)",
+ "output" : {
+ "map" : {
+ "out" : "in",
+ "out.sendCount" : "in.sendCount + 1"
+ },
+ "code" : "out.apiResponses.add(result.apiResponse);"
+ },
+ "call" : {
+ "params" : [
+ { "name" : "plainMsg", "type" : "String" },
+ { "name" : "receiverID", "type" : "String" },
+ { "name" : "lookupType", "type" : "String" }
+ ],
+ "map" : {
+ "param.plainMsg" : "in.plainMessage",
+ "param.receiverID" : "in.receiverData.get(in.sendCount).identifier",
+ "param.lookupType" : "in.receiverData.get(in.sendCount).type.toString()"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 432, "y" : 208 }
+ },
+ "connect" : { "id" : "f5", "to" : "f6", "via" : [ { "x" : 344, "y" : 208 } ] }
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector/processes/singleRecipient.p.json b/threema-connector/processes/singleRecipient.p.json
new file mode 100644
index 0000000..ce3f0ac
--- /dev/null
+++ b/threema-connector/processes/singleRecipient.p.json
@@ -0,0 +1,133 @@
+{
+ "format" : "10.0.0",
+ "id" : "18B22C8212D554A9",
+ "kind" : "CALLABLE_SUB",
+ "config" : {
+ "data" : "threema.connector.receiverData"
+ },
+ "elements" : [ {
+ "id" : "f0",
+ "type" : "CallSubStart",
+ "name" : "call(String,String,String)",
+ "config" : {
+ "callSignature" : "call",
+ "input" : {
+ "params" : [
+ { "name" : "plainMsg", "type" : "String" },
+ { "name" : "receiverID", "type" : "String" },
+ { "name" : "lookupType", "type" : "String" }
+ ],
+ "map" : {
+ "out.identifier" : "param.receiverID",
+ "out.plainMessage" : "param.plainMsg"
+ },
+ "code" : [
+ "import util.LookupType;",
+ "",
+ "out.type = LookupType.getByString(param.lookupType);"
+ ]
+ },
+ "result" : {
+ "params" : [
+ { "name" : "apiResponse", "type" : "String" }
+ ],
+ "map" : {
+ "result.apiResponse" : "in.apiResponse"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 40, "y" : 64 }
+ },
+ "connect" : { "id" : "f2", "to" : "f3" }
+ }, {
+ "id" : "f1",
+ "type" : "CallSubEnd",
+ "visual" : {
+ "at" : { "x" : 720, "y" : 64 }
+ }
+ }, {
+ "id" : "f3",
+ "type" : "SubProcessCall",
+ "name" : "util/getReceiverInfo",
+ "config" : {
+ "processCall" : "util/getReceiverInfo:call(threema.connector.receiverData)",
+ "output" : {
+ "map" : {
+ "out" : "result.receiverData"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
+ ],
+ "map" : {
+ "param.receiverData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 184, "y" : 64 }
+ },
+ "connect" : { "id" : "f9", "to" : "f5" }
+ }, {
+ "id" : "f4",
+ "type" : "SubProcessCall",
+ "name" : "util/messageEncryption",
+ "config" : {
+ "processCall" : "util/messageEncryption:call(threema.connector.receiverData)",
+ "output" : {
+ "map" : {
+ "out" : "result.receiverData"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
+ ],
+ "map" : {
+ "param.receiverData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 384, "y" : 64 }
+ },
+ "connect" : { "id" : "f7", "to" : "f6" }
+ }, {
+ "id" : "f6",
+ "type" : "SubProcessCall",
+ "name" : "send",
+ "config" : {
+ "processCall" : "util/sendMessage:call(threema.connector.receiverData)",
+ "output" : {
+ "map" : {
+ "out" : "in",
+ "out.apiResponse" : "result.receiverData.apiResponse"
+ }
+ },
+ "call" : {
+ "params" : [
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
+ ],
+ "map" : {
+ "param.receiverData" : "in"
+ }
+ }
+ },
+ "visual" : {
+ "at" : { "x" : 576, "y" : 64 }
+ },
+ "connect" : { "id" : "f8", "to" : "f1" }
+ }, {
+ "id" : "f5",
+ "type" : "Alternative",
+ "visual" : {
+ "at" : { "x" : 288, "y" : 64 }
+ },
+ "connect" : [
+ { "id" : "f12", "to" : "f1", "via" : [ { "x" : 288, "y" : 144 }, { "x" : 720, "y" : 144 } ], "condition" : "in.apiResponse != \"200\"" },
+ { "id" : "f11", "to" : "f4" }
+ ]
+ } ]
+}
\ No newline at end of file
diff --git a/threema-connector/processes/lookupReceiverInfo.p.json b/threema-connector/processes/util/getReceiverInfo.p.json
similarity index 53%
rename from threema-connector/processes/lookupReceiverInfo.p.json
rename to threema-connector/processes/util/getReceiverInfo.p.json
index 2ff535b..4e7001c 100644
--- a/threema-connector/processes/lookupReceiverInfo.p.json
+++ b/threema-connector/processes/util/getReceiverInfo.p.json
@@ -1,42 +1,43 @@
{
"format" : "10.0.0",
- "id" : "18B1EAB8BACFEBFB",
+ "id" : "18B22C967B82A625",
"kind" : "CALLABLE_SUB",
"config" : {
- "data" : "threema.connector.sendThreemaMessageData"
+ "data" : "threema.connector.receiverData"
},
"elements" : [ {
"id" : "f0",
"type" : "CallSubStart",
- "name" : "call(sendThreemaMessageData)",
+ "name" : "call(receiverData)",
"config" : {
"callSignature" : "call",
"input" : {
"params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
],
"map" : {
- "out" : "param.sendThreemaMessageData"
+ "out" : "param.receiverData",
+ "out.threemaId" : "param.receiverData.identifier"
}
},
"result" : {
"params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
],
"map" : {
- "result.sendThreemaMessageData" : "in"
+ "result.receiverData" : "in"
}
}
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
- "connect" : { "id" : "f2", "to" : "f3" }
+ "connect" : { "id" : "f2", "to" : "f7" }
}, {
"id" : "f1",
"type" : "CallSubEnd",
"visual" : {
- "at" : { "x" : 552, "y" : 64 }
+ "at" : { "x" : 808, "y" : 64 }
}
}, {
"id" : "f3",
@@ -50,21 +51,22 @@
"secret" : "ivy.var.connector_secret",
"from" : "ivy.var.connector_threemaId"
},
- "statusErrorCode" : "ivy:error:rest:client",
+ "statusErrorCode" : ">> Ignore status",
"responseMapping" : {
"out" : "in",
- "out.receiverData.threemaId" : "result"
+ "out.apiResponse" : "response.getStatus().toString()",
+ "out.threemaId" : "result"
},
"templateParams" : {
- "id" : "in.receiverData.identifier",
- "type" : "in.receiverData.type.toString()"
+ "id" : "in.identifier",
+ "type" : "in.type.toString()"
},
"resultType" : "java.lang.String"
},
"visual" : {
- "at" : { "x" : 248, "y" : 64 }
+ "at" : { "x" : 320, "y" : 64 }
},
- "connect" : { "id" : "f4", "to" : "f6" }
+ "connect" : { "id" : "f8", "to" : "f4" }
}, {
"id" : "f6",
"type" : "RestClientCall",
@@ -80,16 +82,36 @@
"statusErrorCode" : "ivy:error:rest:client",
"responseMapping" : {
"out" : "in",
- "out.receiverData.publicKey" : "result"
+ "out.publicKey" : "result"
},
"templateParams" : {
- "threemaId" : "in.receiverData.threemaId"
+ "threemaId" : "in.threemaId"
},
"resultType" : "java.lang.String"
},
"visual" : {
- "at" : { "x" : 416, "y" : 64 }
+ "at" : { "x" : 648, "y" : 64 }
},
"connect" : { "id" : "f5", "to" : "f1" }
+ }, {
+ "id" : "f7",
+ "type" : "Alternative",
+ "visual" : {
+ "at" : { "x" : 176, "y" : 64 }
+ },
+ "connect" : [
+ { "id" : "f10", "to" : "f6", "via" : [ { "x" : 176, "y" : 136 }, { "x" : 648, "y" : 136 } ], "condition" : "in.type == util.LookupType.THREEMAID" },
+ { "id" : "f9", "to" : "f3" }
+ ]
+ }, {
+ "id" : "f4",
+ "type" : "Alternative",
+ "visual" : {
+ "at" : { "x" : 512, "y" : 64 }
+ },
+ "connect" : [
+ { "id" : "f13", "to" : "f1", "via" : [ { "x" : 512, "y" : 0 }, { "x" : 808, "y" : 0 } ], "condition" : "in.apiResponse != \"200\"" },
+ { "id" : "f12", "to" : "f6" }
+ ]
} ]
}
\ No newline at end of file
diff --git a/threema-connector/processes/encryptMessage.p.json b/threema-connector/processes/util/messageEncryption.p.json
similarity index 65%
rename from threema-connector/processes/encryptMessage.p.json
rename to threema-connector/processes/util/messageEncryption.p.json
index 3af62e3..109e977 100644
--- a/threema-connector/processes/encryptMessage.p.json
+++ b/threema-connector/processes/util/messageEncryption.p.json
@@ -1,42 +1,42 @@
{
"format" : "10.0.0",
- "id" : "18B1EAF321633A72",
+ "id" : "18B22CD369A6089F",
"kind" : "CALLABLE_SUB",
"config" : {
- "data" : "threema.connector.sendThreemaMessageData"
+ "data" : "threema.connector.receiverData"
},
"elements" : [ {
"id" : "f0",
"type" : "CallSubStart",
- "name" : "call(sendThreemaMessageData)",
+ "name" : "call(receiverData)",
"config" : {
"callSignature" : "call",
"input" : {
"params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
],
"map" : {
- "out" : "param.sendThreemaMessageData"
+ "out" : "param.receiverData"
}
},
"result" : {
"params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
],
"map" : {
- "result.sendThreemaMessageData" : "in"
+ "result.receiverData" : "in"
}
}
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
- "connect" : { "id" : "f3", "to" : "f2" }
+ "connect" : { "id" : "f4", "to" : "f2" }
}, {
"id" : "f1",
"type" : "CallSubEnd",
"visual" : {
- "at" : { "x" : 408, "y" : 64 }
+ "at" : { "x" : 488, "y" : 64 }
}
}, {
"id" : "f2",
@@ -45,12 +45,13 @@
"config" : {
"output" : {
"code" : [
+ "import util.TypeConverter;",
"import ch.threema.apitool.results.EncryptResult;",
"import ch.threema.apitool.CryptTool;",
"import javax.xml.bind.DatatypeConverter;",
"",
"String privateKey = ivy.var.connector_privateKey;",
- "String publicKey = in.receiverData.publicKey;",
+ "String publicKey = in.publicKey;",
"String msg = in.plainMessage;",
"",
"Array encPrivKey = DatatypeConverter.parseHexBinary(privateKey);",
@@ -60,14 +61,14 @@
"EncryptResult result = tool.encryptTextMessage(msg, encPrivKey, encPubKey);",
"",
"out = in;",
- "out.encryptedMessage = new String(result.getResult());",
- "out.nonce = DatatypeConverter.printHexBinary(result.getNonce());"
+ "out.encryptedMessage = TypeConverter.encode(result.getResult());",
+ "out.nonce = TypeConverter.encode(result.getNonce());"
]
}
},
"visual" : {
"at" : { "x" : 264, "y" : 64 }
},
- "connect" : { "id" : "f4", "to" : "f1" }
+ "connect" : { "id" : "f3", "to" : "f1" }
} ]
}
\ No newline at end of file
diff --git a/threema-connector/processes/sendMessage.p.json b/threema-connector/processes/util/sendMessage.p.json
similarity index 50%
rename from threema-connector/processes/sendMessage.p.json
rename to threema-connector/processes/util/sendMessage.p.json
index 5818413..2a23ee3 100644
--- a/threema-connector/processes/sendMessage.p.json
+++ b/threema-connector/processes/util/sendMessage.p.json
@@ -1,57 +1,55 @@
{
"format" : "10.0.0",
- "id" : "18B1EB743B2E7969",
+ "id" : "18B22CED0FA1555D",
"kind" : "CALLABLE_SUB",
"config" : {
- "data" : "threema.connector.sendThreemaMessageData"
+ "data" : "threema.connector.receiverData"
},
"elements" : [ {
"id" : "f0",
"type" : "CallSubStart",
- "name" : "call(sendThreemaMessageData)",
+ "name" : "call(receiverData)",
"config" : {
"callSignature" : "call",
"input" : {
"params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
],
"map" : {
- "out" : "param.sendThreemaMessageData"
+ "out" : "param.receiverData"
}
},
"result" : {
"params" : [
- { "name" : "sendThreemaMessageData", "type" : "threema.connector.sendThreemaMessageData" }
+ { "name" : "receiverData", "type" : "threema.connector.receiverData" }
],
"map" : {
- "result.sendThreemaMessageData" : "in"
+ "result.receiverData" : "in"
}
}
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
- "connect" : { "id" : "f3", "to" : "f2" }
+ "connect" : { "id" : "f4", "to" : "f2" }
}, {
"id" : "f1",
"type" : "CallSubEnd",
"visual" : {
- "at" : { "x" : 424, "y" : 64 }
+ "at" : { "x" : 520, "y" : 64 }
}
}, {
"id" : "f2",
"type" : "RestClientCall",
"name" : "sendMessage",
"config" : {
- "bodyRaw" : [
- "import static util.TypeConverter.*;",
- "{",
- " from: <%=ivy.var.connector_threemaId%>,",
- " to: <%=in.receiverData.threemaId%>,",
- " nonce: <%=decode()%>,",
- " box: <%=in.encryptedMessage%>",
- "}"
- ],
+ "bodyForm" : {
+ "from" : "ivy.var.connector_threemaId",
+ "to" : "in.threemaId",
+ "nonce" : "in.nonce",
+ "box" : "in.encryptedMessage",
+ "secret" : "ivy.var.connector_secret"
+ },
"path" : "send_e2e",
"clientId" : "af315689-b538-4142-a823-0632d66754d7",
"clientErrorCode" : "ivy:error:rest:client",
@@ -59,14 +57,15 @@
"statusErrorCode" : "ivy:error:rest:client",
"responseMapping" : {
"out" : "in",
- "out.apiResponse" : "result"
+ "out.apiResponse" : "response.getStatus() == 200 ? \"Sent successfully (\" + response.getStatus() + \")\" : \"Error (\" + response.getStatus() + \")\""
},
"resultType" : "java.lang.String",
- "bodyInputType" : "RAW"
+ "bodyInputType" : "FORM",
+ "bodyMediaType" : "application/x-www-form-urlencoded"
},
"visual" : {
- "at" : { "x" : 248, "y" : 64 }
+ "at" : { "x" : 320, "y" : 64 }
},
- "connect" : { "id" : "f4", "to" : "f1" }
+ "connect" : { "id" : "f3", "to" : "f1" }
} ]
}
\ No newline at end of file
diff --git a/threema-connector/src/util/LocalPropHandler.java b/threema-connector/src/util/LocalPropHandler.java
deleted file mode 100644
index 7357e8d..0000000
--- a/threema-connector/src/util/LocalPropHandler.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package util;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-public class LocalPropHandler {
-
- public static String getProperty(String name) {
- try (InputStream input = new FileInputStream("src/resources/config.properties")) {
- Properties props = new Properties();
- props.load(input);
- return props.getProperty(name, "Empty");
- } catch (IOException e) {
- e.printStackTrace();
- }
- return "Property not found";
- }
-}
diff --git a/threema-connector/src/util/LookupType.java b/threema-connector/src/util/LookupType.java
index 3142e78..9400eaa 100644
--- a/threema-connector/src/util/LookupType.java
+++ b/threema-connector/src/util/LookupType.java
@@ -4,6 +4,7 @@
public enum LookupType {
PHONE,
EMAIL,
+ THREEMAID,
INVALID;
@Override
@@ -15,7 +16,20 @@ public static LookupType getByString(String id) {
return switch(id) {
case "phone" -> LookupType.PHONE;
case "email" -> LookupType.EMAIL;
+ case "threemaId" -> LookupType.THREEMAID;
default -> LookupType.INVALID;
};
}
+
+ public static LookupType getByPattern(String id) {
+ LookupType type = LookupType.INVALID;
+ if(id.lastIndexOf('@') < id.lastIndexOf('.')){
+ type = LookupType.EMAIL;
+ }else if(id.matches("\\d{11}")) {
+ type = LookupType.PHONE;
+ }else {
+ type = LookupType.THREEMAID;
+ }
+ return type;
+ }
}
diff --git a/threema-connector/src/util/TypeConverter.java b/threema-connector/src/util/TypeConverter.java
index 138327f..46dea7e 100644
--- a/threema-connector/src/util/TypeConverter.java
+++ b/threema-connector/src/util/TypeConverter.java
@@ -7,7 +7,7 @@ public static String encode(byte[] data) {
return DatatypeConverter.printHexBinary(data);
}
- public static byte[] decode(String data) {
+ public byte[] decode(String data) {
return DatatypeConverter.parseHexBinary(data);
}
}
From 0c667ea862a06b16423c8d8e26818a15af28a80d Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Thu, 12 Oct 2023 15:41:04 +0200
Subject: [PATCH 17/75] added test for LookupType Enum
---
.../connector/test/util/LookupTypeTest.java | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 threema-connector-test/src_test/threema/connector/test/util/LookupTypeTest.java
diff --git a/threema-connector-test/src_test/threema/connector/test/util/LookupTypeTest.java b/threema-connector-test/src_test/threema/connector/test/util/LookupTypeTest.java
new file mode 100644
index 0000000..391a21e
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/util/LookupTypeTest.java
@@ -0,0 +1,51 @@
+package threema.connector.test.util;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import org.junit.jupiter.api.Test;
+import util.LookupType;
+
+public class LookupTypeTest {
+
+ @Test
+ void getTypeByString() {
+ String email = "email";
+ String phone = "phone";
+ String threemaId = "threemaId";
+ String invalid1 = "invalidType1";
+ String invalid2 = "invalidType2";
+
+ LookupType typeEmail = LookupType.getByString(email);
+ assertThat(typeEmail).isEqualTo(LookupType.EMAIL);
+
+ LookupType typePhone = LookupType.getByString(phone);
+ assertThat(typePhone).isEqualTo(LookupType.PHONE);
+
+ LookupType typeThreemaId = LookupType.getByString(threemaId);
+ assertThat(typeThreemaId).isEqualTo(LookupType.THREEMAID);
+
+ LookupType typeInvalid1 = LookupType.getByString(invalid1);
+ assertThat(typeInvalid1).isEqualTo(LookupType.INVALID);
+
+ LookupType typeInvalid2 = LookupType.getByString(invalid2);
+ assertThat(typeInvalid2).isEqualTo(LookupType.INVALID);
+
+ }
+
+ @Test
+ void getTypebyPattern() {
+ String email = "xyz@xyz.yz";
+ String phone = "00000000000";
+ String threemaId = "didegiasdfl";
+
+ LookupType typeEmail = LookupType.getByPattern(email);
+ assertThat(typeEmail).isEqualTo(LookupType.EMAIL);
+
+ LookupType typePhone = LookupType.getByPattern(phone);
+ assertThat(typePhone).isEqualTo(LookupType.PHONE);
+
+ LookupType typeThreemaId = LookupType.getByPattern(threemaId);
+ assertThat(typeThreemaId).isEqualTo(LookupType.THREEMAID);
+
+ }
+
+}
From db5046f7f59872cbefddae516eb6c1284104a841 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Thu, 12 Oct 2023 15:41:39 +0200
Subject: [PATCH 18/75] removed unneeded classes added descriptions
---
.../connector/test/MsgHandlerTest.java | 39 ------------
.../processes/multipleRecipients.p.json | 5 +-
.../processes/singleRecipient.p.json | 22 ++++---
.../processes/util/getReceiverInfo.p.json | 13 +++-
.../processes/util/sendMessage.p.json | 6 +-
.../src/apiConnection/Connector.java | 61 -------------------
.../src/apiConnection/MsgHandler.java | 32 ----------
threema-connector/src/util/TypeConverter.java | 13 ----
8 files changed, 32 insertions(+), 159 deletions(-)
delete mode 100644 threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java
delete mode 100644 threema-connector/src/apiConnection/Connector.java
delete mode 100644 threema-connector/src/apiConnection/MsgHandler.java
delete mode 100644 threema-connector/src/util/TypeConverter.java
diff --git a/threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java b/threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java
deleted file mode 100644
index 82fdb84..0000000
--- a/threema-connector-test/src_test/threema/connector/test/MsgHandlerTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package threema.connector.test;
-
-import static apiConnection.MsgHandler.encryptMessage;
-import static apiConnection.MsgHandler.genKeyPair;
-import static org.assertj.core.api.Assertions.assertThat;
-import javax.xml.bind.DatatypeConverter;
-import org.junit.jupiter.api.Test;
-
-public class MsgHandlerTest {
-
- @Test
- public void generateKeys() {
-
- String key = "7858e5cadef8f3109ad19f28595eef3683803554830eb4cfe1d85db7093134a4";
- byte[] enc = DatatypeConverter.parseHexBinary(key);
-
-
- System.out.println(enc.length);
-
-
- byte[][] keys = genKeyPair();
- assertThat(keys.length).isEqualTo(2);
- System.out.println(keys[0].length);
- byte[] privKey = keys[0];
- byte[] pubKey = keys[1];
- assertThat(privKey).isNotEmpty();
- assertThat(pubKey).isNotEmpty();
- }
-
- @Test
- public void encryptMsg() {
- String plainMsg = "Hello World";
- byte[][] keys = genKeyPair();
- byte[] privKey = keys[0];
- byte[] pubKey = keys[1];
- String encryptedMsg = encryptMessage(plainMsg, privKey, pubKey);
- assertThat(encryptedMsg).isNotBlank();
- }
-}
\ No newline at end of file
diff --git a/threema-connector/processes/multipleRecipients.p.json b/threema-connector/processes/multipleRecipients.p.json
index 6f2aea2..b124261 100644
--- a/threema-connector/processes/multipleRecipients.p.json
+++ b/threema-connector/processes/multipleRecipients.p.json
@@ -32,7 +32,10 @@
},
"visual" : {
"at" : { "x" : 96, "y" : 64 },
- "description" : "Subprocess to create receiverData for each recipient"
+ "description" : [
+ "Subprocess to handle sending messages to multiple recipients",
+ "Requires a list of recipients and the unencrypted message"
+ ]
},
"connect" : { "id" : "f3", "to" : "f2" }
}, {
diff --git a/threema-connector/processes/singleRecipient.p.json b/threema-connector/processes/singleRecipient.p.json
index ce3f0ac..7438c84 100644
--- a/threema-connector/processes/singleRecipient.p.json
+++ b/threema-connector/processes/singleRecipient.p.json
@@ -37,7 +37,8 @@
}
},
"visual" : {
- "at" : { "x" : 40, "y" : 64 }
+ "at" : { "x" : 40, "y" : 64 },
+ "description" : "Subprocess to handle sending an encrypted message"
},
"connect" : { "id" : "f2", "to" : "f3" }
}, {
@@ -49,7 +50,7 @@
}, {
"id" : "f3",
"type" : "SubProcessCall",
- "name" : "util/getReceiverInfo",
+ "name" : "getReceiverInfo",
"config" : {
"processCall" : "util/getReceiverInfo:call(threema.connector.receiverData)",
"output" : {
@@ -67,13 +68,14 @@
}
},
"visual" : {
- "at" : { "x" : 184, "y" : 64 }
+ "at" : { "x" : 184, "y" : 64 },
+ "description" : "lookup receiver info (threemaId & public key)"
},
"connect" : { "id" : "f9", "to" : "f5" }
}, {
"id" : "f4",
"type" : "SubProcessCall",
- "name" : "util/messageEncryption",
+ "name" : "messageEncryption",
"config" : {
"processCall" : "util/messageEncryption:call(threema.connector.receiverData)",
"output" : {
@@ -91,7 +93,8 @@
}
},
"visual" : {
- "at" : { "x" : 384, "y" : 64 }
+ "at" : { "x" : 384, "y" : 64 },
+ "description" : "encrypt the message with receivers public key"
},
"connect" : { "id" : "f7", "to" : "f6" }
}, {
@@ -116,7 +119,8 @@
}
},
"visual" : {
- "at" : { "x" : 576, "y" : 64 }
+ "at" : { "x" : 576, "y" : 64 },
+ "description" : "send the encrypted message"
},
"connect" : { "id" : "f8", "to" : "f1" }
}, {
@@ -126,7 +130,11 @@
"at" : { "x" : 288, "y" : 64 }
},
"connect" : [
- { "id" : "f12", "to" : "f1", "via" : [ { "x" : 288, "y" : 144 }, { "x" : 720, "y" : 144 } ], "condition" : "in.apiResponse != \"200\"" },
+ { "id" : "f12", "to" : "f1", "via" : [ { "x" : 288, "y" : 144 }, { "x" : 720, "y" : 144 } ], "label" : {
+ "name" : "Skip if lookup failed",
+ "segment" : 0.5,
+ "offset" : { "x" : 217, "y" : 30 }
+ }, "condition" : "in.apiResponse != \"200\"" },
{ "id" : "f11", "to" : "f4" }
]
} ]
diff --git a/threema-connector/processes/util/getReceiverInfo.p.json b/threema-connector/processes/util/getReceiverInfo.p.json
index 4e7001c..130f778 100644
--- a/threema-connector/processes/util/getReceiverInfo.p.json
+++ b/threema-connector/processes/util/getReceiverInfo.p.json
@@ -79,9 +79,10 @@
"from" : "ivy.var.connector_threemaId",
"secret" : "ivy.var.connector_secret"
},
- "statusErrorCode" : "ivy:error:rest:client",
+ "statusErrorCode" : ">> Ignore status",
"responseMapping" : {
"out" : "in",
+ "out.apiResponse" : "response.getStatus().toString();",
"out.publicKey" : "result"
},
"templateParams" : {
@@ -100,7 +101,11 @@
"at" : { "x" : 176, "y" : 64 }
},
"connect" : [
- { "id" : "f10", "to" : "f6", "via" : [ { "x" : 176, "y" : 136 }, { "x" : 648, "y" : 136 } ], "condition" : "in.type == util.LookupType.THREEMAID" },
+ { "id" : "f10", "to" : "f6", "via" : [ { "x" : 176, "y" : 136 }, { "x" : 648, "y" : 136 } ], "label" : {
+ "name" : "Skip if ThreemaID is known",
+ "segment" : 2.14,
+ "offset" : { "x" : -224, "y" : 7 }
+ }, "condition" : "in.type == util.LookupType.THREEMAID" },
{ "id" : "f9", "to" : "f3" }
]
}, {
@@ -110,7 +115,9 @@
"at" : { "x" : 512, "y" : 64 }
},
"connect" : [
- { "id" : "f13", "to" : "f1", "via" : [ { "x" : 512, "y" : 0 }, { "x" : 808, "y" : 0 } ], "condition" : "in.apiResponse != \"200\"" },
+ { "id" : "f13", "to" : "f1", "via" : [ { "x" : 512, "y" : 0 }, { "x" : 808, "y" : 0 } ], "label" : {
+ "name" : "Skip if lookup failed"
+ }, "condition" : "in.apiResponse != \"200\"" },
{ "id" : "f12", "to" : "f6" }
]
} ]
diff --git a/threema-connector/processes/util/sendMessage.p.json b/threema-connector/processes/util/sendMessage.p.json
index 2a23ee3..ebf18da 100644
--- a/threema-connector/processes/util/sendMessage.p.json
+++ b/threema-connector/processes/util/sendMessage.p.json
@@ -36,7 +36,7 @@
"id" : "f1",
"type" : "CallSubEnd",
"visual" : {
- "at" : { "x" : 520, "y" : 64 }
+ "at" : { "x" : 424, "y" : 64 }
}
}, {
"id" : "f2",
@@ -54,7 +54,7 @@
"clientId" : "af315689-b538-4142-a823-0632d66754d7",
"clientErrorCode" : "ivy:error:rest:client",
"method" : "POST",
- "statusErrorCode" : "ivy:error:rest:client",
+ "statusErrorCode" : ">> Ignore status",
"responseMapping" : {
"out" : "in",
"out.apiResponse" : "response.getStatus() == 200 ? \"Sent successfully (\" + response.getStatus() + \")\" : \"Error (\" + response.getStatus() + \")\""
@@ -64,7 +64,7 @@
"bodyMediaType" : "application/x-www-form-urlencoded"
},
"visual" : {
- "at" : { "x" : 320, "y" : 64 }
+ "at" : { "x" : 264, "y" : 64 }
},
"connect" : { "id" : "f3", "to" : "f1" }
} ]
diff --git a/threema-connector/src/apiConnection/Connector.java b/threema-connector/src/apiConnection/Connector.java
deleted file mode 100644
index 278094f..0000000
--- a/threema-connector/src/apiConnection/Connector.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package apiConnection;
-
-import ch.threema.apitool.APIConnector;
-import ch.threema.apitool.PublicKeyStore;
-import ch.threema.apitool.exceptions.ApiException;
-import ch.threema.apitool.utils.ApiResponse;
-
-public class Connector {
- private String threemaId;
- private String secret;
- private String privateKey;
- private String publicKey;
- private APIConnector tool;
-
- /*
- * th.id=*IVYDEV0
- * th.secret=riQNL7ajASmLCHD9
- * th.privateKey=7858e5cadef8f3109ad19f28595eef3683803554830eb4cfe1d85db7093134a4
- * th.publicKey=7b60359098863205c544865726e22396e2603c
- */
-
- public Connector(){
- /*
- threemaId = getProperty("th.id");
- secret = getProperty("th.secret");
- privateKey = getProperty("th.privateKey");
- publicKey = getProperty("th.publicKey");
- */
- threemaId = "*IVYDEV0";
- secret = "riQNL7ajASmLCHD9";
- privateKey = "7858e5cadef8f3109ad19f28595eef3683803554830eb4cfe1d85db7093134a4";
- publicKey = "7b60359098863205c544865726e22396e2603c";
- tool = new APIConnector(threemaId, secret, new PublicKeyStore() {
- @Override
- protected byte[] fetchPublicKey(String id) {
- //TODO: Implementation
- return null;
- }
-
- @Override
- protected void save(String id, byte[] pubKey) {
- //TODO: Implementation
- }
- });
- }
-
- public String getID(String email) {
- String id = "not found";
- ApiResponse resp = null;
- try {
- resp = tool.lookupEmail(email);
- id = resp.getData();
- }catch(ApiException e) {
- String cause = e.getMessage();
- System.out.println(cause);
-
- }
- return id;
- }
-
-}
\ No newline at end of file
diff --git a/threema-connector/src/apiConnection/MsgHandler.java b/threema-connector/src/apiConnection/MsgHandler.java
deleted file mode 100644
index e5399c0..0000000
--- a/threema-connector/src/apiConnection/MsgHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package apiConnection;
-
-import static ch.threema.apitool.CryptTool.*;
-import ch.threema.apitool.results.EncryptResult;
-
-public class MsgHandler {
-
- private static String tempId = "9UVR49KD"; // Threema ID Fabian Heuberger
-
- /**
- * Function to encrypt TextMessage
- * @param msg Message to encrypt
- * @param privateKey Private key of the sender
- * @param publicKey Public key of the recipient
- * @return
- */
- public static String encryptMessage(String msg, byte[] privateKey, byte[] publicKey) {
- EncryptResult result = encryptTextMessage(msg, privateKey, publicKey);
- return result.getResult().toString();
- }
-
- /**
- * Function to generate keyPair
- * @return private key and public key wrappend in byte[]
- */
- public static byte[][] genKeyPair() {
- byte[] privByte = new byte[32];
- byte[] pubByte = new byte[32];
- generateKeyPair(privByte, pubByte);
- return new byte[][] {privByte, pubByte};
- }
-}
diff --git a/threema-connector/src/util/TypeConverter.java b/threema-connector/src/util/TypeConverter.java
deleted file mode 100644
index 46dea7e..0000000
--- a/threema-connector/src/util/TypeConverter.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package util;
-
-import javax.xml.bind.DatatypeConverter;
-
-public class TypeConverter {
- public static String encode(byte[] data) {
- return DatatypeConverter.printHexBinary(data);
- }
-
- public byte[] decode(String data) {
- return DatatypeConverter.parseHexBinary(data);
- }
-}
From b163a57d30d0059df7dd3f38caa62de9667a5b8a Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Thu, 12 Oct 2023 15:45:42 +0200
Subject: [PATCH 19/75] renamed product folder
---
threema-connector-product/README.md | 15 ++++++
threema-connector-product/pom.xml | 67 ++++++++++++++++++++++++
threema-connector-product/product.json | 70 ++++++++++++++++++++++++++
threema-connector-product/zip.xml | 26 ++++++++++
4 files changed, 178 insertions(+)
create mode 100644 threema-connector-product/README.md
create mode 100644 threema-connector-product/pom.xml
create mode 100644 threema-connector-product/product.json
create mode 100644 threema-connector-product/zip.xml
diff --git a/threema-connector-product/README.md b/threema-connector-product/README.md
new file mode 100644
index 0000000..ee9062a
--- /dev/null
+++ b/threema-connector-product/README.md
@@ -0,0 +1,15 @@
+# MY-PRODUCT-NAME
+
+YOUR DESCRIPTION GOES HERE
+
+## Demo
+
+YOUR DEMO DESCRIPTION GOES HERE
+
+## Setup
+
+YOUR SETUP DESCRIPTION GOES HERE
+
+```
+@variables.yaml@
+```
\ No newline at end of file
diff --git a/threema-connector-product/pom.xml b/threema-connector-product/pom.xml
new file mode 100644
index 0000000..8978530
--- /dev/null
+++ b/threema-connector-product/pom.xml
@@ -0,0 +1,67 @@
+
+ 4.0.0
+ com.axonivy.market
+ MY-PRODUCT-NAME-product
+ 10.0.0-SNAPSHOT
+ pom
+
+
+ ../threema-connector/config/variables.yaml
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+ 3.3.0
+
+
+ package
+
+ single
+
+
+ false
+
+ zip.xml
+
+
+
+
+
+
+ maven-antrun-plugin
+ 1.7
+
+
+ generate-sources
+
+ ${skip-readme}
+
+
+
+
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.0.0-M1
+
+
+
+
+
diff --git a/threema-connector-product/product.json b/threema-connector-product/product.json
new file mode 100644
index 0000000..a5a4b33
--- /dev/null
+++ b/threema-connector-product/product.json
@@ -0,0 +1,70 @@
+{
+ "$schema": "https://json-schema.axonivy.com/market/10.0.0/product.json",
+ "installers": [
+ {
+ "id": "maven-import",
+ "data": {
+ "projects": [
+ {
+ "groupId": "MY-GROUP-ID",
+ "artifactId": "MY-PRODUCT-NAME-demo",
+ "version": "${version}",
+ "type": "iar"
+ }
+ ],
+ "repositories": [
+ {
+ "id": "maven.axonivy.com",
+ "url": "https://maven.axonivy.com",
+ "snapshots": {
+ "enabled": "true"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "id": "maven-dependency",
+ "data": {
+ "dependencies": [
+ {
+ "groupId": "MY-GROUP-ID",
+ "artifactId": "MY-PRODUCT-NAME",
+ "version": "${version}",
+ "type": "iar"
+ }
+ ],
+ "repositories": [
+ {
+ "id": "maven.axonivy.com",
+ "url": "https://maven.axonivy.com",
+ "snapshots": {
+ "enabled": "true"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "id": "maven-dropins",
+ "data": {
+ "dependencies": [
+ {
+ "groupId": "MY-GROUP-ID",
+ "artifactId": "MY-PRODUCT-NAME",
+ "version": "${version}"
+ }
+ ],
+ "repositories": [
+ {
+ "id": "maven.axonivy.com",
+ "url": "https://maven.axonivy.com",
+ "snapshots": {
+ "enabled": "true"
+ }
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/threema-connector-product/zip.xml b/threema-connector-product/zip.xml
new file mode 100644
index 0000000..003f06c
--- /dev/null
+++ b/threema-connector-product/zip.xml
@@ -0,0 +1,26 @@
+
+ zip
+ false
+
+
+ zip
+
+
+
+
+ .
+
+ product.json
+ openapi.json
+ **/*.png
+
+
+
+ target
+ /
+
+ README.md
+
+
+
+
From ff7117cc2672032a6e393cc92517be44486886d4 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Thu, 12 Oct 2023 15:47:17 +0200
Subject: [PATCH 20/75] removed old product folder
---
MY-PRODUCT-NAME-product/README.md | 15 ------
MY-PRODUCT-NAME-product/pom.xml | 67 --------------------------
MY-PRODUCT-NAME-product/product.json | 70 ----------------------------
MY-PRODUCT-NAME-product/zip.xml | 26 -----------
4 files changed, 178 deletions(-)
delete mode 100644 MY-PRODUCT-NAME-product/README.md
delete mode 100644 MY-PRODUCT-NAME-product/pom.xml
delete mode 100644 MY-PRODUCT-NAME-product/product.json
delete mode 100644 MY-PRODUCT-NAME-product/zip.xml
diff --git a/MY-PRODUCT-NAME-product/README.md b/MY-PRODUCT-NAME-product/README.md
deleted file mode 100644
index ee9062a..0000000
--- a/MY-PRODUCT-NAME-product/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# MY-PRODUCT-NAME
-
-YOUR DESCRIPTION GOES HERE
-
-## Demo
-
-YOUR DEMO DESCRIPTION GOES HERE
-
-## Setup
-
-YOUR SETUP DESCRIPTION GOES HERE
-
-```
-@variables.yaml@
-```
\ No newline at end of file
diff --git a/MY-PRODUCT-NAME-product/pom.xml b/MY-PRODUCT-NAME-product/pom.xml
deleted file mode 100644
index dd59011..0000000
--- a/MY-PRODUCT-NAME-product/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
- 4.0.0
- com.axonivy.market
- MY-PRODUCT-NAME-product
- 10.0.0-SNAPSHOT
- pom
-
-
- ../MY-PRODUCT-NAME/config/variables.yaml
-
-
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
- 3.3.0
-
-
- package
-
- single
-
-
- false
-
- zip.xml
-
-
-
-
-
-
- maven-antrun-plugin
- 1.7
-
-
- generate-sources
-
- ${skip-readme}
-
-
-
-
-
-
-
-
-
-
- run
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- 3.0.0-M1
-
-
-
-
-
diff --git a/MY-PRODUCT-NAME-product/product.json b/MY-PRODUCT-NAME-product/product.json
deleted file mode 100644
index a5a4b33..0000000
--- a/MY-PRODUCT-NAME-product/product.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "$schema": "https://json-schema.axonivy.com/market/10.0.0/product.json",
- "installers": [
- {
- "id": "maven-import",
- "data": {
- "projects": [
- {
- "groupId": "MY-GROUP-ID",
- "artifactId": "MY-PRODUCT-NAME-demo",
- "version": "${version}",
- "type": "iar"
- }
- ],
- "repositories": [
- {
- "id": "maven.axonivy.com",
- "url": "https://maven.axonivy.com",
- "snapshots": {
- "enabled": "true"
- }
- }
- ]
- }
- },
- {
- "id": "maven-dependency",
- "data": {
- "dependencies": [
- {
- "groupId": "MY-GROUP-ID",
- "artifactId": "MY-PRODUCT-NAME",
- "version": "${version}",
- "type": "iar"
- }
- ],
- "repositories": [
- {
- "id": "maven.axonivy.com",
- "url": "https://maven.axonivy.com",
- "snapshots": {
- "enabled": "true"
- }
- }
- ]
- }
- },
- {
- "id": "maven-dropins",
- "data": {
- "dependencies": [
- {
- "groupId": "MY-GROUP-ID",
- "artifactId": "MY-PRODUCT-NAME",
- "version": "${version}"
- }
- ],
- "repositories": [
- {
- "id": "maven.axonivy.com",
- "url": "https://maven.axonivy.com",
- "snapshots": {
- "enabled": "true"
- }
- }
- ]
- }
- }
- ]
-}
diff --git a/MY-PRODUCT-NAME-product/zip.xml b/MY-PRODUCT-NAME-product/zip.xml
deleted file mode 100644
index 003f06c..0000000
--- a/MY-PRODUCT-NAME-product/zip.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
- zip
- false
-
-
- zip
-
-
-
-
- .
-
- product.json
- openapi.json
- **/*.png
-
-
-
- target
- /
-
- README.md
-
-
-
-
From bd5dfaa7b259185f9aa7da62ed402e07e99cf4cb Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Thu, 12 Oct 2023 16:45:29 +0200
Subject: [PATCH 21/75] added test for messageEncryption process
---
.../connector/test/EncryptionTest.java | 24 ---------
.../connector/test/MessageEncryptiontest.java | 53 +++++++++++++++++++
threema-connector/pom.xml | 13 ++---
.../processes/util/messageEncryption.p.json | 9 ++--
4 files changed, 64 insertions(+), 35 deletions(-)
delete mode 100644 threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
create mode 100644 threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
diff --git a/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java b/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
deleted file mode 100644
index 9b3bf94..0000000
--- a/threema-connector-test/src_test/threema/connector/test/EncryptionTest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package threema.connector.test;
-
-import org.junit.jupiter.api.Test;
-import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
-import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
-import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
-import threema.connector.receiverData;
-import threema.connector.sendThreemaMessageData;
-
-@IvyProcessTest
-public class EncryptionTest {
- private static final BpmProcess GET_ENCRYPTION_PROCESS = BpmProcess.path("encrptMessage");
- private static final BpmElement GET_ENCRYPTION_START = GET_ENCRYPTION_PROCESS.elementName("call(sendThreemaMessageData)");
-
- @Test
- void encryptMessage() {
- sendThreemaMessageData msgData = new sendThreemaMessageData();
- receiverData recData = new receiverData();
-
-
-
- }
-
-}
diff --git a/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java b/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
new file mode 100644
index 0000000..624aa9e
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
@@ -0,0 +1,53 @@
+package threema.connector.test;
+
+
+import static org.assertj.core.api.Assertions.assertThat;
+import javax.xml.bind.DatatypeConverter;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
+import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
+import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
+import ch.ivyteam.ivy.environment.Ivy;
+import ch.threema.apitool.CryptTool;
+import threema.connector.receiverData;
+
+@IvyProcessTest
+public class MessageEncryptiontest {
+ private static final BpmProcess GET_ENCRYPTION_PROCESS = BpmProcess.path("messageEncryption");
+
+ private static String publicKey;
+ private static String privateKey;
+
+ @BeforeAll
+ void generateKeys() {
+ byte[] privateKeyBytes = new byte[32];
+ byte[] publicKeyBytes = new byte[32];
+
+ CryptTool.generateKeyPair(privateKeyBytes, publicKeyBytes);
+ privateKey = DatatypeConverter.printHexBinary(privateKeyBytes);
+ publicKey = DatatypeConverter.printHexBinary(publicKeyBytes);
+
+ Ivy.log().debug(privateKey);
+ }
+
+ @Test
+ void encryptMessage(BpmClient bpmClient) {
+ Ivy.log().debug("are you running");
+ BpmElement callable = GET_ENCRYPTION_PROCESS.elementName("call(receiverData)");
+ receiverData recData = new receiverData();
+ recData.setPlainMessage("Hello World");
+ recData.setPublicKey(publicKey);
+
+
+ ExecutionResult result = bpmClient.start().subProcess(callable).execute(recData);
+ receiverData resultData = result.data().last();
+ assertThat(resultData.getEncryptedMessage()).isNotEmpty();
+
+
+
+ }
+
+}
diff --git a/threema-connector/pom.xml b/threema-connector/pom.xml
index f7d2d15..a208e68 100644
--- a/threema-connector/pom.xml
+++ b/threema-connector/pom.xml
@@ -8,12 +8,13 @@
iar
-
- ch.threema.apitool
- msgapi-sdk-java
- 2.0.0
-
-
+
+ ch.threema.apitool
+ msgapi-sdk-java
+ 2.0.0
+
+
+
diff --git a/threema-connector/processes/util/messageEncryption.p.json b/threema-connector/processes/util/messageEncryption.p.json
index 109e977..b42caae 100644
--- a/threema-connector/processes/util/messageEncryption.p.json
+++ b/threema-connector/processes/util/messageEncryption.p.json
@@ -36,7 +36,7 @@
"id" : "f1",
"type" : "CallSubEnd",
"visual" : {
- "at" : { "x" : 488, "y" : 64 }
+ "at" : { "x" : 480, "y" : 64 }
}
}, {
"id" : "f2",
@@ -45,7 +45,6 @@
"config" : {
"output" : {
"code" : [
- "import util.TypeConverter;",
"import ch.threema.apitool.results.EncryptResult;",
"import ch.threema.apitool.CryptTool;",
"import javax.xml.bind.DatatypeConverter;",
@@ -61,13 +60,13 @@
"EncryptResult result = tool.encryptTextMessage(msg, encPrivKey, encPubKey);",
"",
"out = in;",
- "out.encryptedMessage = TypeConverter.encode(result.getResult());",
- "out.nonce = TypeConverter.encode(result.getNonce());"
+ "out.encryptedMessage = DatatypeConverter.printHexBinary(result.getResult());",
+ "out.nonce = DatatypeConverter.printHexBinary(result.getNonce());"
]
}
},
"visual" : {
- "at" : { "x" : 264, "y" : 64 }
+ "at" : { "x" : 288, "y" : 64 }
},
"connect" : { "id" : "f3", "to" : "f1" }
} ]
From 9ee25f684a6472f443bb362e3f81caa89e80fa2c Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 10:03:23 +0200
Subject: [PATCH 22/75] added test for messageEncryptioadded test for
messageEncryptionn
---
.../connector/test/MessageEncryptiontest.java | 33 ++++---------------
1 file changed, 7 insertions(+), 26 deletions(-)
diff --git a/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java b/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
index 624aa9e..b73af6b 100644
--- a/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
+++ b/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
@@ -2,52 +2,33 @@
import static org.assertj.core.api.Assertions.assertThat;
-import javax.xml.bind.DatatypeConverter;
-import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
-import ch.ivyteam.ivy.environment.Ivy;
-import ch.threema.apitool.CryptTool;
import threema.connector.receiverData;
@IvyProcessTest
public class MessageEncryptiontest {
- private static final BpmProcess GET_ENCRYPTION_PROCESS = BpmProcess.path("messageEncryption");
+ private final static BpmProcess ENCRYPTION_PROCESS = BpmProcess.name("messageEncryption");
+ private final static String PUBLIC_KEY = "ffbb40cfced42f75c4d83c7d35300c0698bf3ef1ab49ace323a1bbc38ee23f36";
+ private final static String PRIVATE_KEY = "ff364c727068fd6e3e6a711918393fa37649d902402a8eb31af108e79f625d82";
- private static String publicKey;
- private static String privateKey;
-
- @BeforeAll
- void generateKeys() {
- byte[] privateKeyBytes = new byte[32];
- byte[] publicKeyBytes = new byte[32];
-
- CryptTool.generateKeyPair(privateKeyBytes, publicKeyBytes);
- privateKey = DatatypeConverter.printHexBinary(privateKeyBytes);
- publicKey = DatatypeConverter.printHexBinary(publicKeyBytes);
-
- Ivy.log().debug(privateKey);
- }
@Test
void encryptMessage(BpmClient bpmClient) {
- Ivy.log().debug("are you running");
- BpmElement callable = GET_ENCRYPTION_PROCESS.elementName("call(receiverData)");
+ BpmElement callable = ENCRYPTION_PROCESS.elementName("call(receiverData)");
+
receiverData recData = new receiverData();
recData.setPlainMessage("Hello World");
- recData.setPublicKey(publicKey);
+ recData.setPublicKey(PUBLIC_KEY);
ExecutionResult result = bpmClient.start().subProcess(callable).execute(recData);
receiverData resultData = result.data().last();
- assertThat(resultData.getEncryptedMessage()).isNotEmpty();
-
-
+ assertThat(resultData.getEncryptedMessage()).isNotEmpty();
}
-
}
From 58da7bdd6a050bf2382c9e0d127de14107ea368d Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 10:31:38 +0200
Subject: [PATCH 23/75] removed maven dependency and changed classpath to use
lib folder
---
threema-connector/.classpath | 2 +-
threema-connector/pom.xml | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/threema-connector/.classpath b/threema-connector/.classpath
index beb8873..92dce2f 100644
--- a/threema-connector/.classpath
+++ b/threema-connector/.classpath
@@ -28,6 +28,6 @@
-
+
diff --git a/threema-connector/pom.xml b/threema-connector/pom.xml
index a208e68..b83b9ee 100644
--- a/threema-connector/pom.xml
+++ b/threema-connector/pom.xml
@@ -7,6 +7,7 @@
10.0.0-SNAPSHOT
iar
+
From e9815a0028d928a0859bdfd9a3bcd4a1dbbd6994 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 11:09:00 +0200
Subject: [PATCH 24/75] added threema library to classpath
---
threema-connector-test/.classpath | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/threema-connector-test/.classpath b/threema-connector-test/.classpath
index 106dc80..7d6b6e2 100644
--- a/threema-connector-test/.classpath
+++ b/threema-connector-test/.classpath
@@ -15,21 +15,26 @@
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
From 4aa9a876691c3051476e6d05823807378a12b733 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 11:09:21 +0200
Subject: [PATCH 25/75] added decryption to test
---
threema-connector-test/config/variables.yaml | 10 +++---
.../connector/test/MessageEncryptiontest.java | 34 -------------------
2 files changed, 5 insertions(+), 39 deletions(-)
delete mode 100644 threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
diff --git a/threema-connector-test/config/variables.yaml b/threema-connector-test/config/variables.yaml
index fd14458..370f6c5 100644
--- a/threema-connector-test/config/variables.yaml
+++ b/threema-connector-test/config/variables.yaml
@@ -1,6 +1,6 @@
-# == Variables ==
-#
-# You can define here your project Variables.
-#
Variables:
-# myVariable: value
+
+ connector:
+
+ privateKey: "ff364c727068fd6e3e6a711918393fa37649d902402a8eb31af108e79f625d82"
+
\ No newline at end of file
diff --git a/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java b/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
deleted file mode 100644
index b73af6b..0000000
--- a/threema-connector-test/src_test/threema/connector/test/MessageEncryptiontest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package threema.connector.test;
-
-
-import static org.assertj.core.api.Assertions.assertThat;
-import org.junit.jupiter.api.Test;
-import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
-import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
-import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
-import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
-import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
-import threema.connector.receiverData;
-
-@IvyProcessTest
-public class MessageEncryptiontest {
- private final static BpmProcess ENCRYPTION_PROCESS = BpmProcess.name("messageEncryption");
- private final static String PUBLIC_KEY = "ffbb40cfced42f75c4d83c7d35300c0698bf3ef1ab49ace323a1bbc38ee23f36";
- private final static String PRIVATE_KEY = "ff364c727068fd6e3e6a711918393fa37649d902402a8eb31af108e79f625d82";
-
-
- @Test
- void encryptMessage(BpmClient bpmClient) {
- BpmElement callable = ENCRYPTION_PROCESS.elementName("call(receiverData)");
-
- receiverData recData = new receiverData();
- recData.setPlainMessage("Hello World");
- recData.setPublicKey(PUBLIC_KEY);
-
-
- ExecutionResult result = bpmClient.start().subProcess(callable).execute(recData);
- receiverData resultData = result.data().last();
-
- assertThat(resultData.getEncryptedMessage()).isNotEmpty();
- }
-}
From 83723673da2318f66117ca5520c77886ba8416df Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 12:43:37 +0200
Subject: [PATCH 26/75] removed variables
---
threema-connector-test/config/variables.yaml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/threema-connector-test/config/variables.yaml b/threema-connector-test/config/variables.yaml
index 370f6c5..e24d46a 100644
--- a/threema-connector-test/config/variables.yaml
+++ b/threema-connector-test/config/variables.yaml
@@ -1,6 +1,3 @@
Variables:
- connector:
-
- privateKey: "ff364c727068fd6e3e6a711918393fa37649d902402a8eb31af108e79f625d82"
\ No newline at end of file
From ebc085a8357f9ceebc86c7c62b5570e2bce39627 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 12:43:53 +0200
Subject: [PATCH 27/75] added test for process getReveiverInfo
---
.../connector/test/GetReceiverInfoTest.java | 82 +++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 threema-connector-test/src_test/threema/connector/test/GetReceiverInfoTest.java
diff --git a/threema-connector-test/src_test/threema/connector/test/GetReceiverInfoTest.java b/threema-connector-test/src_test/threema/connector/test/GetReceiverInfoTest.java
new file mode 100644
index 0000000..9226e69
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/GetReceiverInfoTest.java
@@ -0,0 +1,82 @@
+package threema.connector.test;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
+import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
+import ch.ivyteam.ivy.bpm.engine.client.History;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
+import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
+import threema.connector.receiverData;
+import util.LookupType;
+
+@IvyProcessTest
+public class GetReceiverInfoTest {
+
+ private static final BpmProcess RECEIVER_INFO_PROCESS = BpmProcess.name("getReceiverInfo");
+ private static final String ECHO_PUBLIC_KEY = "4a6a1b34dcef15d43cb74de2fd36091be99fbbaf126d099d47d83d919712c72b";
+
+ @Test
+ void getIDByInvalidEmail(BpmClient bpmClient) {
+ BpmElement callable = RECEIVER_INFO_PROCESS.elementName("call(receiverData)");
+
+ String email = "invalid@email.com";
+ receiverData recDatMail = new receiverData();
+ recDatMail.setIdentifier(email);
+ recDatMail.setType(LookupType.EMAIL);
+
+ ExecutionResult resultMail = bpmClient.start().subProcess(callable).execute(recDatMail);
+ receiverData resultDataMail = resultMail.data().last();
+ History historyMail = resultMail.history();
+
+ assertThat(resultDataMail.getApiResponse()).isEqualTo("404");
+ assertThat(historyMail.elementNames()).contains("call(receiverData)");
+ assertThat(historyMail.elementNames()).contains("LookupId");
+ assertThat(historyMail.elementNames()).doesNotContain("LookupPubKey");
+
+ }
+
+ @Test
+ void getPublicKeyByID(BpmClient bpmClient) {
+ BpmElement callable = RECEIVER_INFO_PROCESS.elementName("call(receiverData)");
+
+ String threemaId = "ECHOECHO";
+ receiverData recDatId = new receiverData();
+ recDatId.setIdentifier(threemaId);
+ recDatId.setType(LookupType.THREEMAID);
+
+ ExecutionResult resultId = bpmClient.start().subProcess(callable).execute(recDatId);
+ receiverData resultDataId = resultId.data().last();
+ History historyId = resultId.history();
+
+ assertThat(resultDataId.getApiResponse()).isEqualTo("200");
+ assertThat(resultDataId.getPublicKey()).isEqualTo(ECHO_PUBLIC_KEY);
+ assertThat(historyId.elementNames()).contains("call(receiverData)");
+ assertThat(historyId.elementNames()).contains("LookupPubKey");
+ assertThat(historyId.elementNames()).doesNotContain("LookupId");
+ }
+
+
+ @Test
+ void getPublicKeyByInvalidID(BpmClient bpmClient) {
+ BpmElement callable = RECEIVER_INFO_PROCESS.elementName("call(receiverData)");
+
+ String threemaId = "invalidID";
+ receiverData recDatId = new receiverData();
+ recDatId.setIdentifier(threemaId);
+ recDatId.setType(LookupType.THREEMAID);
+
+ ExecutionResult resultId = bpmClient.start().subProcess(callable).execute(recDatId);
+ receiverData resultDataId = resultId.data().last();
+ History historyId = resultId.history();
+
+ assertThat(resultDataId.getApiResponse()).isEqualTo("404");
+ assertThat(historyId.elementNames()).contains("call(receiverData)");
+ assertThat(historyId.elementNames()).contains("LookupPubKey");
+ assertThat(historyId.elementNames()).doesNotContain("LookupId");
+ }
+
+}
From 8464f1cfe6672c0ef24220382bd2475bb80a12b5 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 12:44:11 +0200
Subject: [PATCH 28/75] added test for process messageEncryption
---
.../connector/test/MessageEncryptionTest.java | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 threema-connector-test/src_test/threema/connector/test/MessageEncryptionTest.java
diff --git a/threema-connector-test/src_test/threema/connector/test/MessageEncryptionTest.java b/threema-connector-test/src_test/threema/connector/test/MessageEncryptionTest.java
new file mode 100644
index 0000000..0cb547e
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/MessageEncryptionTest.java
@@ -0,0 +1,51 @@
+package threema.connector.test;
+
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import static javax.xml.bind.DatatypeConverter.*;
+
+import org.junit.jupiter.api.Test;
+import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
+import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
+import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
+import ch.ivyteam.ivy.environment.Ivy;
+import threema.connector.receiverData;
+import ch.threema.apitool.CryptTool;
+
+@IvyProcessTest
+public class MessageEncryptionTest {
+ private final static BpmProcess ENCRYPTION_PROCESS = BpmProcess.name("messageEncryption");
+ private final static String PUBLIC_KEY = "ffbb40cfced42f75c4d83c7d35300c0698bf3ef1ab49ace323a1bbc38ee23f36";
+ private final static String PRIVATE_KEY = "ff364c727068fd6e3e6a711918393fa37649d902402a8eb31af108e79f625d82";
+
+
+ @Test
+ void encryptMessage(BpmClient bpmClient) {
+ BpmElement callable = ENCRYPTION_PROCESS.elementName("call(receiverData)");
+
+ // set PrivateKey for this test
+ Ivy.var().set("connector.privateKey", PRIVATE_KEY);
+
+ String plainMsg = "Hello World";
+ receiverData recData = new receiverData();
+ recData.setPlainMessage(plainMsg);
+ recData.setPublicKey(PUBLIC_KEY);
+
+ ExecutionResult result = bpmClient.start().subProcess(callable).execute(recData);
+ receiverData resultData = result.data().last();
+ assertThat(resultData.getEncryptedMessage()).isNotEmpty();
+
+ byte[] decryptedByte = CryptTool.decrypt(
+ parseHexBinary(resultData.getEncryptedMessage()),
+ parseHexBinary(PRIVATE_KEY),
+ parseHexBinary(PUBLIC_KEY),
+ parseHexBinary(resultData.getNonce())
+ );
+
+ String decryptedMsg = new String(decryptedByte);
+ assertThat(decryptedMsg).contains(plainMsg);
+ }
+}
From 8d8c55784536780b1e815515eae8640b5a4860ce Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 12:44:29 +0200
Subject: [PATCH 29/75] added test for process sendMessage
---
.../connector/test/SendMessageTest.java | 77 +++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 threema-connector-test/src_test/threema/connector/test/SendMessageTest.java
diff --git a/threema-connector-test/src_test/threema/connector/test/SendMessageTest.java b/threema-connector-test/src_test/threema/connector/test/SendMessageTest.java
new file mode 100644
index 0000000..38b3198
--- /dev/null
+++ b/threema-connector-test/src_test/threema/connector/test/SendMessageTest.java
@@ -0,0 +1,77 @@
+package threema.connector.test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import ch.ivyteam.ivy.bpm.engine.client.BpmClient;
+import ch.ivyteam.ivy.bpm.engine.client.ExecutionResult;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmElement;
+import ch.ivyteam.ivy.bpm.engine.client.element.BpmProcess;
+import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest;
+import ch.threema.apitool.CryptTool;
+import ch.threema.apitool.results.EncryptResult;
+import threema.connector.receiverData;
+import ch.ivyteam.ivy.environment.Ivy;
+
+@IvyProcessTest
+public class SendMessageTest {
+
+ private static final BpmProcess SEND_MESSAGE_PROCESS = BpmProcess.name("sendMessage");
+
+ private static final String ECHO_PUBLIC_KEY = "4a6a1b34dcef15d43cb74de2fd36091be99fbbaf126d099d47d83d919712c72b";
+ private static final String INVALID_PUBLIC_KEY = "0000004dcef15d43cb74de2fd36091be99fbbaf126d099d47d83d919712c72b";
+ private static final String ECHO_ID = "ECHOECHO";
+ private static final String INVALID_ID = "INVALIDID";
+ private static final String message = "Hello World";
+ private static String encryptedMessage;
+ private static String nonce;
+
+
+ @BeforeAll
+ static void encryptMessage() {
+ byte[] privKey = DatatypeConverter.parseHexBinary(Ivy.var().get("connector.privatekey"));
+ EncryptResult encryptResult = CryptTool.encryptTextMessage(message, privKey, DatatypeConverter.parseHexBinary(ECHO_PUBLIC_KEY));
+ encryptedMessage = DatatypeConverter.printHexBinary(encryptResult.getResult());
+ nonce = DatatypeConverter.printHexBinary(encryptResult.getNonce());
+ }
+
+ @Test
+ void sendValidMessage(BpmClient bpmClient) {
+ BpmElement callable = SEND_MESSAGE_PROCESS.elementName("call(receiverData)");
+
+ receiverData recDat = new receiverData();
+ recDat.setThreemaId(ECHO_ID);
+ recDat.setPublicKey(ECHO_PUBLIC_KEY);
+ recDat.setEncryptedMessage(encryptedMessage);
+ recDat.setNonce(nonce);
+ recDat.setApiResponse("");
+
+ ExecutionResult result = bpmClient.start().subProcess(callable).execute(recDat);
+ receiverData resultData = result.data().last();
+
+ assertThat(resultData.getApiResponse()).isEqualTo("Sent successfully (200)");
+ }
+
+ @Test
+ void sendInvalidMessage(BpmClient bpmClient) {
+ BpmElement callable = SEND_MESSAGE_PROCESS.elementName("call(receiverData)");
+
+ receiverData recDat = new receiverData();
+ recDat.setThreemaId(INVALID_ID);
+ recDat.setPublicKey(INVALID_PUBLIC_KEY);
+ recDat.setEncryptedMessage(encryptedMessage);
+ recDat.setNonce(nonce);
+ recDat.setApiResponse("");
+
+ ExecutionResult result = bpmClient.start().subProcess(callable).execute(recDat);
+ receiverData resultData = result.data().last();
+
+ assertThat(resultData.getApiResponse()).contains("Error");
+
+ }
+
+}
From ef89b28e0cadb680c7d88dab9604f1478fc4a401 Mon Sep 17 00:00:00 2001
From: Fabian Heuberger
Date: Fri, 13 Oct 2023 14:45:34 +0200
Subject: [PATCH 30/75] Created first version of README.md
---
threema-connector-product/README.md | 29 ++++++++++++++----
.../images/multiMessage.png | Bin 0 -> 17019 bytes
.../images/resultScreen.png | Bin 0 -> 12186 bytes
.../images/singleMessage.png | Bin 0 -> 12529 bytes
4 files changed, 23 insertions(+), 6 deletions(-)
create mode 100644 threema-connector-product/images/multiMessage.png
create mode 100644 threema-connector-product/images/resultScreen.png
create mode 100644 threema-connector-product/images/singleMessage.png
diff --git a/threema-connector-product/README.md b/threema-connector-product/README.md
index ee9062a..221c33b 100644
--- a/threema-connector-product/README.md
+++ b/threema-connector-product/README.md
@@ -1,15 +1,32 @@
-# MY-PRODUCT-NAME
+# Threema Connector
+Axon Ivy's Threema Connector enables you to send end-to-end encrypted messages by integrating the [Threema.Gateway API](https://threema.ch/en/gateway) provided by Threema. With this connector you are able to send messages to one or more recipients using email, phone number or ThreemaID as identifier.
-YOUR DESCRIPTION GOES HERE
+Credentials and credits are required to send messages. The credentials can be created free of charge at [Threema.Gateway](https://gateway.threema.ch/en/signup). Credits can then be bought in accordance with usage. More info can be found at [Threema.Gateway API](https://threema.ch/en/gateway).
## Demo
+![Send to one recipient](./images/singleMessage.png)
-YOUR DEMO DESCRIPTION GOES HERE
+![Send to multiple recipients](./images/multiMessage.png)
+
+![Result screen](./images/resultScreen.png)
## Setup
+This Connector requires an "End-to-End Threema ID". [Request new ID](https://gateway.threema.ch/en/id-request)
+
+For generating the keys to request a new Threema.Gateway ID refer to [Generate keys](https://gateway.threema.ch/en/developer/howto/create-keys/php).
-YOUR SETUP DESCRIPTION GOES HERE
+To use the Threema Connector, add the following variables to your Axon Ivy Project:
```
-@variables.yaml@
-```
\ No newline at end of file
+Variables:
+ connector:
+
+ # Your Threema.Gateway ID
+ threemaId: ''
+
+ # Your Threema.Gateway Secret
+ secret: ''
+
+ # Your private key associated with your Threema.Gateway ID
+ privateKey: ''
+```
diff --git a/threema-connector-product/images/multiMessage.png b/threema-connector-product/images/multiMessage.png
new file mode 100644
index 0000000000000000000000000000000000000000..ad33fb8dde54651a01bb519fe13d992e1a42ad50
GIT binary patch
literal 17019
zcmdtK1yEeuyC>Qw9taSE1qcut4H_W0CC~waCTOrGxVw9d;BW{*8fzd(a0u@1jeFzn
z-q1L+a{hB~&8vH7YF^c=xl^x-RHV|ocki{<_xiB9cLV$j_v`no;J5pBGMbJM2!6|-Uw=ih;!{E(Pa$t$uTsiJ%daC_t%GU#OqXPUs400$p)MsX+D2w%uoK6%*-sqnSzaeDIs&?6GrwdgQ>c6
zbT_<_H-jyOf!xifeG!pZ>A0FWaj-RoV0)6ME(hM)s%?Ai&z%c*|
z>~CH06XP%t)*hiRl4u(V%F^1qQu(7v$YOeZeMaa0^4@hZH#F_jJKJg3V`oE+`kr?-
zXJPPnvOkvXYMfX5qkS$HcfUw0mX%>vOOcmH*rZ5Pj^oYg!>HSRqRHHUQ5X6GKn
z{KP%gi2Po4`^?Yp*2H^lXDc;pePd%n(nrKoyvgjLG{Zix^}^ysEU!w_md>{_i#&hz
zw6u(mwgsJrH_tzeC~D~#ZR;8xMURfgwYQ$&6*e>r@l4jSeh**_rR1_c5P%Mvz0mW%
zmcuMpfKO0*7^7)u_(nHzt82v4P#Vv8rKMGm4oYPB##zDIQ~lsW*2u_0^tM3cW
zbw5*6Csi)j?%6T$lN0*qW^@CB+@D^)a3LsFpx`$ctRO^T964(>RaAuSrve7(lDzuU
z{}O=_u%b4MxS`yaDk4P`
znTa0_1asDF!{1ddZO0Taq$h}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0+_t1Ge0h?aMKU0yk*HgG4gArMr;}FpRar=Q68}SU&N8hQOWGkv2m+%W@;&6+(C|GtEBqZ(ei|
z*W8CM@;#!nPm~9_j*6)ay;o<)_$pbdz~TaH_XK}6sT+(dXNBD_CgnP9S-f10JgY~d
z6vQ(?JPhQJxE;Gr_6m1&I9%J4WXutDu>JjmfT|}kF?wdk`ZiA=RaOar1WTH!$@!Vv
znr2Suda`m3dN`k@L9m>x;FGX)ztidC$i#SCdQu>sK4)T`5G==(WA~3cdOPLb^z32m
z7@)2it0B1wm=Isi*y$0D7t|P5j%UU;GV{16vdi1z_bksVFK)Liv3IP*i0|KTb}PQ`!z
z43+kr^n_DE<_Jf*^xOXF{2pK=;JjP>6q7>(Qc6G-b0fHP^Q;0nO5MYr@NNy?*46!_
zB(67F>Q~L2zF@-T%)>MP)Z{YD@tuPD{{AsDN0diJ^}~pqViizk!(*f)H|0Il$L{Zt
zK6iS1t#>_syz)Iy~gyxgLKw0uVNcXQ0}10IU}%PeyA1TGkEp3
zBlXgj>g>E+d^Yy)WIZzarjf61Kt%8bDo#U5K>NxOJKt$$DB!OX&ft;xe|G!E+mBrY
z+?I^M2vj0_Cs_UaU&(P>m}WYv)t>94_QE)BL6RdkVC5^4mY=In@47bcdVnYv&i_j#
zdQg%Zd@sNal0V-I@IUdV|1Tfkrv<@7JAs5Sj=$#i{rHpdf#V)5L;s_5`JXI<3}Z|%
ztm)rkh(JYp##ylSk97~y4xq~Xn{{tsY(A6x7NqKgsvdr94=%|~eU(!9`^D~>gb;3+
zdd~J5#m8x49Ami8CmH6F!skSk6fRDJkZ=Kn4jc}jNPY_r#y!8!VH}x%A_8A%*>iqn
z=i7kLBgyT(Jv)IX5i({L2A>^&GydxtSNxYpM*layZ{dm{i)4#u1LL>^qGXUauN7hW
I5+6SQH!Zp4-~a#s
literal 0
HcmV?d00001
diff --git a/threema-connector-product/images/resultScreen.png b/threema-connector-product/images/resultScreen.png
new file mode 100644
index 0000000000000000000000000000000000000000..743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ub^~vHtR~KS(@2bn|3q;6-?z;md43QEyL0H#*$^4t8*C*nZQ8bGnw7_Vcv?(
z*ZITC@N8i6H8cek01axiu4s9vns9b&iVfyUy}IG$QzLb}1s00w!ZotB5j2{n-B=I^(_(A_5?Va`4eaG{P@D+}C7
zMx%?*trXt+$u3wLBSs&?D5=-gC}k%8&ZW|OSvhz%CxGEf4948VOx`%MUJeS3pDS;h
zC7=!f6PdfaJJqNz+|Ylca(mPago+wU&l}7QB1M|kT;`~gXJhx=B$OUsAXFwTTkAw4S<--i#!x!oQB{EhBi`ZHmRo7dQ$Xa)zWGyscD0m&m_Qv^j!V$@btyJ
zEe&YHX})$y1)({^m>si^EvD1bM*^2cpuB+@UQk+R|B^|Qzx4YlG4S606K1OMgMN&j
zo}T`1H$oDa<3na(3jA2J2y^E@VYvH$I&SjcuKkiYA3)F>k2PUnix5RQRVez!+mHVX
Dig?=b
literal 0
HcmV?d00001
diff --git a/threema-connector-product/images/singleMessage.png b/threema-connector-product/images/singleMessage.png
new file mode 100644
index 0000000000000000000000000000000000000000..57bed7ac1c0c8a15bf71f4d4c1a10f952ad45edc
GIT binary patch
literal 12529
zcmeHtcTkhvx^I+E5fl(mP^5_{NL6}AF-Q}T-igwC5koI3EeL}24$_6tdk?)=>AeY|
zcL+7y#pl`go_qG5b7#)XxqqD*n2-=wUY>WY=hq&;w{j8$_!RgM2!udN5~>J+T!lg)
zS3cah3SNnoQlteBcs7z6b`S_*)8+S-aAv{>5C|YhZL0bup#ogY*8>3(U
zc5|#P#X34N>)kukpy4J?-VQJ0z!E|Za05Yd!Q+BAb>pleXjOf4dW%Z>}rk+z4zE=G5=;EF8I5Q%@ZFvgT=rHcHCWZiQVYXb^FD+
zxrlo-Dawoj*gJA{PA*Q{o!4KzveXf7wbf17Y_f&^UjIG#^dHM}uMHqfc8?S=^7rMT
zWd4f-y(qzmgoDn&8XZa_>9pk9>F-V)){{|lt}?3j)WrNx@1BfT=4PjMLcOj@cwM{5
z%xE(#?7cX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