Skip to content

Commit

Permalink
feat(editor): replace declarations with parameters, changed query path
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofra committed Jan 9, 2025
1 parent a2e36c6 commit bf8cb13
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/main/frontend/model/samples/rename-node.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
{
"logLevel": "info",
"hops": [
{
"type": "declare",
"declarations": {
"nodeOldName": "\"oldName\"",
"nodeNewName": "\"newName\""
}
},
{
"type": "each",
"expression": "['de', 'fr', 'it', 'en']",
"hops": [
{
"type": "nodeQuery",
"query": "/* The search query has to return the parent nodes we want to act on. */\nSELECT * FROM [nt:unstructured] AS s WHERE ISDESCENDANTNODE([/content/swisscom/${lang}/res/_/aaaaaaaaaaaaaaaaaaaaaaaa])",
"query": "/* The search query has to return the parent nodes we want to act on. */\nSELECT * FROM [nt:unstructured] AS s WHERE ISDESCENDANTNODE([/content/project/${lang}])",
"queryType": "JCR-SQL2",
"hops": [
{
"type": "childNodes",
"namePattern": "${nodeOldName}",
"namePattern": "${args.nodeOldName}",
"hops": [
{
"type": "moveNode",
"conflict": "force",
"newName": "${nodeNewName}"
"newName": "${args.nodeNewName}"
}
]
}
Expand All @@ -34,5 +27,18 @@
"iterator": "lang"
}
],
"parameters": []
"parameters": [
{
"name": "nodeOldName",
"defaultValue": "oldName",
"type": "text",
"evaluation": "STRING"
},
{
"name": "nodeNewName",
"defaultValue": "newName",
"type": "text",
"evaluation": "STRING"
}
]
}

0 comments on commit bf8cb13

Please sign in to comment.