From d42eb7642ef8b1b03b27524080936bc791ef16a2 Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Mon, 12 Aug 2024 17:13:06 +0700 Subject: [PATCH 01/10] Convert connector to work with Designer 11.3.1 --- alfresco-connector-demo/.classpath | 7 +- alfresco-connector-demo/.project | 5 + .../.settings/ch.ivyteam.ivy.designer.prefs | 5 +- .../org.eclipse.wst.common.component | 58 +--- alfresco-connector-demo/pom.xml | 23 +- .../processes/AlfrescoDemo/ecm.p.json | 26 +- .../AlfrescoDemo/readDocuments.p.json | 68 +++-- .../com/alfresco/connector/demo/ecm/ecm.xhtml | 8 +- .../connector/demo/ecm/ecmProcess.p.json | 277 ++++++++++-------- alfresco-connector-product/pom.xml | 3 +- alfresco-connector-test/.classpath | 7 +- alfresco-connector-test/.project | 5 + .../.settings/ch.ivyteam.ivy.designer.prefs | 5 +- .../org.eclipse.wst.common.component | 34 +-- alfresco-connector-test/pom.xml | 159 +++++----- .../ecm/connector/test/TestAlfrescoECM.java | 3 +- alfresco-connector/.classpath | 7 +- alfresco-connector/.project | 5 + .../.settings/ch.ivyteam.ivy.designer.prefs | 5 +- .../org.eclipse.wst.common.component | 31 +- alfresco-connector/config/rest-clients.yaml | 1 + alfresco-connector/config/variables.yaml | 9 +- alfresco-connector/pom.xml | 9 +- pom.xml | 2 +- 24 files changed, 358 insertions(+), 404 deletions(-) diff --git a/alfresco-connector-demo/.classpath b/alfresco-connector-demo/.classpath index 8a3fc47..a9581e2 100644 --- a/alfresco-connector-demo/.classpath +++ b/alfresco-connector-demo/.classpath @@ -4,12 +4,7 @@ - - - - - - + diff --git a/alfresco-connector-demo/.project b/alfresco-connector-demo/.project index 2445eb5..d71e32d 100644 --- a/alfresco-connector-demo/.project +++ b/alfresco-connector-demo/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder diff --git a/alfresco-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs b/alfresco-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs index cd570a1..a9eb714 100644 --- a/alfresco-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs +++ b/alfresco-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,5 +1,6 @@ ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.alfresco.connector.demo.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.alfresco.connector.demo ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:useProjectSettings=true -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 -eclipse.preferences.version=1 \ No newline at end of file +ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=113000 +eclipse.preferences.version=1 diff --git a/alfresco-connector-demo/.settings/org.eclipse.wst.common.component b/alfresco-connector-demo/.settings/org.eclipse.wst.common.component index 81c5671..f401d43 100644 --- a/alfresco-connector-demo/.settings/org.eclipse.wst.common.component +++ b/alfresco-connector-demo/.settings/org.eclipse.wst.common.component @@ -1,66 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/alfresco-connector-demo/pom.xml b/alfresco-connector-demo/pom.xml index de4ecb8..9671238 100644 --- a/alfresco-connector-demo/pom.xml +++ b/alfresco-connector-demo/pom.xml @@ -1,22 +1,14 @@ - + 4.0.0 com.axonivy.connector.alfresco alfresco-connector-demo - 10.0.7-SNAPSHOT + 11.3.1-SNAPSHOT iar 10.0.16 - - - sonatype - https://oss.sonatype.org/content/repositories/snapshots - - always - - - com.axonivy.connector.alfresco @@ -25,6 +17,15 @@ iar + + + + always + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + diff --git a/alfresco-connector-demo/processes/AlfrescoDemo/ecm.p.json b/alfresco-connector-demo/processes/AlfrescoDemo/ecm.p.json index 7cd933d..2af14c8 100644 --- a/alfresco-connector-demo/processes/AlfrescoDemo/ecm.p.json +++ b/alfresco-connector-demo/processes/AlfrescoDemo/ecm.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "177A605C29E3AA51", "config" : { "data" : "com.alfresco.connector.Data" @@ -9,16 +9,21 @@ "type" : "RequestStart", "name" : "start.ivp", "config" : { - "callSignature" : "start", - "outLink" : "start.ivp", - "startName" : "Upload Documents to Alfresco ECM", - "tags" : "demo" + "signature" : "start", + "request" : { + "name" : "Upload Documents to Alfresco ECM" + } }, + "tags" : [ + "demo" + ], "visual" : { "at" : { "x" : 96, "y" : 128 }, "labelOffset" : { "x" : 12, "y" : 37 } }, - "connect" : { "id" : "f4", "to" : "f3" } + "connect" : [ + { "id" : "f4", "to" : "f3" } + ] }, { "id" : "f1", "type" : "TaskEnd", @@ -33,14 +38,15 @@ "to Alfresco ECM" ], "config" : { - "dialogId" : "com.alfresco.connector.demo.ecm", - "startMethod" : "start()" + "dialog" : "com.alfresco.connector.demo.ecm:start()" }, "visual" : { "at" : { "x" : 224, "y" : 128 }, - "size" : { "width" : 128, "height" : 60 } + "size" : { "width" : 128 } }, - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] }, { "id" : "f5", "type" : "ProcessAnnotation", diff --git a/alfresco-connector-demo/processes/AlfrescoDemo/readDocuments.p.json b/alfresco-connector-demo/processes/AlfrescoDemo/readDocuments.p.json index 4b7e92c..d531b74 100644 --- a/alfresco-connector-demo/processes/AlfrescoDemo/readDocuments.p.json +++ b/alfresco-connector-demo/processes/AlfrescoDemo/readDocuments.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "17811D7894B7C803", "kind" : "CALLABLE_SUB", "config" : { @@ -10,10 +10,10 @@ "type" : "CallSubStart", "name" : "call(folderid)", "config" : { - "callSignature" : "call", + "signature" : "call", "input" : { "params" : [ - { "name" : "folderid", "type" : "String" } + { "name" : "folderid", "type" : "String", "desc" : "" } ], "map" : { "out.folderid" : "param.folderid" @@ -21,8 +21,8 @@ }, "result" : { "params" : [ - { "name" : "connectionError", "type" : "String" }, - { "name" : "documents", "type" : "List" } + { "name" : "connectionError", "type" : "String", "desc" : "" }, + { "name" : "documents", "type" : "List", "desc" : "" } ], "map" : { "result.connectionError" : "in.connectionError", @@ -34,7 +34,9 @@ "at" : { "x" : 96, "y" : 112 }, "labelOffset" : { "x" : 18, "y" : 37 } }, - "connect" : { "id" : "f3", "to" : "f6" } + "connect" : [ + { "id" : "f3", "to" : "f6" } + ] }, { "id" : "f1", "type" : "CallSubEnd", @@ -49,31 +51,35 @@ "of Folder" ], "config" : { - "path" : "/nodes/{nodeId}/children", - "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", - "clientErrorCode" : "ivy:error:rest:client", - "queryParams" : { - "skipCount" : "", - "maxItems" : "", - "orderBy" : "", - "where" : "", - "include" : "", - "relativePath" : "", - "includeSource" : "", - "fields" : "" - }, - "statusErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.documents" : "result.list.entries" - }, - "templateParams" : { - "nodeId" : "in.folderid" + "target" : { + "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", + "path" : "/nodes/{nodeId}/children", + "templateParams" : { + "nodeId" : "in.folderid" + }, + "queryParams" : { + "skipCount" : "", + "maxItems" : "", + "orderBy" : "", + "where" : "", + "include" : "", + "relativePath" : "", + "includeSource" : "", + "fields" : "" + } }, - "resultType" : "com.alfresco.api.explorer.NodeChildAssociationPaging" + "response" : { + "entity" : { + "type" : "com.alfresco.api.explorer.NodeChildAssociationPaging", + "map" : { + "out.documents" : "result.list.entries" + } + } + } }, "visual" : { "at" : { "x" : 232, "y" : 112 }, - "size" : { "width" : 128, "height" : 60 }, + "size" : { "width" : 128 }, "color" : "NodeStyle4" }, "boundaries" : [ { @@ -92,9 +98,13 @@ "at" : { "x" : 280, "y" : 144 }, "labelOffset" : { "x" : 0, "y" : 15 } }, - "connect" : { "id" : "f4", "to" : "f1", "via" : [ { "x" : 384, "y" : 144 } ] } + "connect" : [ + { "id" : "f4", "to" : "f1", "via" : [ { "x" : 384, "y" : 144 } ] } + ] } ], - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] }, { "id" : "f5", "type" : "ProcessAnnotation", diff --git a/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecm.xhtml b/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecm.xhtml index c8990bb..01b9699 100644 --- a/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecm.xhtml +++ b/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecm.xhtml @@ -35,7 +35,7 @@ - + @@ -44,9 +44,9 @@ - + - +
@@ -57,7 +57,7 @@ value=" by: #{node.entry.createdByUser.displayName}" />
-
+

No enties found
diff --git a/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecmProcess.p.json b/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecmProcess.p.json index 8a56c90..7613fdb 100644 --- a/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecmProcess.p.json +++ b/alfresco-connector-demo/src_hd/com/alfresco/connector/demo/ecm/ecmProcess.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "177A609A24FD435F", "kind" : "HTML_DIALOG", "config" : { @@ -10,7 +10,7 @@ "type" : "HtmlDialogStart", "name" : "start()", "config" : { - "callSignature" : "start", + "signature" : "start", "input" : { "map" : { "out.connectionError" : "null", @@ -25,7 +25,9 @@ "at" : { "x" : 80, "y" : 128 }, "labelOffset" : { "x" : -14, "y" : 35 } }, - "connect" : { "id" : "f6", "to" : "f2" } + "connect" : [ + { "id" : "f6", "to" : "f2" } + ] }, { "id" : "f1", "type" : "HtmlDialogEnd", @@ -43,7 +45,9 @@ "at" : { "x" : 80, "y" : 256 }, "labelOffset" : { "x" : 10, "y" : 35 } }, - "connect" : { "id" : "f14", "to" : "f4" } + "connect" : [ + { "id" : "f14", "to" : "f4" } + ] }, { "id" : "f11", "type" : "RestClientCall", @@ -52,46 +56,61 @@ "to \"Folder\"" ], "config" : { - "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", "method" : "POST", - "queryParams" : { - "include" : "", - "fields" : "", - "autoRename" : "" - }, - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.alfresco.api.explorer.NodeBodyCreate", - "bodyInputType" : "FORM", - "bodyForm" : { - "filedata" : "in.file.getJavaFile()" - }, - "path" : "/nodes/{nodeId}/children", - "clientErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.file" : "null" + "target" : { + "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", + "path" : "/nodes/{nodeId}/children", + "templateParams" : { + "nodeId" : "in.folderid" + }, + "queryParams" : { + "include" : "", + "fields" : "", + "autoRename" : "" + } }, - "templateParams" : { - "nodeId" : "in.folderid" + "body" : { + "type" : "FORM", + "mediaType" : "multipart/form-data", + "form" : { + "filedata" : [ "in.file.getJavaFile()" ] + }, + "entity" : { + "type" : "com.alfresco.api.explorer.NodeBodyCreate" + } }, - "resultType" : "com.alfresco.api.explorer.NodeEntry", - "bodyMediaType" : "multipart/form-data" + "response" : { + "entity" : { + "type" : "com.alfresco.api.explorer.NodeEntry", + "map" : { + "out.file" : "null" + } + } + } }, "visual" : { "at" : { "x" : 352, "y" : 256 }, - "size" : { "width" : 128, "height" : 60 }, + "size" : { "width" : 128 }, "color" : "NodeStyle4" }, - "connect" : { "id" : "f25", "to" : "f13" } + "connect" : [ + { "id" : "f25", "to" : "f13" } + ] }, { "id" : "f4", "type" : "Alternative", "name" : "valid document?", + "config" : { + "conditions" : { + "f10" : "in.file.exists() && in.file.getName() !=\"null\"" + } + }, "visual" : { "at" : { "x" : 176, "y" : 256 }, "labelOffset" : { "x" : 10, "y" : -16 } }, "connect" : [ - { "id" : "f10", "to" : "f11", "condition" : "in.file.exists() && in.file.getName() !=\"null\"" }, + { "id" : "f10", "to" : "f11" }, { "id" : "f9", "to" : "f5", "via" : [ { "x" : 176, "y" : 320 } ] } ] }, { @@ -110,7 +129,9 @@ "at" : { "x" : 432, "y" : 336 }, "size" : { "width" : 208, "height" : 30 } }, - "connect" : { "id" : "f16", "to" : "f11" } + "connect" : [ + { "id" : "f16", "to" : "f11" } + ] }, { "id" : "f17", "type" : "HtmlDialogEventStart", @@ -122,7 +143,9 @@ "at" : { "x" : 80, "y" : 464 }, "labelOffset" : { "x" : 34, "y" : 35 } }, - "connect" : { "id" : "f23", "to" : "f29" } + "connect" : [ + { "id" : "f23", "to" : "f29" } + ] }, { "id" : "f18", "type" : "HtmlDialogEventStart", @@ -134,7 +157,9 @@ "at" : { "x" : 80, "y" : 560 }, "labelOffset" : { "x" : 35, "y" : 35 } }, - "connect" : { "id" : "f19", "to" : "f21" } + "connect" : [ + { "id" : "f19", "to" : "f21" } + ] }, { "id" : "f21", "type" : "RestClientCall", @@ -143,41 +168,50 @@ "to folder" ], "config" : { - "bodyRaw" : [ - "{", - " \"content\": \"This is an ivy comment\"", - "}" - ], - "bodyObjectMapping" : { - "param.content" : "in.comment" - }, - "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", "method" : "POST", - "queryParams" : { - "fields" : "" - }, - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.alfresco.api.explorer.CommentBody", - "bodyInputType" : "ENTITY", - "bodyForm" : { - "content" : "\"My ivy comment\"", - "" : "" - }, - "path" : "/nodes/{nodeId}/comments", - "clientErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.newFoldername" : "\"\"" + "target" : { + "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", + "path" : "/nodes/{nodeId}/comments", + "templateParams" : { + "nodeId" : "in.folderid" + }, + "queryParams" : { + "fields" : "" + } }, - "templateParams" : { - "nodeId" : "in.folderid" + "body" : { + "form" : { + "content" : [ "\"My ivy comment\"" ], + "" : [ "" ] + }, + "raw" : [ + "{", + " \"content\": \"This is an ivy comment\"", + "}" + ], + "entity" : { + "type" : "com.alfresco.api.explorer.CommentBody", + "map" : { + "param.content" : "in.comment" + } + } }, - "resultType" : "com.alfresco.api.explorer.CommentEntry" + "response" : { + "entity" : { + "type" : "com.alfresco.api.explorer.CommentEntry", + "map" : { + "out.newFoldername" : "\"\"" + } + } + } }, "visual" : { "at" : { "x" : 304, "y" : 560 }, - "size" : { "width" : 128, "height" : 60 } + "size" : { "width" : 128 } }, - "connect" : { "id" : "f22", "to" : "f20" } + "connect" : [ + { "id" : "f22", "to" : "f20" } + ] }, { "id" : "f20", "type" : "HtmlDialogEnd", @@ -192,48 +226,57 @@ "to node \"Root\" " ], "config" : { - "bodyRaw" : [ - "{", - " \"name\":\"AxonIvy Documents\",", - " \"nodeType\":\"cm:folder\"", - "}" - ], - "bodyObjectMapping" : { - "param.name" : "in.newFoldername", - "param.nodeType" : "\"cm:folder\"" - }, - "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", "method" : "POST", - "queryParams" : { - "autoRename" : "", - "include" : "", - "fields" : "" - }, - "statusErrorCode" : "ivy:error:rest:client", - "bodyObjectType" : "com.alfresco.api.explorer.NodeBodyCreate", - "bodyInputType" : "ENTITY", - "responseCode" : "out.folder.add(new com.alfresco.connector.demo.Folder().setName(result.entry.name).setId(result.entry.id));", - "bodyForm" : { - "content" : "\"My ivy comment\"", - "" : "" - }, - "path" : "/nodes/{nodeId}/children", - "clientErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.folderid" : "result.entry.id", - "out.foldername" : "result.entry.name", - "out.newFoldername" : "\"\"" + "target" : { + "clientId" : "f0cc7209-7cdd-4a5d-9dde-72257a4bf963", + "path" : "/nodes/{nodeId}/children", + "templateParams" : { + "nodeId" : "\"-root-\"" + }, + "queryParams" : { + "autoRename" : "", + "include" : "", + "fields" : "" + } }, - "templateParams" : { - "nodeId" : "\"-root-\"" + "body" : { + "form" : { + "content" : [ "\"My ivy comment\"" ], + "" : [ "" ] + }, + "raw" : [ + "{", + " \"name\":\"AxonIvy Documents\",", + " \"nodeType\":\"cm:folder\"", + "}" + ], + "entity" : { + "type" : "com.alfresco.api.explorer.NodeBodyCreate", + "map" : { + "param.name" : "in.newFoldername", + "param.nodeType" : "\"cm:folder\"" + } + } }, - "resultType" : "com.alfresco.api.explorer.NodeEntry" + "response" : { + "entity" : { + "type" : "com.alfresco.api.explorer.NodeEntry", + "map" : { + "out.folderid" : "result.entry.id", + "out.foldername" : "result.entry.name", + "out.newFoldername" : "\"\"" + }, + "code" : "out.folder.add(new com.alfresco.connector.demo.Folder().setName(result.entry.name).setId(result.entry.id));" + } + } }, "visual" : { "at" : { "x" : 304, "y" : 464 }, - "size" : { "width" : 128, "height" : 60 } + "size" : { "width" : 128 } }, - "connect" : { "id" : "f26", "to" : "f13", "via" : [ { "x" : 576, "y" : 464 } ] } + "connect" : [ + { "id" : "f26", "to" : "f13", "via" : [ { "x" : 576, "y" : 464 } ] } + ] }, { "id" : "f24", "type" : "HtmlDialogEnd", @@ -251,10 +294,10 @@ "type" : "HtmlDialogMethodStart", "name" : "openFolder(Folder)", "config" : { - "callSignature" : "openFolder", + "signature" : "openFolder", "input" : { "params" : [ - { "name" : "folder", "type" : "com.alfresco.connector.demo.Folder" } + { "name" : "folder", "type" : "com.alfresco.connector.demo.Folder", "desc" : "" } ], "map" : { "out.folderid" : "param.folder.id", @@ -265,9 +308,11 @@ }, "visual" : { "at" : { "x" : 80, "y" : 640 }, - "labelOffset" : { "x" : 33, "y" : 33 } + "labelOffset" : { "x" : 33 } }, - "connect" : { "id" : "f27", "to" : "f13", "via" : [ { "x" : 576, "y" : 640 } ] } + "connect" : [ + { "id" : "f27", "to" : "f13", "via" : [ { "x" : 576, "y" : 640 } ] } + ] }, { "id" : "f2", "type" : "SubProcessCall", @@ -277,27 +322,26 @@ ], "config" : { "processCall" : "AlfrescoDemo/readDocuments:call(String)", + "call" : { + "map" : { + "param.folderid" : "\"-shared-\"" + } + }, "output" : { "map" : { "out" : "in", "out.connectionError" : "result.connectionError", "out.documents" : "result.documents" } - }, - "call" : { - "params" : [ - { "name" : "folderid", "type" : "String" } - ], - "map" : { - "param.folderid" : "\"-shared-\"" - } } }, "visual" : { "at" : { "x" : 296, "y" : 128 }, - "size" : { "width" : 144, "height" : 60 } + "size" : { "width" : 144 } }, - "connect" : { "id" : "f7", "to" : "f1" } + "connect" : [ + { "id" : "f7", "to" : "f1" } + ] }, { "id" : "f13", "type" : "SubProcessCall", @@ -307,27 +351,26 @@ ], "config" : { "processCall" : "AlfrescoDemo/readDocuments:call(String)", + "call" : { + "map" : { + "param.folderid" : "in.folderid" + } + }, "output" : { "map" : { "out" : "in", "out.connectionError" : "result.connectionError", "out.documents" : "result.documents" } - }, - "call" : { - "params" : [ - { "name" : "folderid", "type" : "String" } - ], - "map" : { - "param.folderid" : "in.folderid" - } } }, "visual" : { "at" : { "x" : 576, "y" : 256 }, - "size" : { "width" : 144, "height" : 60 } + "size" : { "width" : 144 } }, - "connect" : { "id" : "f28", "to" : "f24" } + "connect" : [ + { "id" : "f28", "to" : "f24" } + ] } ], "layout" : { "colors" : { diff --git a/alfresco-connector-product/pom.xml b/alfresco-connector-product/pom.xml index da1f392..5dbd466 100644 --- a/alfresco-connector-product/pom.xml +++ b/alfresco-connector-product/pom.xml @@ -2,7 +2,8 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-product - 10.0.7-SNAPSHOT + + 11.3.1-SNAPSHOT pom diff --git a/alfresco-connector-test/.classpath b/alfresco-connector-test/.classpath index 81c1c3f..988ea57 100644 --- a/alfresco-connector-test/.classpath +++ b/alfresco-connector-test/.classpath @@ -4,12 +4,7 @@
- - - - - - + diff --git a/alfresco-connector-test/.project b/alfresco-connector-test/.project index 0284119..43aa134 100644 --- a/alfresco-connector-test/.project +++ b/alfresco-connector-test/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder diff --git a/alfresco-connector-test/.settings/ch.ivyteam.ivy.designer.prefs b/alfresco-connector-test/.settings/ch.ivyteam.ivy.designer.prefs index 8a53cb9..bd78ff9 100644 --- a/alfresco-connector-test/.settings/ch.ivyteam.ivy.designer.prefs +++ b/alfresco-connector-test/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,4 +1,5 @@ ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=alfresco.ecm.connector.test.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=alfresco.ecm.connector.test -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 -eclipse.preferences.version=1 \ No newline at end of file +ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=113000 +eclipse.preferences.version=1 diff --git a/alfresco-connector-test/.settings/org.eclipse.wst.common.component b/alfresco-connector-test/.settings/org.eclipse.wst.common.component index 368a6a0..aa0bee6 100644 --- a/alfresco-connector-test/.settings/org.eclipse.wst.common.component +++ b/alfresco-connector-test/.settings/org.eclipse.wst.common.component @@ -1,43 +1,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/alfresco-connector-test/pom.xml b/alfresco-connector-test/pom.xml index a7aa1f4..0d5e6b7 100644 --- a/alfresco-connector-test/pom.xml +++ b/alfresco-connector-test/pom.xml @@ -1,78 +1,85 @@ - 4.0.0 - com.axonivy.connector.alfresco - alfresco-connector-test - 10.0.7-SNAPSHOT - iar - - 10.0.16 - 10.0.16 - - - - sonatype - https://oss.sonatype.org/content/repositories/snapshots - - always - - - - - - sonatype - https://oss.sonatype.org/content/repositories/snapshots - - always - - - - - - com.axonivy.ivy.test - unit-tester - ${tester.version} - test - - - com.axonivy.ivy.webtest - web-tester - ${tester.version} - test - - - com.axonivy.connector.alfresco - alfresco-connector-demo - ${project.version} - iar - - - com.axonivy.connector.alfresco - alfresco-connector - ${project.version} - iar - - - - src_test - - - - maven-deploy-plugin - 3.0.0-M1 - - true - - - - - - - com.axonivy.ivy.ci - project-build-plugin - ${project.build.plugin.version} - true - - - - + 4.0.0 + com.axonivy.connector.alfresco + alfresco-connector-test + + 11.3.1-SNAPSHOT + iar + + + + 11.3.0 + 11.3.0 + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + + + + com.axonivy.ivy.test + unit-tester + ${tester.version} + test + + + com.axonivy.ivy.webtest + web-tester + ${tester.version} + test + + + com.axonivy.connector.alfresco + alfresco-connector-demo + ${project.version} + iar + + + com.axonivy.connector.alfresco + alfresco-connector + ${project.version} + iar + + + + src_test + + + + maven-deploy-plugin + 3.0.0-M1 + + true + + + + + + + + com.axonivy.ivy.ci + project-build-plugin + 11.3.0 + true + + + + \ No newline at end of file diff --git a/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java b/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java index f89305f..6aca6cb 100644 --- a/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java +++ b/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java @@ -10,6 +10,7 @@ import ch.ivyteam.ivy.bpm.engine.client.sub.SubProcessCallResult; import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest; import ch.ivyteam.ivy.environment.AppFixture; +import ch.ivyteam.ivy.environment.Ivy; import ch.ivyteam.ivy.scripting.objects.List; import ch.ivyteam.ivy.security.ISession; @@ -32,7 +33,7 @@ public void callReadDocuments(BpmClient bpmClient, ISession session) { SubProcessCallResult result = bpmClient.start() .subProcess(CALL_READ_DOCUMENTS).as().session(session) .execute("-shared-").subResult(); - assertThat(result.param("connectionError", String.class)).isEmpty(); + assertThat(result.param("connectionError", String.class)).isEmpty(); assertThat(result.param("documents", List.class)).isNotEmpty(); } } diff --git a/alfresco-connector/.classpath b/alfresco-connector/.classpath index 4c26868..f1c59df 100644 --- a/alfresco-connector/.classpath +++ b/alfresco-connector/.classpath @@ -4,12 +4,7 @@ - - - - - - + diff --git a/alfresco-connector/.project b/alfresco-connector/.project index c7dfb6d..9b334ca 100644 --- a/alfresco-connector/.project +++ b/alfresco-connector/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder diff --git a/alfresco-connector/.settings/ch.ivyteam.ivy.designer.prefs b/alfresco-connector/.settings/ch.ivyteam.ivy.designer.prefs index f21b4e4..1ca91f5 100644 --- a/alfresco-connector/.settings/ch.ivyteam.ivy.designer.prefs +++ b/alfresco-connector/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,5 +1,6 @@ ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.alfresco.connector.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.alfresco.connector.demo ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:useProjectSettings=true -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 -eclipse.preferences.version=1 \ No newline at end of file +ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=113000 +eclipse.preferences.version=1 diff --git a/alfresco-connector/.settings/org.eclipse.wst.common.component b/alfresco-connector/.settings/org.eclipse.wst.common.component index e817b18..e888f8e 100644 --- a/alfresco-connector/.settings/org.eclipse.wst.common.component +++ b/alfresco-connector/.settings/org.eclipse.wst.common.component @@ -1,39 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/alfresco-connector/config/rest-clients.yaml b/alfresco-connector/config/rest-clients.yaml index 22d70c6..f881464 100644 --- a/alfresco-connector/config/rest-clients.yaml +++ b/alfresco-connector/config/rest-clients.yaml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/11.3.1/rest-clients.json RestClients: #Preconfigured for the Docker Based Community Edition running on localhost port 8080 #Admin Url: https//localhost:8080/share diff --git a/alfresco-connector/config/variables.yaml b/alfresco-connector/config/variables.yaml index fdaa8e5..746463c 100644 --- a/alfresco-connector/config/variables.yaml +++ b/alfresco-connector/config/variables.yaml @@ -2,12 +2,9 @@ Variables: # Custom variables of Alfresco Content Services API Alfresco: # Username for "Alfresco Content Service" - Username: 'admin' - + Username: admin # The endpoint uri of the rest service. Preconfigured for the Docker Based Community Edition running on localhost port 8080 - EndpointUri: 'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1' - + EndpointUri: http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1 # The password for "Alfresco Content Service". # [password] - Password: '' - + Password: admin diff --git a/alfresco-connector/pom.xml b/alfresco-connector/pom.xml index 10537d4..cdef178 100644 --- a/alfresco-connector/pom.xml +++ b/alfresco-connector/pom.xml @@ -1,20 +1,21 @@ - + 4.0.0 com.axonivy.connector.alfresco alfresco-connector - 10.0.7-SNAPSHOT + 11.3.1-SNAPSHOT iar 10.0.16 - sonatype - https://oss.sonatype.org/content/repositories/snapshots always + sonatype + https://oss.sonatype.org/content/repositories/snapshots diff --git a/pom.xml b/pom.xml index b2f44ed..87a983b 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-modules - 10.0.7-SNAPSHOT + 11.3.1-SNAPSHOT pom From 883f9f17ea54f54d222b463ee7d13232bd3da84b Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 08:51:06 +0700 Subject: [PATCH 02/10] Convert connector to work with Designer 11.3 --- .../src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java | 1 - 1 file changed, 1 deletion(-) diff --git a/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java b/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java index 6aca6cb..c0c50dc 100644 --- a/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java +++ b/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java @@ -10,7 +10,6 @@ import ch.ivyteam.ivy.bpm.engine.client.sub.SubProcessCallResult; import ch.ivyteam.ivy.bpm.exec.client.IvyProcessTest; import ch.ivyteam.ivy.environment.AppFixture; -import ch.ivyteam.ivy.environment.Ivy; import ch.ivyteam.ivy.scripting.objects.List; import ch.ivyteam.ivy.security.ISession; From 3a9dd18f89cce3332bc57c3ad938149a8c05da17 Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 09:08:47 +0700 Subject: [PATCH 03/10] Try to resolve build with maven error --- alfresco-connector-demo/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alfresco-connector-demo/pom.xml b/alfresco-connector-demo/pom.xml index 9671238..a132c6a 100644 --- a/alfresco-connector-demo/pom.xml +++ b/alfresco-connector-demo/pom.xml @@ -7,7 +7,8 @@ 11.3.1-SNAPSHOT iar - 10.0.16 + + 11.3.0 From b18b971cc5bcfc166d4427c05404fa90d85a4c2f Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 09:57:04 +0700 Subject: [PATCH 04/10] Try to resolve build with maven error --- alfresco-connector/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alfresco-connector/pom.xml b/alfresco-connector/pom.xml index cdef178..e2b044b 100644 --- a/alfresco-connector/pom.xml +++ b/alfresco-connector/pom.xml @@ -7,7 +7,8 @@ 11.3.1-SNAPSHOT iar - 10.0.16 + + 11.3.0 From d50e6af0a563b3119bb75d677b01420cfa2acfbf Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 11:03:12 +0700 Subject: [PATCH 05/10] Try to resolve build with maven error --- alfresco-connector/config/variables.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alfresco-connector/config/variables.yaml b/alfresco-connector/config/variables.yaml index 746463c..54cb636 100644 --- a/alfresco-connector/config/variables.yaml +++ b/alfresco-connector/config/variables.yaml @@ -7,4 +7,4 @@ Variables: EndpointUri: http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1 # The password for "Alfresco Content Service". # [password] - Password: admin + Password: "" From 4f31ab4d4366e564b5843e907441c315c68511ac Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 14:12:40 +0700 Subject: [PATCH 06/10] Try changing to 11.4.0 --- alfresco-connector-demo/pom.xml | 2 +- alfresco-connector-product/pom.xml | 2 +- alfresco-connector-test/pom.xml | 2 +- alfresco-connector/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/alfresco-connector-demo/pom.xml b/alfresco-connector-demo/pom.xml index a132c6a..ef7bb94 100644 --- a/alfresco-connector-demo/pom.xml +++ b/alfresco-connector-demo/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-demo - 11.3.1-SNAPSHOT + 11.4.0-SNAPSHOT iar diff --git a/alfresco-connector-product/pom.xml b/alfresco-connector-product/pom.xml index 5dbd466..005f93b 100644 --- a/alfresco-connector-product/pom.xml +++ b/alfresco-connector-product/pom.xml @@ -3,7 +3,7 @@ com.axonivy.connector.alfresco alfresco-connector-product - 11.3.1-SNAPSHOT + 11.4.0-SNAPSHOT pom diff --git a/alfresco-connector-test/pom.xml b/alfresco-connector-test/pom.xml index 0d5e6b7..b04f535 100644 --- a/alfresco-connector-test/pom.xml +++ b/alfresco-connector-test/pom.xml @@ -4,7 +4,7 @@ com.axonivy.connector.alfresco alfresco-connector-test - 11.3.1-SNAPSHOT + 11.4.0-SNAPSHOT iar diff --git a/pom.xml b/pom.xml index 87a983b..da4af8d 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-modules - 11.3.1-SNAPSHOT + 11.4.0-SNAPSHOT pom From c352ee4202ed81464bbbb8018a1a44cef2f1f0ba Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 15:45:19 +0700 Subject: [PATCH 07/10] Convert Alfresco connector to work with Designer 11.3.1 --- alfresco-connector-demo/pom.xml | 3 +-- alfresco-connector-product/pom.xml | 3 +-- alfresco-connector-test/pom.xml | 13 +++---------- alfresco-connector/pom.xml | 3 +-- pom.xml | 2 +- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/alfresco-connector-demo/pom.xml b/alfresco-connector-demo/pom.xml index ef7bb94..d0b6092 100644 --- a/alfresco-connector-demo/pom.xml +++ b/alfresco-connector-demo/pom.xml @@ -4,10 +4,9 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-demo - 11.4.0-SNAPSHOT + 11.3.1-SNAPSHOT iar - 11.3.0 diff --git a/alfresco-connector-product/pom.xml b/alfresco-connector-product/pom.xml index 005f93b..ba43ce7 100644 --- a/alfresco-connector-product/pom.xml +++ b/alfresco-connector-product/pom.xml @@ -2,8 +2,7 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-product - - 11.4.0-SNAPSHOT + 11.3.1-SNAPSHOT pom diff --git a/alfresco-connector-test/pom.xml b/alfresco-connector-test/pom.xml index b04f535..732c2bb 100644 --- a/alfresco-connector-test/pom.xml +++ b/alfresco-connector-test/pom.xml @@ -3,13 +3,9 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-test - - 11.4.0-SNAPSHOT + 11.3.1-SNAPSHOT iar - - - + 11.3.0 11.3.0 @@ -72,12 +68,9 @@ - com.axonivy.ivy.ci project-build-plugin - 11.3.0 + ${project.build.plugin.version} true diff --git a/alfresco-connector/pom.xml b/alfresco-connector/pom.xml index 5ba19f3..8fa35c0 100644 --- a/alfresco-connector/pom.xml +++ b/alfresco-connector/pom.xml @@ -4,10 +4,9 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector - 11.4.0-SNAPSHOT + 11.3.1-SNAPSHOT iar - 11.3.0 diff --git a/pom.xml b/pom.xml index da4af8d..87a983b 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.axonivy.connector.alfresco alfresco-connector-modules - 11.4.0-SNAPSHOT + 11.3.1-SNAPSHOT pom From a81cb3e2be8a58df61366bf481c68a6a4f86369a Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Tue, 13 Aug 2024 16:47:53 +0700 Subject: [PATCH 08/10] Try deleting REST Client Url --- alfresco-connector/config/rest-clients.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/alfresco-connector/config/rest-clients.yaml b/alfresco-connector/config/rest-clients.yaml index f881464..0389b88 100644 --- a/alfresco-connector/config/rest-clients.yaml +++ b/alfresco-connector/config/rest-clients.yaml @@ -4,7 +4,6 @@ RestClients: #Admin Url: https//localhost:8080/share Alfresco: UUID: f0cc7209-7cdd-4a5d-9dde-72257a4bf963 - Url: http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1 Icon: res:/webContent/icons/alfresco-logo.png Features: - ch.ivyteam.ivy.rest.client.mapper.JsonFeature From 5f7a406f1cce3d12dda16d9fbbed9dc61297261a Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Thu, 15 Aug 2024 17:22:04 +0700 Subject: [PATCH 09/10] Clean up --- alfresco-connector/config/rest-clients.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/alfresco-connector/config/rest-clients.yaml b/alfresco-connector/config/rest-clients.yaml index 0389b88..f881464 100644 --- a/alfresco-connector/config/rest-clients.yaml +++ b/alfresco-connector/config/rest-clients.yaml @@ -4,6 +4,7 @@ RestClients: #Admin Url: https//localhost:8080/share Alfresco: UUID: f0cc7209-7cdd-4a5d-9dde-72257a4bf963 + Url: http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1 Icon: res:/webContent/icons/alfresco-logo.png Features: - ch.ivyteam.ivy.rest.client.mapper.JsonFeature From 3e04a5b8ee49672cea4a27aba19aabe3a62c97a3 Mon Sep 17 00:00:00 2001 From: "hoang.vuhuy" Date: Mon, 19 Aug 2024 10:07:54 +0700 Subject: [PATCH 10/10] Revert to original format --- alfresco-connector-test/config/variables.yaml | 2 + alfresco-connector-test/pom.xml | 150 +++++++++--------- .../ecm/connector/test/TestAlfrescoECM.java | 4 +- 3 files changed, 79 insertions(+), 77 deletions(-) create mode 100644 alfresco-connector-test/config/variables.yaml diff --git a/alfresco-connector-test/config/variables.yaml b/alfresco-connector-test/config/variables.yaml new file mode 100644 index 0000000..cec3af7 --- /dev/null +++ b/alfresco-connector-test/config/variables.yaml @@ -0,0 +1,2 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/11.4.1/variables.json +Variables: diff --git a/alfresco-connector-test/pom.xml b/alfresco-connector-test/pom.xml index 732c2bb..355bd74 100644 --- a/alfresco-connector-test/pom.xml +++ b/alfresco-connector-test/pom.xml @@ -1,78 +1,78 @@ - 4.0.0 - com.axonivy.connector.alfresco - alfresco-connector-test - 11.3.1-SNAPSHOT - iar - - 11.3.0 - 11.3.0 - - - - sonatype - https://oss.sonatype.org/content/repositories/snapshots - - always - - - - - - sonatype - https://oss.sonatype.org/content/repositories/snapshots - - always - - - - - - com.axonivy.ivy.test - unit-tester - ${tester.version} - test - - - com.axonivy.ivy.webtest - web-tester - ${tester.version} - test - - - com.axonivy.connector.alfresco - alfresco-connector-demo - ${project.version} - iar - - - com.axonivy.connector.alfresco - alfresco-connector - ${project.version} - iar - - - - src_test - - - - maven-deploy-plugin - 3.0.0-M1 - - true - - - - - - - com.axonivy.ivy.ci - project-build-plugin - ${project.build.plugin.version} - true - - - + 4.0.0 + com.axonivy.connector.alfresco + alfresco-connector-test + 11.3.1-SNAPSHOT + iar + + 11.3.0 + 11.3.0 + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + + + + com.axonivy.ivy.test + unit-tester + ${tester.version} + test + + + com.axonivy.ivy.webtest + web-tester + ${tester.version} + test + + + com.axonivy.connector.alfresco + alfresco-connector-demo + ${project.version} + iar + + + com.axonivy.connector.alfresco + alfresco-connector + ${project.version} + iar + + + + src_test + + + + maven-deploy-plugin + 3.0.0-M1 + + true + + + + + + + com.axonivy.ivy.ci + project-build-plugin + ${project.build.plugin.version} + true + + + \ No newline at end of file diff --git a/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java b/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java index c0c50dc..c5ff30a 100644 --- a/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java +++ b/alfresco-connector-test/src_test/alfresco/ecm/connector/test/TestAlfrescoECM.java @@ -32,7 +32,7 @@ public void callReadDocuments(BpmClient bpmClient, ISession session) { SubProcessCallResult result = bpmClient.start() .subProcess(CALL_READ_DOCUMENTS).as().session(session) .execute("-shared-").subResult(); - assertThat(result.param("connectionError", String.class)).isEmpty(); + assertThat(result.param("connectionError", String.class)).isEmpty(); assertThat(result.param("documents", List.class)).isNotEmpty(); } -} +} \ No newline at end of file