From dc1eeb19e49fa3e5dcff05e39b305fc70830b597 Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Fri, 29 Nov 2024 12:11:19 +0100 Subject: [PATCH 1/6] Raise project to 12.0.0-SNAPSHOT --- deepl-connector-demo/.classpath | 7 +- deepl-connector-demo/.project | 8 +- deepl-connector-demo/.settings/.jsdtscope | 12 - .../.settings/ch.ivyteam.ivy.designer.prefs | 5 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../org.eclipse.wst.common.component | 3 +- ....eclipse.wst.common.project.facet.core.xml | 6 +- ...rg.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - deepl-connector-demo/config/variables.yaml | 1 + .../axonivy/connector/deepl/demo/Data.d.json | 15 ++ .../connector/deepl/demo/Data.ivyClass | 6 - .../processes/DeepLDemo.p.json | 36 +-- .../translateFile/translateFile.rddescriptor | 7 - .../translateFile/translateFileData.d.json | 39 +++ .../translateFile/translateFileData.ivyClass | 18 -- .../translateFile/translateFileProcess.p.json | 69 ++--- .../translateText/translateText.rddescriptor | 7 - .../translateText/translateTextData.d.json | 27 ++ .../translateText/translateTextData.ivyClass | 12 - .../translateText/translateTextProcess.p.json | 36 +-- deepl-connector-test/.classpath | 7 +- deepl-connector-test/.project | 8 +- deepl-connector-test/.settings/.jsdtscope | 12 - .../.settings/ch.ivyteam.ivy.designer.prefs | 5 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../org.eclipse.wst.common.component | 3 +- ....eclipse.wst.common.project.facet.core.xml | 6 +- ...rg.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - deepl-connector-test/config/variables.yaml | 1 + .../axonivy/connector/deepl/test/Data.d.json | 6 + .../connector/deepl/test/Data.ivyClass | 2 - deepl-connector/.classpath | 7 +- deepl-connector/.project | 8 +- deepl-connector/.settings/.jsdtscope | 12 - .../.settings/ch.ivyteam.ivy.designer.prefs | 5 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../org.eclipse.wst.common.component | 3 +- ....eclipse.wst.common.project.facet.core.xml | 6 +- ...rg.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - deepl-connector/config/variables.yaml | 1 + .../com/axonivy/connector/deepl/Data.d.json | 6 + .../com/axonivy/connector/deepl/Data.ivyClass | 2 - .../dataclasses/deepl/translate/Data.d.json | 35 +++ .../dataclasses/deepl/translate/Data.ivyClass | 12 - .../processes/deepl/translate.p.json | 243 +++++++++++------- 48 files changed, 403 insertions(+), 325 deletions(-) delete mode 100644 deepl-connector-demo/.settings/.jsdtscope delete mode 100644 deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.d.json delete mode 100644 deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.ivyClass delete mode 100644 deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFile.rddescriptor create mode 100644 deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.d.json delete mode 100644 deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.ivyClass delete mode 100644 deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateText.rddescriptor create mode 100644 deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.d.json delete mode 100644 deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.ivyClass delete mode 100644 deepl-connector-test/.settings/.jsdtscope delete mode 100644 deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.d.json delete mode 100644 deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.ivyClass delete mode 100644 deepl-connector/.settings/.jsdtscope delete mode 100644 deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.d.json delete mode 100644 deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.ivyClass create mode 100644 deepl-connector/dataclasses/deepl/translate/Data.d.json delete mode 100644 deepl-connector/dataclasses/deepl/translate/Data.ivyClass diff --git a/deepl-connector-demo/.classpath b/deepl-connector-demo/.classpath index 45a97e4..8228714 100644 --- a/deepl-connector-demo/.classpath +++ b/deepl-connector-demo/.classpath @@ -5,12 +5,7 @@ - - - - - - + diff --git a/deepl-connector-demo/.project b/deepl-connector-demo/.project index 31df128..5f7fa0b 100644 --- a/deepl-connector-demo/.project +++ b/deepl-connector-demo/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder @@ -44,6 +49,5 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.jem.beaninfo.BeanInfoNature org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - + \ No newline at end of file diff --git a/deepl-connector-demo/.settings/.jsdtscope b/deepl-connector-demo/.settings/.jsdtscope deleted file mode 100644 index 869c01d..0000000 --- a/deepl-connector-demo/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs b/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs index 5aa1d7d..c233b98 100644 --- a/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs +++ b/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,5 +1,4 @@ -ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.deepl.demo.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.deepl.demo ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11 -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 -eclipse.preferences.version=1 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001 +eclipse.preferences.version=1 \ No newline at end of file diff --git a/deepl-connector-demo/.settings/org.eclipse.jdt.core.prefs b/deepl-connector-demo/.settings/org.eclipse.jdt.core.prefs index d4540a5..3a79233 100644 --- a/deepl-connector-demo/.settings/org.eclipse.jdt.core.prefs +++ b/deepl-connector-demo/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +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.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 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 +org.eclipse.jdt.core.compiler.source=21 diff --git a/deepl-connector-demo/.settings/org.eclipse.wst.common.component b/deepl-connector-demo/.settings/org.eclipse.wst.common.component index 3d186f2..4e27eef 100644 --- a/deepl-connector-demo/.settings/org.eclipse.wst.common.component +++ b/deepl-connector-demo/.settings/org.eclipse.wst.common.component @@ -2,10 +2,9 @@ - - + \ No newline at end of file diff --git a/deepl-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml b/deepl-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml index 156ecdb..621b1f8 100644 --- a/deepl-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/deepl-connector-demo/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,8 +1,6 @@ - - + - - + \ No newline at end of file diff --git a/deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container b/deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a..0000000 --- a/deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name b/deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b..0000000 --- a/deepl-connector-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/deepl-connector-demo/config/variables.yaml b/deepl-connector-demo/config/variables.yaml index 64c8fa0..4448394 100644 --- a/deepl-connector-demo/config/variables.yaml +++ b/deepl-connector-demo/config/variables.yaml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/variables.json # == Variables == # # You can define here your project Variables. diff --git a/deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.d.json b/deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.d.json new file mode 100644 index 0000000..d657685 --- /dev/null +++ b/deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.d.json @@ -0,0 +1,15 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", + "simpleName" : "Data", + "namespace" : "com.axonivy.connector.deepl.demo", + "isBusinessCaseData" : false, + "fields" : [ { + "name" : "language", + "type" : "com.deepl.api.v2.client.TargetLanguage", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "file", + "type" : "File", + "modifiers" : [ "PERSISTENT" ] + } ] +} \ No newline at end of file diff --git a/deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.ivyClass b/deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.ivyClass deleted file mode 100644 index b346087..0000000 --- a/deepl-connector-demo/dataclasses/com/axonivy/connector/deepl/demo/Data.ivyClass +++ /dev/null @@ -1,6 +0,0 @@ -Data #class -com.axonivy.connector.deepl.demo #namespace -language com.deepl.api.v2.client.TargetLanguage #field -language PERSISTENT #fieldModifier -file File #field -file PERSISTENT #fieldModifier diff --git a/deepl-connector-demo/processes/DeepLDemo.p.json b/deepl-connector-demo/processes/DeepLDemo.p.json index 1fd1d5d..8a7f213 100644 --- a/deepl-connector-demo/processes/DeepLDemo.p.json +++ b/deepl-connector-demo/processes/DeepLDemo.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", "id" : "1865BBA362D2425B", "config" : { "data" : "com.axonivy.connector.deepl.demo.Data" @@ -9,14 +9,17 @@ "type" : "RequestStart", "name" : "translateText.ivp", "config" : { - "callSignature" : "translateText", - "outLink" : "translateText.ivp", - "tags" : "demo" + "signature" : "translateText" }, + "tags" : [ + "demo" + ], "visual" : { "at" : { "x" : 96, "y" : 64 } }, - "connect" : { "id" : "f2", "to" : "f4" } + "connect" : [ + { "id" : "f2", "to" : "f4" } + ] }, { "id" : "f1", "type" : "TaskEnd", @@ -28,14 +31,15 @@ "type" : "DialogCall", "name" : "translateText", "config" : { - "dialogId" : "com.axonivy.connector.deepl.demo.translateText", - "startMethod" : "start()" + "dialog" : "com.axonivy.connector.deepl.demo.translateText:start()" }, "visual" : { "at" : { "x" : 248, "y" : 64 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f7", "to" : "f1" } + "connect" : [ + { "id" : "f7", "to" : "f1" } + ] }, { "id" : "f5", "type" : "TaskEnd", @@ -47,21 +51,21 @@ "type" : "RequestStart", "name" : "translateFile.ivp", "config" : { - "callSignature" : "translateFile", - "outLink" : "translateFile.ivp" + "signature" : "translateFile" }, "visual" : { "at" : { "x" : 96, "y" : 144 }, - "labelOffset" : { "x" : 9, "y" : 35 } + "labelOffset" : { "x" : 9 } }, - "connect" : { "id" : "f6", "to" : "f11" } + "connect" : [ + { "id" : "f6", "to" : "f11" } + ] }, { "id" : "f11", "type" : "DialogCall", "name" : "translateFile", "config" : { - "dialogId" : "com.axonivy.connector.deepl.demo.translateFile", - "startMethod" : "start()", + "dialog" : "com.axonivy.connector.deepl.demo.translateFile:start()", "output" : { "map" : { "out" : "in", @@ -73,6 +77,8 @@ "at" : { "x" : 248, "y" : 144 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f3", "to" : "f5" } + "connect" : [ + { "id" : "f3", "to" : "f5" } + ] } ] } \ No newline at end of file diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFile.rddescriptor b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFile.rddescriptor deleted file mode 100644 index ae605f0..0000000 --- a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFile.rddescriptor +++ /dev/null @@ -1,7 +0,0 @@ - - - - viewTechnology - JSF - - diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.d.json b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.d.json new file mode 100644 index 0000000..cfe9b1b --- /dev/null +++ b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.d.json @@ -0,0 +1,39 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", + "simpleName" : "translateFileData", + "namespace" : "com.axonivy.connector.deepl.demo.translateFile", + "isBusinessCaseData" : false, + "fields" : [ { + "name" : "showContent", + "type" : "Boolean", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "filePath", + "type" : "String", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "languages", + "type" : "List", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "translate", + "type" : "com.axonivy.connector.deepl.LanguageInfo.Lang", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "ivyFile", + "type" : "File", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "file", + "type" : "File", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "translated", + "type" : "File", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "exampleFile", + "type" : "File", + "modifiers" : [ "PERSISTENT" ] + } ] +} \ No newline at end of file diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.ivyClass b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.ivyClass deleted file mode 100644 index 09e2a3b..0000000 --- a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileData.ivyClass +++ /dev/null @@ -1,18 +0,0 @@ -translateFileData #class -com.axonivy.connector.deepl.demo.translateFile #namespace -showContent Boolean #field -showContent PERSISTENT #fieldModifier -filePath String #field -filePath PERSISTENT #fieldModifier -languages List #field -languages PERSISTENT #fieldModifier -translate com.axonivy.connector.deepl.LanguageInfo.Lang #field -translate PERSISTENT #fieldModifier -ivyFile File #field -ivyFile PERSISTENT #fieldModifier -file File #field -file PERSISTENT #fieldModifier -translated File #field -translated PERSISTENT #fieldModifier -exampleFile File #field -exampleFile PERSISTENT #fieldModifier diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileProcess.p.json b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileProcess.p.json index 98b8079..a2bf4f6 100644 --- a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileProcess.p.json +++ b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateFile/translateFileProcess.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", "id" : "18692879E2E47E00", "kind" : "HTML_DIALOG", "config" : { @@ -10,8 +10,9 @@ "type" : "HtmlDialogStart", "name" : "uploadInvoice()", "config" : { - "callSignature" : "start", + "signature" : "start", "input" : { + "map" : { }, "code" : [ "out.languages = com.axonivy.connector.deepl.LanguageInfo.all();", "import com.axonivy.connector.deepl.FileLoaderUtil;", @@ -20,7 +21,7 @@ }, "result" : { "params" : [ - { "name" : "file", "type" : "File" } + { "name" : "file", "type" : "File", "desc" : "" } ], "map" : { "result.file" : "in.ivyFile" @@ -32,7 +33,9 @@ "at" : { "x" : 560, "y" : 496 }, "labelOffset" : { "x" : 8, "y" : 35 } }, - "connect" : { "id" : "f4", "to" : "f7" } + "connect" : [ + { "id" : "f4", "to" : "f7" } + ] }, { "id" : "f7", "type" : "HtmlDialogEnd", @@ -63,9 +66,11 @@ }, "visual" : { "at" : { "x" : 704, "y" : 584 }, - "size" : { "width" : 144, "height" : 60 } + "size" : { "width" : 144 } }, - "connect" : { "id" : "f9", "to" : "f0" } + "connect" : [ + { "id" : "f9", "to" : "f0" } + ] }, { "id" : "f13", "type" : "HtmlDialogEventStart", @@ -77,35 +82,35 @@ "at" : { "x" : 560, "y" : 584 }, "labelOffset" : { "x" : 11, "y" : 32 } }, - "connect" : { "id" : "f17", "to" : "f16" } + "connect" : [ + { "id" : "f17", "to" : "f16" } + ] }, { "id" : "f0", "type" : "SubProcessCall", "name" : "translate", "config" : { "processCall" : "deepl/translate:document(File,com.deepl.api.v2.client.TargetLanguage)", - "output" : { - "map" : { - "out" : "in", - "out.file" : "result.translated" - } - }, "call" : { - "params" : [ - { "name" : "file", "type" : "File" }, - { "name" : "targetLanguage", "type" : "com.deepl.api.v2.client.TargetLanguage" } - ], "map" : { "param.file" : "in.file", "param.targetLanguage" : "in.translate.key()" } + }, + "output" : { + "map" : { + "out" : "in", + "out.file" : "result.translated" + } } }, "visual" : { "at" : { "x" : 944, "y" : 584 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f3", "to" : "f2" } + "connect" : [ + { "id" : "f3", "to" : "f2" } + ] }, { "id" : "f2", "type" : "HtmlDialogEnd", @@ -123,7 +128,9 @@ "at" : { "x" : 560, "y" : 664 }, "labelOffset" : { "x" : 11, "y" : 32 } }, - "connect" : { "id" : "f21", "to" : "f19" } + "connect" : [ + { "id" : "f21", "to" : "f19" } + ] }, { "id" : "f19", "type" : "Script", @@ -140,35 +147,35 @@ "visual" : { "at" : { "x" : 688, "y" : 664 } }, - "connect" : { "id" : "f10", "to" : "f1" } + "connect" : [ + { "id" : "f10", "to" : "f1" } + ] }, { "id" : "f1", "type" : "SubProcessCall", "name" : "translate", "config" : { "processCall" : "deepl/translate:document(File,com.deepl.api.v2.client.TargetLanguage)", - "output" : { - "map" : { - "out" : "in", - "out.file" : "result.translated" - } - }, "call" : { - "params" : [ - { "name" : "file", "type" : "File" }, - { "name" : "targetLanguage", "type" : "com.deepl.api.v2.client.TargetLanguage" } - ], "map" : { "param.file" : "in.file", "param.targetLanguage" : "in.translate.key()" } + }, + "output" : { + "map" : { + "out" : "in", + "out.file" : "result.translated" + } } }, "visual" : { "at" : { "x" : 944, "y" : 664 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f8", "to" : "f5" } + "connect" : [ + { "id" : "f8", "to" : "f5" } + ] }, { "id" : "f5", "type" : "HtmlDialogEnd", diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateText.rddescriptor b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateText.rddescriptor deleted file mode 100644 index ae605f0..0000000 --- a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateText.rddescriptor +++ /dev/null @@ -1,7 +0,0 @@ - - - - viewTechnology - JSF - - diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.d.json b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.d.json new file mode 100644 index 0000000..e3f12e1 --- /dev/null +++ b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.d.json @@ -0,0 +1,27 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", + "simpleName" : "translateTextData", + "namespace" : "com.axonivy.connector.deepl.demo.translateText", + "isBusinessCaseData" : false, + "fields" : [ { + "name" : "data", + "type" : "com.axonivy.connector.deepl.demo.Data", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "languages", + "type" : "java.util.List", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "translate", + "type" : "com.axonivy.connector.deepl.LanguageInfo.Lang", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "inputText", + "type" : "String", + "modifiers" : [ "PERSISTENT" ] + }, { + "name" : "outputText", + "type" : "String", + "modifiers" : [ "PERSISTENT" ] + } ] +} \ No newline at end of file diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.ivyClass b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.ivyClass deleted file mode 100644 index d892152..0000000 --- a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextData.ivyClass +++ /dev/null @@ -1,12 +0,0 @@ -translateTextData #class -com.axonivy.connector.deepl.demo.translateText #namespace -data com.axonivy.connector.deepl.demo.Data #field -data PERSISTENT #fieldModifier -languages java.util.List #field -languages PERSISTENT #fieldModifier -translate com.axonivy.connector.deepl.LanguageInfo.Lang #field -translate PERSISTENT #fieldModifier -inputText String #field -inputText PERSISTENT #fieldModifier -outputText String #field -outputText PERSISTENT #fieldModifier diff --git a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextProcess.p.json b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextProcess.p.json index 42bdfdd..44a3aab 100644 --- a/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextProcess.p.json +++ b/deepl-connector-demo/src_hd/com/axonivy/connector/deepl/demo/translateText/translateTextProcess.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", "id" : "1866E2B2931CFAA5", "kind" : "HTML_DIALOG", "config" : { @@ -10,7 +10,7 @@ "type" : "HtmlDialogStart", "name" : "start()", "config" : { - "callSignature" : "start", + "signature" : "start", "input" : { "map" : { "out.data.language" : "com.deepl.api.v2.client.TargetLanguage.DE", @@ -26,7 +26,9 @@ "visual" : { "at" : { "x" : 96, "y" : 64 } }, - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] }, { "id" : "f1", "type" : "HtmlDialogEnd", @@ -43,7 +45,9 @@ "visual" : { "at" : { "x" : 96, "y" : 192 } }, - "connect" : { "id" : "f5", "to" : "f4" } + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] }, { "id" : "f4", "type" : "HtmlDialogExit", @@ -56,28 +60,26 @@ "name" : "translate", "config" : { "processCall" : "deepl/translate:text(String,com.deepl.api.v2.client.TargetLanguage)", - "output" : { - "map" : { - "out" : "in", - "out.outputText" : "result.translation" - } - }, "call" : { - "params" : [ - { "name" : "text", "type" : "String" }, - { "name" : "targetLanguage", "type" : "com.deepl.api.v2.client.TargetLanguage" } - ], "map" : { "param.text" : "in.inputText", "param.targetLanguage" : "in.translate.key()" } + }, + "output" : { + "map" : { + "out" : "in", + "out.outputText" : "result.translation" + } } }, "visual" : { "at" : { "x" : 224, "y" : 128 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f9", "to" : "f8" } + "connect" : [ + { "id" : "f9", "to" : "f8" } + ] }, { "id" : "f7", "type" : "HtmlDialogEventStart", @@ -96,7 +98,9 @@ "visual" : { "at" : { "x" : 96, "y" : 128 } }, - "connect" : { "id" : "f10", "to" : "f6" } + "connect" : [ + { "id" : "f10", "to" : "f6" } + ] }, { "id" : "f8", "type" : "HtmlDialogEnd", diff --git a/deepl-connector-test/.classpath b/deepl-connector-test/.classpath index e938886..a7c4476 100644 --- a/deepl-connector-test/.classpath +++ b/deepl-connector-test/.classpath @@ -5,12 +5,7 @@ - - - - - - + diff --git a/deepl-connector-test/.project b/deepl-connector-test/.project index a47b20d..9286ca9 100644 --- a/deepl-connector-test/.project +++ b/deepl-connector-test/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder @@ -44,6 +49,5 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.jem.beaninfo.BeanInfoNature org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - + \ No newline at end of file diff --git a/deepl-connector-test/.settings/.jsdtscope b/deepl-connector-test/.settings/.jsdtscope deleted file mode 100644 index 869c01d..0000000 --- a/deepl-connector-test/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/deepl-connector-test/.settings/ch.ivyteam.ivy.designer.prefs b/deepl-connector-test/.settings/ch.ivyteam.ivy.designer.prefs index 8ac7d6c..2047d48 100644 --- a/deepl-connector-test/.settings/ch.ivyteam.ivy.designer.prefs +++ b/deepl-connector-test/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,5 +1,4 @@ -ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.deepl.test.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.deepl.test ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11 -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 -eclipse.preferences.version=1 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001 +eclipse.preferences.version=1 \ No newline at end of file diff --git a/deepl-connector-test/.settings/org.eclipse.jdt.core.prefs b/deepl-connector-test/.settings/org.eclipse.jdt.core.prefs index d4540a5..3a79233 100644 --- a/deepl-connector-test/.settings/org.eclipse.jdt.core.prefs +++ b/deepl-connector-test/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +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.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 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 +org.eclipse.jdt.core.compiler.source=21 diff --git a/deepl-connector-test/.settings/org.eclipse.wst.common.component b/deepl-connector-test/.settings/org.eclipse.wst.common.component index 355fa15..ce8c10e 100644 --- a/deepl-connector-test/.settings/org.eclipse.wst.common.component +++ b/deepl-connector-test/.settings/org.eclipse.wst.common.component @@ -2,10 +2,9 @@ - - + \ No newline at end of file diff --git a/deepl-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml b/deepl-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml index 156ecdb..621b1f8 100644 --- a/deepl-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/deepl-connector-test/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,8 +1,6 @@ - - + - - + \ No newline at end of file diff --git a/deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container b/deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a..0000000 --- a/deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name b/deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b..0000000 --- a/deepl-connector-test/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/deepl-connector-test/config/variables.yaml b/deepl-connector-test/config/variables.yaml index 717311b..1309be2 100644 --- a/deepl-connector-test/config/variables.yaml +++ b/deepl-connector-test/config/variables.yaml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/variables.json Variables: deepl-connector: authKey: '' diff --git a/deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.d.json b/deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.d.json new file mode 100644 index 0000000..1361b7c --- /dev/null +++ b/deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.d.json @@ -0,0 +1,6 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", + "simpleName" : "Data", + "namespace" : "com.axonivy.connector.deepl.test", + "isBusinessCaseData" : false +} \ No newline at end of file diff --git a/deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.ivyClass b/deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.ivyClass deleted file mode 100644 index f7a0c65..0000000 --- a/deepl-connector-test/dataclasses/com/axonivy/connector/deepl/test/Data.ivyClass +++ /dev/null @@ -1,2 +0,0 @@ -Data #class -com.axonivy.connector.deepl.test #namespace diff --git a/deepl-connector/.classpath b/deepl-connector/.classpath index e63c18d..ffccbf4 100644 --- a/deepl-connector/.classpath +++ b/deepl-connector/.classpath @@ -5,12 +5,7 @@ - - - - - - + diff --git a/deepl-connector/.project b/deepl-connector/.project index 98b5e12..559ff4b 100644 --- a/deepl-connector/.project +++ b/deepl-connector/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder @@ -44,6 +49,5 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.jem.beaninfo.BeanInfoNature org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - + \ No newline at end of file diff --git a/deepl-connector/.settings/.jsdtscope b/deepl-connector/.settings/.jsdtscope deleted file mode 100644 index 869c01d..0000000 --- a/deepl-connector/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/deepl-connector/.settings/ch.ivyteam.ivy.designer.prefs b/deepl-connector/.settings/ch.ivyteam.ivy.designer.prefs index 2c00093..5ede4f5 100644 --- a/deepl-connector/.settings/ch.ivyteam.ivy.designer.prefs +++ b/deepl-connector/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,5 +1,4 @@ -ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.deepl.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.deepl ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11 -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 -eclipse.preferences.version=1 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001 +eclipse.preferences.version=1 \ No newline at end of file diff --git a/deepl-connector/.settings/org.eclipse.jdt.core.prefs b/deepl-connector/.settings/org.eclipse.jdt.core.prefs index d4540a5..3a79233 100644 --- a/deepl-connector/.settings/org.eclipse.jdt.core.prefs +++ b/deepl-connector/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +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.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 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 +org.eclipse.jdt.core.compiler.source=21 diff --git a/deepl-connector/.settings/org.eclipse.wst.common.component b/deepl-connector/.settings/org.eclipse.wst.common.component index f11b14f..27de8ba 100644 --- a/deepl-connector/.settings/org.eclipse.wst.common.component +++ b/deepl-connector/.settings/org.eclipse.wst.common.component @@ -2,10 +2,9 @@ - - + \ No newline at end of file diff --git a/deepl-connector/.settings/org.eclipse.wst.common.project.facet.core.xml b/deepl-connector/.settings/org.eclipse.wst.common.project.facet.core.xml index 156ecdb..621b1f8 100644 --- a/deepl-connector/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/deepl-connector/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,8 +1,6 @@ - - + - - + \ No newline at end of file diff --git a/deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container b/deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a..0000000 --- a/deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name b/deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b..0000000 --- a/deepl-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/deepl-connector/config/variables.yaml b/deepl-connector/config/variables.yaml index 0f05945..9158fac 100644 --- a/deepl-connector/config/variables.yaml +++ b/deepl-connector/config/variables.yaml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/variables.json Variables: deepl-connector: # DeepL Authentication Key (should end with :fx) diff --git a/deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.d.json b/deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.d.json new file mode 100644 index 0000000..7886dd1 --- /dev/null +++ b/deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.d.json @@ -0,0 +1,6 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", + "simpleName" : "Data", + "namespace" : "com.axonivy.connector.deepl", + "isBusinessCaseData" : false +} \ No newline at end of file diff --git a/deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.ivyClass b/deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.ivyClass deleted file mode 100644 index 87e94b3..0000000 --- a/deepl-connector/dataclasses/com/axonivy/connector/deepl/Data.ivyClass +++ /dev/null @@ -1,2 +0,0 @@ -Data #class -com.axonivy.connector.deepl #namespace diff --git a/deepl-connector/dataclasses/deepl/translate/Data.d.json b/deepl-connector/dataclasses/deepl/translate/Data.d.json new file mode 100644 index 0000000..e8d9713 --- /dev/null +++ b/deepl-connector/dataclasses/deepl/translate/Data.d.json @@ -0,0 +1,35 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", + "simpleName" : "Data", + "namespace" : "deepl.translate", + "isBusinessCaseData" : false, + "fields" : [ { + "name" : "file", + "type" : "java.io.File" + }, { + "name" : "uploaded", + "type" : "com.deepl.api.v2.client.InlineResponse2001" + }, { + "name" : "check", + "type" : "com.deepl.api.v2.client.InlineResponse2002" + }, { + "name" : "translated", + "type" : "File" + }, { + "name" : "input", + "type" : "String" + }, { + "name" : "output", + "type" : "String" + }, { + "name" : "langTarget", + "type" : "com.deepl.api.v2.client.TargetLanguage" + }, { + "name" : "indexData", + "type" : "javax.persistence.Index" + }, { + "name" : "ivyFile", + "type" : "File", + "modifiers" : [ "PERSISTENT" ] + } ] +} \ No newline at end of file diff --git a/deepl-connector/dataclasses/deepl/translate/Data.ivyClass b/deepl-connector/dataclasses/deepl/translate/Data.ivyClass deleted file mode 100644 index aac5bac..0000000 --- a/deepl-connector/dataclasses/deepl/translate/Data.ivyClass +++ /dev/null @@ -1,12 +0,0 @@ -Data #class -deepl.translate #namespace -file java.io.File #field -uploaded com.deepl.api.v2.client.InlineResponse2001 #field -check com.deepl.api.v2.client.InlineResponse2002 #field -translated File #field -input String #field -output String #field -langTarget com.deepl.api.v2.client.TargetLanguage #field -indexData javax.persistence.Index #field -ivyFile File #field -ivyFile PERSISTENT #fieldModifier diff --git a/deepl-connector/processes/deepl/translate.p.json b/deepl-connector/processes/deepl/translate.p.json index d244140..14d7549 100644 --- a/deepl-connector/processes/deepl/translate.p.json +++ b/deepl-connector/processes/deepl/translate.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", "id" : "1865BA0763310472", "kind" : "CALLABLE_SUB", "config" : { @@ -16,104 +16,139 @@ "type" : "RestClientCall", "name" : "upload", "config" : { - "bodyObjectMapping" : { - "param.file" : "in.ivyFile" - }, - "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", "method" : "POST", - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.deepl.api.v2.client.DocumentBody", - "bodyInputType" : "FORM", - "bodyForm" : { - "source_lang" : "", - "target_lang" : "in.langTarget", - "file" : "in.file", - "filename" : "in.file.getName()", - "formality" : "", - "glossary_id" : "", - "" : "" + "target" : { + "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", + "path" : "/document" }, - "path" : "/document", - "clientErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out" : "in", - "out.file" : "in.file", - "out.ivyFile" : "in.ivyFile", - "out.uploaded" : "result" + "body" : { + "type" : "FORM", + "mediaType" : "multipart/form-data", + "form" : { + "source_lang" : [ "" ], + "target_lang" : [ "in.langTarget" ], + "file" : [ "in.file" ], + "filename" : [ "in.file.getName()" ], + "formality" : [ "" ], + "glossary_id" : [ "" ], + "" : [ "" ] + }, + "entity" : { + "type" : "com.deepl.api.v2.client.DocumentBody", + "map" : { + "param.file" : "in.ivyFile" + } + } }, - "resultType" : "com.deepl.api.v2.client.InlineResponse2001", - "bodyMediaType" : "multipart/form-data" + "response" : { + "entity" : { + "type" : "com.deepl.api.v2.client.InlineResponse2001", + "map" : { + "out" : "in", + "out.file" : "in.file", + "out.ivyFile" : "in.ivyFile", + "out.uploaded" : "result" + } + } + } }, "visual" : { "at" : { "x" : 512, "y" : 216 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f14", "to" : "f13" } + "connect" : [ + { "id" : "f14", "to" : "f13" } + ] }, { "id" : "f6", "type" : "RestClientCall", "name" : "translate", "config" : { - "bodyForm" : { - "target_lang" : "in.langTarget", - "text" : "in.input.lines().toList()" - }, - "path" : "/translate", - "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", - "clientErrorCode" : "ivy:error:rest:client", "method" : "POST", - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.deepl.api.v2.client.TranslateBody", - "resultType" : "com.fasterxml.jackson.databind.JsonNode", - "bodyInputType" : "FORM", - "bodyMediaType" : "application/x-www-form-urlencoded", - "responseCode" : "out.output = result.get(\"translations\").get(0).get(\"text\").asText();" + "target" : { + "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", + "path" : "/translate" + }, + "body" : { + "type" : "FORM", + "mediaType" : "application/x-www-form-urlencoded", + "form" : { + "target_lang" : [ "in.langTarget" ], + "text" : [ "in.input.lines().toList()" ] + }, + "entity" : { + "type" : "com.deepl.api.v2.client.TranslateBody" + } + }, + "response" : { + "entity" : { + "type" : "com.fasterxml.jackson.databind.JsonNode", + "code" : "out.output = result.get(\"translations\").get(0).get(\"text\").asText();" + } + } }, "visual" : { "at" : { "x" : 512, "y" : 408 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f7", "to" : "f5" } + "connect" : [ + { "id" : "f7", "to" : "f5" } + ] }, { "id" : "f13", "type" : "RestClientCall", "name" : "check", "config" : { - "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", "method" : "POST", - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.deepl.api.v2.client.DocumentDocumentIdBody", - "bodyInputType" : "FORM", - "bodyForm" : { - "source_lang" : "", - "formality" : "", - "glossary_id" : "", - "document_key" : "in.uploaded.documentKey" - }, - "path" : "/document/{document_id}", - "clientErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.check" : "result" + "target" : { + "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", + "path" : "/document/{document_id}", + "templateParams" : { + "document_id" : "in.uploaded.documentId" + } }, - "templateParams" : { - "document_id" : "in.uploaded.documentId" + "body" : { + "type" : "FORM", + "mediaType" : "application/x-www-form-urlencoded", + "form" : { + "source_lang" : [ "" ], + "formality" : [ "" ], + "glossary_id" : [ "" ], + "document_key" : [ "in.uploaded.documentKey" ] + }, + "entity" : { + "type" : "com.deepl.api.v2.client.DocumentDocumentIdBody" + } }, - "resultType" : "com.deepl.api.v2.client.InlineResponse2002", - "bodyMediaType" : "application/x-www-form-urlencoded" + "response" : { + "entity" : { + "type" : "com.deepl.api.v2.client.InlineResponse2002", + "map" : { + "out.check" : "result" + } + } + } }, "visual" : { "at" : { "x" : 664, "y" : 216 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f12", "to" : "f8" } + "connect" : [ + { "id" : "f12", "to" : "f8" } + ] }, { "id" : "f8", "type" : "Alternative", + "config" : { + "conditions" : { + "f18" : "in.check.status == com.deepl.api.v2.client.InlineResponse2002.StatusEnum.DONE" + } + }, "visual" : { "at" : { "x" : 776, "y" : 216 } }, "connect" : [ - { "id" : "f18", "to" : "f16", "condition" : "in.check.status == com.deepl.api.v2.client.InlineResponse2002.StatusEnum.DONE" }, + { "id" : "f18", "to" : "f16" }, { "id" : "f19", "to" : "f15", "via" : [ { "x" : 776, "y" : 304 } ] } ] }, { @@ -121,40 +156,50 @@ "type" : "RestClientCall", "name" : "download", "config" : { - "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", "method" : "POST", - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.deepl.api.v2.client.DocumentDocumentIdBody", - "bodyInputType" : "FORM", - "responseCode" : [ - "import java.nio.file.StandardCopyOption;", - "import java.nio.file.Files;", - "File res = new File(\"translated.pdf\");", - "Files.copy(result, res.getJavaFile().toPath(), StandardCopyOption.REPLACE_EXISTING);", - "out.translated = res;" - ], - "bodyForm" : { - "source_lang" : "", - "formality" : "", - "glossary_id" : "", - "document_key" : "in.uploaded.documentKey" - }, - "path" : "/document/{document_id}/result", - "clientErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.translated" : "in.translated" + "target" : { + "clientId" : "d0a119ea-f566-47be-8cc8-c6681c129161", + "path" : "/document/{document_id}/result", + "templateParams" : { + "document_id" : "in.uploaded.documentId" + } }, - "templateParams" : { - "document_id" : "in.uploaded.documentId" + "body" : { + "type" : "FORM", + "mediaType" : "application/x-www-form-urlencoded", + "form" : { + "source_lang" : [ "" ], + "formality" : [ "" ], + "glossary_id" : [ "" ], + "document_key" : [ "in.uploaded.documentKey" ] + }, + "entity" : { + "type" : "com.deepl.api.v2.client.DocumentDocumentIdBody" + } }, - "resultType" : "java.io.InputStream", - "bodyMediaType" : "application/x-www-form-urlencoded" + "response" : { + "entity" : { + "type" : "java.io.InputStream", + "map" : { + "out.translated" : "in.translated" + }, + "code" : [ + "import java.nio.file.StandardCopyOption;", + "import java.nio.file.Files;", + "File res = new File(\"translated.pdf\");", + "Files.copy(result, res.getJavaFile().toPath(), StandardCopyOption.REPLACE_EXISTING);", + "out.translated = res;" + ] + } + } }, "visual" : { "at" : { "x" : 896, "y" : 216 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png" }, - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] }, { "id" : "f15", "type" : "Script", @@ -167,13 +212,15 @@ "visual" : { "at" : { "x" : 664, "y" : 304 } }, - "connect" : { "id" : "f17", "to" : "f13" } + "connect" : [ + { "id" : "f17", "to" : "f13" } + ] }, { "id" : "f20", "type" : "CallSubStart", "name" : "text(String,TargetLanguage)", "config" : { - "callSignature" : "text", + "signature" : "text", "input" : { "params" : [ { "name" : "text", "type" : "String", "desc" : "The text to translate" }, @@ -195,7 +242,7 @@ }, "result" : { "params" : [ - { "name" : "translation", "type" : "String" } + { "name" : "translation", "type" : "String", "desc" : "" } ], "map" : { "result.translation" : "in.output" @@ -206,7 +253,9 @@ "at" : { "x" : 360, "y" : 408 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png?small" }, - "connect" : { "id" : "f21", "to" : "f6" } + "connect" : [ + { "id" : "f21", "to" : "f6" } + ] }, { "id" : "f5", "type" : "CallSubEnd", @@ -218,7 +267,7 @@ "type" : "CallSubStart", "name" : "document(File,TargetLanguage)", "config" : { - "callSignature" : "document", + "signature" : "document", "input" : { "params" : [ { "name" : "file", "type" : "File", "desc" : "A file to translate (e.g. docx, pdf, pptx)" }, @@ -241,18 +290,22 @@ }, "result" : { "params" : [ - { "name" : "translated", "type" : "File" } + { "name" : "translated", "type" : "File", "desc" : "" } ], "map" : { "result.translated" : "in.translated" } - }, - "tags" : "connector" + } }, + "tags" : [ + "connector" + ], "visual" : { "at" : { "x" : 360, "y" : 216 }, "icon" : "res:/webContent/logo/deepl-logo-blue.png?small" }, - "connect" : { "id" : "f9", "to" : "f4" } + "connect" : [ + { "id" : "f9", "to" : "f4" } + ] } ] } \ No newline at end of file From b06ef94e676cced82838d24e57224890fa213eb9 Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Fri, 29 Nov 2024 12:13:07 +0100 Subject: [PATCH 2/6] Update maven version to 12.0.0-SNAPSHOT --- deepl-connector-demo/pom.xml | 4 ++-- deepl-connector-product/pom.xml | 2 +- deepl-connector-test/pom.xml | 6 +++--- deepl-connector/pom.xml | 4 ++-- pom.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deepl-connector-demo/pom.xml b/deepl-connector-demo/pom.xml index eee073d..9d53031 100644 --- a/deepl-connector-demo/pom.xml +++ b/deepl-connector-demo/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.axonivy.connector.deepl deepl-connector-demo - 10.0.10-SNAPSHOT + 12.0.0-SNAPSHOT iar - 10.0.16 + 12.0.0 diff --git a/deepl-connector-product/pom.xml b/deepl-connector-product/pom.xml index 9183657..3150dd8 100644 --- a/deepl-connector-product/pom.xml +++ b/deepl-connector-product/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.axonivy.connector.deepl deepl-connector-product - 10.0.10-SNAPSHOT + 12.0.0-SNAPSHOT pom diff --git a/deepl-connector-test/pom.xml b/deepl-connector-test/pom.xml index 55b8622..041332f 100644 --- a/deepl-connector-test/pom.xml +++ b/deepl-connector-test/pom.xml @@ -3,11 +3,11 @@ 4.0.0 com.axonivy.connector.deepl deepl-connector-test - 10.0.10-SNAPSHOT + 12.0.0-SNAPSHOT iar - 10.0.16 - 10.0.16 + 12.0.0 + 12.0.1 diff --git a/deepl-connector/pom.xml b/deepl-connector/pom.xml index fd00bb9..6e2bd7f 100644 --- a/deepl-connector/pom.xml +++ b/deepl-connector/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.axonivy.connector.deepl deepl-connector - 10.0.10-SNAPSHOT + 12.0.0-SNAPSHOT iar - 10.0.16 + 12.0.0 diff --git a/pom.xml b/pom.xml index 549617b..85a13dd 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.axonivy.connector.deepl deepl-connector deepl-connector-modules - 10.0.10-SNAPSHOT + 12.0.0-SNAPSHOT pom From e41c520bdb96ea08fdf09c67f9a2e8bd3c60ce5c Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Fri, 29 Nov 2024 12:13:07 +0100 Subject: [PATCH 3/6] Update workflow actions to v5 --- .github/workflows/ci.yml | 2 +- .github/workflows/dev.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87d78f0..bd4b9c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,4 +9,4 @@ on: jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v4 + uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v5 diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c2fee37..ae5e6c3 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -8,4 +8,4 @@ on: jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/dev.yml@v4 + uses: axonivy-market/github-workflows/.github/workflows/dev.yml@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab5b0d7..bc801b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,4 +4,4 @@ on: workflow_dispatch jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/release.yml@v4 + uses: axonivy-market/github-workflows/.github/workflows/release.yml@v5 From 8c3a417b93894ed8ef6b87ff58c0102435d13dd7 Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Fri, 29 Nov 2024 13:50:39 +0100 Subject: [PATCH 4/6] convert to PF13 using Designer --- deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs | 4 ++-- deepl-connector-demo/webContent/layouts/frame-10.xhtml | 2 +- deepl-connector-test/.settings/ch.ivyteam.ivy.designer.prefs | 4 ++-- deepl-connector/.settings/ch.ivyteam.ivy.designer.prefs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs b/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs index c233b98..1419564 100644 --- a/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs +++ b/deepl-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,4 +1,4 @@ ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.deepl.demo -ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11 +ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001 -eclipse.preferences.version=1 \ No newline at end of file +eclipse.preferences.version=1 diff --git a/deepl-connector-demo/webContent/layouts/frame-10.xhtml b/deepl-connector-demo/webContent/layouts/frame-10.xhtml index 936a73b..b6244a1 100644 --- a/deepl-connector-demo/webContent/layouts/frame-10.xhtml +++ b/deepl-connector-demo/webContent/layouts/frame-10.xhtml @@ -32,7 +32,7 @@ and refence it below in the head part. - +