From bb1982853f975221b2e88e88e5a7f7577a3a878b Mon Sep 17 00:00:00 2001 From: marcofra Date: Tue, 17 Dec 2024 12:12:31 +0100 Subject: [PATCH] feat(editor): remove iteration, move declarations to parameters, change content path --- .../samples/add-or-replace-property.json | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/main/frontend/model/samples/add-or-replace-property.json b/src/main/frontend/model/samples/add-or-replace-property.json index 2b8fd58..f5accc0 100644 --- a/src/main/frontend/model/samples/add-or-replace-property.json +++ b/src/main/frontend/model/samples/add-or-replace-property.json @@ -2,32 +2,31 @@ "logLevel": "info", "hops": [ { - "type": "declare", - "declarations": { - "propertyName": "\"pName\"", - "propertyValue": "\"pValue\"" - } - }, - { - "type": "each", - "expression": "['de', 'fr', 'it', 'en']", + "type": "nodeQuery", + "query": "SELECT * FROM [nt:unstructured] AS s WHERE ISDESCENDANTNODE([/content/project/language])", + "queryType": "JCR-SQL2", "hops": [ { - "type": "nodeQuery", - "query": "SELECT * FROM [nt:unstructured] AS s WHERE ISDESCENDANTNODE([/content/swisscom/${lang}])", - "queryType": "JCR-SQL2", - "hops": [ - { - "type": "setProperty", - "conflict": "force", - "propertyName": "${propertyName}", - "value": "propertyValue" - } - ] + "type": "setProperty", + "conflict": "force", + "propertyName": "${args.propertyName}", + "value": "args.propertyValue" } - ], - "iterator": "lang" + ] } ], - "parameters": [] + "parameters": [ + { + "name": "propertyName", + "defaultValue": "pName", + "type": "text", + "evaluation": "STRING" + }, + { + "name": "propertyValue", + "defaultValue": "pValue", + "type": "text", + "evaluation": "STRING" + } + ] }