Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implementation - Threema Connector #2

Merged
merged 77 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
51a27ee
Update pom.xml
ivy-fhe Oct 4, 2023
cd52aa3
initial project creation for threema-connector
ivy-fhe Oct 4, 2023
46374e2
initial implementation of message handler
ivy-fhe Oct 4, 2023
b7717f4
initial draft of ApiConnector
ivy-fhe Oct 4, 2023
da08f90
added threema-msgapi-tool.jar
ivy-fhe Oct 4, 2023
724e177
added resource folder
ivy-fhe Oct 4, 2023
853e56c
fixed format to match axonivy standard
ivy-fhe Oct 4, 2023
721426e
added first implementation of property helper
ivy-fhe Oct 4, 2023
4d55a70
Downgraded from 11 to 10.0
ivy-fhe Oct 4, 2023
679e297
Downgraded from 11.0 to 10.0
ivy-fhe Oct 4, 2023
df00f93
Downgraded from 11.0 to 10.0
ivy-fhe Oct 4, 2023
89293ef
Downgraded version to 10.0.6 to match latest LTS
ivy-fhe Oct 4, 2023
fa17842
fixed propertyhandler
ivy-fhe Oct 4, 2023
8742de8
streamlined file
ivy-fhe Oct 4, 2023
a52ea99
deconstructed Java code into ivy process
ivy-fhe Oct 11, 2023
cef7c9a
added functionality to send message to one or multiple recipients
ivy-fhe Oct 12, 2023
0c667ea
added test for LookupType Enum
ivy-fhe Oct 12, 2023
db5046f
removed unneeded classes
ivy-fhe Oct 12, 2023
b163a57
renamed product folder
ivy-fhe Oct 12, 2023
ff7117c
removed old product folder
ivy-fhe Oct 12, 2023
bd5dfaa
added test for messageEncryption process
ivy-fhe Oct 12, 2023
9ee25f6
added test for messageEncryptioadded test for messageEncryptionn
ivy-fhe Oct 13, 2023
58da7bd
removed maven dependency and changed classpath to use lib folder
ivy-fhe Oct 13, 2023
e9815a0
added threema library to classpath
ivy-fhe Oct 13, 2023
4aa9a87
added decryption to test
ivy-fhe Oct 13, 2023
8372367
removed variables
ivy-fhe Oct 13, 2023
ebc085a
added test for process getReveiverInfo
ivy-fhe Oct 13, 2023
8464f1c
added test for process messageEncryption
ivy-fhe Oct 13, 2023
8d8c557
added test for process sendMessage
ivy-fhe Oct 13, 2023
ef89b28
Created first version of README.md
ivy-fhe Oct 13, 2023
9ee0d03
cleaned dialogues and variables.yaml
ivy-fhe Oct 13, 2023
b17efa9
updated summary
ivy-fhe Oct 13, 2023
e518745
added info to error messages
ivy-fhe Oct 13, 2023
398c082
changed singleRecipient to accept Lookuptype as type instead of string
ivy-fhe Oct 13, 2023
b54f075
added tags
ivy-fhe Oct 13, 2023
22755d4
added threema icon
ivy-fhe Oct 13, 2023
59231b6
added icon to all processes
ivy-fhe Oct 13, 2023
0d4534f
added tests for singleRecipient and multipleRecipients processes
ivy-fhe Oct 13, 2023
3df2552
refactored tests into "process" package
ivy-fhe Oct 18, 2023
fac6de1
added variables.yaml to .gitignore
ivy-fhe Oct 18, 2023
d880d34
Create variables.yaml
ivy-fhe Oct 18, 2023
16af99c
added first draft of mock service
ivy-fhe Oct 18, 2023
c456f04
Fixed mock service
ivy-fhe Oct 19, 2023
90d309c
finished mocking for GetReveiverInfoTest
ivy-fhe Oct 19, 2023
aa871d0
changed returned public key to be valid 64bit key
ivy-fhe Oct 19, 2023
79c2789
finished api mocking and changed tests to fit mock api
ivy-fhe Oct 19, 2023
8cbfe1b
fixed testcases
ivy-fhe Oct 19, 2023
3eb47f7
added templates to .gitignore
ivy-fhe Oct 19, 2023
b7a94b0
moved process to the right
ivy-fhe Oct 19, 2023
cbce95a
added support for international phone pattern
ivy-fhe Oct 19, 2023
b446945
initial webtest commit
ivy-fhe Oct 19, 2023
9a262c8
added required test for fields
ivy-fhe Oct 19, 2023
94b4ebb
updated ivyVersion
ivy-fhe Oct 19, 2023
f8d3dae
changed ivyversion
ivy-fhe Oct 19, 2023
4f4a1e9
Update ci.yml to set version to 10.0.11
ivy-fhe Oct 19, 2023
5015d9d
removed versionr requirement
ivy-fhe Oct 19, 2023
3b6dd2b
Update ci.yml
ivy-fhe Oct 19, 2023
bb8feb4
changed url to point to correct repo
ivy-fhe Oct 20, 2023
2e4366e
changed group id to match and fixed version issues
ivy-fhe Oct 20, 2023
df5adca
fixed view to use frame template
ivy-fhe Oct 20, 2023
cc9dc25
extracted message encryption into util class
ivy-fhe Oct 20, 2023
16dbbc0
applied standard ivy formatting
ivy-fhe Oct 20, 2023
765171b
removed unused code
ivy-fhe Oct 20, 2023
6429f64
fixed repo link
ivy-fhe Oct 20, 2023
949d4fd
fixed formatting
ivy-fhe Oct 20, 2023
35ddde7
applied formatting
ivy-fhe Oct 20, 2023
951d432
fixed artifact id
ivy-fhe Oct 20, 2023
f17a33d
Update variables.yaml
ivy-fhe Oct 20, 2023
bf26a48
fixed perstistence.xml
ivy-fhe Oct 20, 2023
5e800db
removed unused ;
ivy-fhe Oct 20, 2023
cf72090
Update .classpath
ivy-fhe Oct 20, 2023
49f9894
added threema-msgapi-tool.* to .gitignore
ivy-fhe Oct 20, 2023
2b5cfcd
added plugin to download and extract threema sdk
ivy-fhe Oct 20, 2023
c28e2e0
temporary removed extraction from task
ivy-fhe Oct 20, 2023
e150ba1
extracted unzip into own execution step
ivy-fhe Oct 20, 2023
5ca6d34
added correct artifactid and groupId
ivy-fhe Oct 20, 2023
5389a80
added mkdir to antrun
ivy-fhe Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ on:
jobs:
build:
uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v2
with:
mvnArgs: -Dmaven.test.failure.ignore=true -Divy.engine.version=10.0.13
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ lib/mvn-deps/
logs/
src_dataClasses/
src_wsproc/

# local config
**/resources/
threema-connector/config/variables.yaml
threema-connector/config/variables.yaml_template
threema-connector/config/variables.yaml_complete

# threema SKD
threema-connector/lib/threema-msgapi-tool.*
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>threema-connector-modules</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
15 changes: 0 additions & 15 deletions MY-PRODUCT-NAME-product/README.md

This file was deleted.

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

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

"YOUR SHORT DESCRIPTION GOES HERE"
Use the [Threema.Gateway API](https://threema.ch/en/gateway) to send messages to one or more recipients, enabling new notification options for your business processes.

Read our [documentation](MY-PRODUCT-NAME-product/README.md).
Read our [documentation](threema-connector-product/README.md).
15 changes: 10 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.market</groupId><!-- your group id: e.g. com.axonivy.connector.<myconnector> or com.axonivy.utils.<myutil> -->
<name>my-product</name><!-- fill your product name -->
<artifactId>my-product-modules</artifactId><!-- fill your product name + a "-modules" postfix -->
<version>10.0.0-SNAPSHOT</version><!-- identicate your minimal compliant ivy version with the first 2 digits -->
<groupId>com.axonivy.connector.threema</groupId><!-- your group id: e.g.
com.axonivy.connector.<myconnector> or com.axonivy.utils.<myutil> -->
<name>threema-connector</name>
<artifactId>threema-connector-modules</artifactId>
<version>10.0.0-SNAPSHOT</version><!-- identicate your minimal compliant
ivy version with the first 2 digits -->
<packaging>pom</packaging>

<modules>
<module>${project.name}</module>
<module>${project.name}-demo</module>
<module>${project.name}-test</module>
<module>${project.name}-product</module>
<module>${project.name}-webtest</module>
</modules>

<scm>
Expand Down
32 changes: 32 additions & 0 deletions threema-connector-demo/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src">
<attributes>
<attribute name="optional" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_wsproc">
<attributes>
<attribute name="optional" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_dataClasses">
<attributes>
<attribute name="optional" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER" />
<classpathentry exported="true" kind="con"
path="IVY_CONTAINER" />
<classpathentry kind="con" path="WEBAPP_CONTAINER" />
<classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container" />
<classpathentry kind="output" path="target/classes" />
</classpath>
19 changes: 19 additions & 0 deletions threema-connector-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -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/
49 changes: 49 additions & 0 deletions threema-connector-demo/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>threema-connector-demo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>ch.ivyteam.ivy.project.IvyProjectNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
17 changes: 17 additions & 0 deletions threema-connector-demo/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
excluding="**/bower_components/*|**/node_modules/*|**/*.min.js"
kind="src" path="webContent" />
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER" />
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary" />
<classpathentry kind="output" path="" />
</classpath>
Original file line number Diff line number Diff line change
@@ -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=100000
eclipse.preferences.version=1
10 changes: 10 additions & 0 deletions threema-connector-demo/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId"
project-version="1.5.0">
<wb-module deploy-name="threema-connector-demo">
<wb-resource deploy-path="/" source-path="/webContent"
tag="defaultRootSource" />
<wb-resource deploy-path="/WEB-INF/classes"
source-path="/src" />
<wb-resource deploy-path="/WEB-INF/classes"
source-path="/src_wsproc" />
<wb-resource deploy-path="/WEB-INF/classes"
source-path="/src_dataClasses" />
<property name="context-root"
value="threema-connector-demo" />
<property name="java-output-path"
value="/threema-connector-demo/target/classes" />
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id"
value="jsf-user-library-provider" />
</node>
</facet>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web" />
<installed facet="java" version="17" />
<installed facet="jst.web" version="3.0" />
<installed facet="wst.jsdt.web" version="1.0" />
<installed facet="jst.jsf" version="2.1" />
</faceted-project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
css-profile/<project>=org.eclipse.wst.css.core.cssprofile.css3
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
22 changes: 22 additions & 0 deletions threema-connector-demo/config/custom-fields.yaml
Original file line number Diff line number Diff line change
@@ -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 ...
2 changes: 2 additions & 0 deletions threema-connector-demo/config/databases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/databases.json
Databases:
1 change: 1 addition & 0 deletions threema-connector-demo/config/overrides.any
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
4 changes: 4 additions & 0 deletions threema-connector-demo/config/persistence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.2"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd" />
2 changes: 2 additions & 0 deletions threema-connector-demo/config/rest-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json
RestClients:
4 changes: 4 additions & 0 deletions threema-connector-demo/config/roles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<role>
<identifier>Everybody</identifier>
</role>
2 changes: 2 additions & 0 deletions threema-connector-demo/config/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userConfig />
4 changes: 4 additions & 0 deletions threema-connector-demo/config/variables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Variables:



2 changes: 2 additions & 0 deletions threema-connector-demo/config/webservice-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/webservice-clients.json
WebServiceClients:
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Data #class
threema.connector.demo #namespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Status #class
threema.connector.demo #namespace
recipient String #field
recipient PERSISTENT #fieldModifier
status String #field
status PERSISTENT #fieldModifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sendDemoMessageData #class
threema.connector.demo #namespace
receiver String #field
receiver PERSISTENT #fieldModifier
plainMessage String #field
plainMessage PERSISTENT #fieldModifier
type String #field
type PERSISTENT #fieldModifier
apiResponse List<String> #field
apiResponse PERSISTENT #fieldModifier
29 changes: 29 additions & 0 deletions threema-connector-demo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.threema</groupId>
<artifactId>threema-connector-demo</artifactId>
<version>10.0.0-SNAPSHOT</version>
<packaging>iar</packaging>
<dependencies>
<dependency>
<groupId>com.axonivy.connector.threema</groupId>
<artifactId>threema-connector</artifactId>
<version>${project.version}</version>
<type>iar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>10.0.6</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Loading