<#ftl output_format="JSON"> <#-- The macro for generating template metadata for a new Rule Folder --> <#macro newRuleFolder request recipeObjectId uuid name adminGroups="" readerGroups="" replaceable=true triggers="" description=""> { <#-- recipe section --> "version": 2, "objectType": "RULE_FOLDER", "replaceable": ${replaceable?c}, "recipeObjectId": "${recipeObjectId}", "templateForCreate": "ix/v2/createRuleFolder_v2.ftlx", "templateForReuse": "recipes/v2/existingRuleFoldersHelper_v2.ftl", "selectedObjectIndex": 0, "isVisible": true, <#if triggers?has_content> "triggers": ${triggers}, <#-- the set of new and reused objects --> "objects": [ { "objectStatus": "NEW", "templateObjectId": "${recipeObjectId}-0", "objectIndex": 0, <#-- bindings section --> "uuid": "${uuid}", "versionUuids": ["${request.generateUuid("RULE_FOLDER_VERSION")}"], "parentUuid": "SYSTEM_RULES_ROOT", <#if adminGroups?has_content> "administratorGroups": ${adminGroups}, <#if readerGroups?has_content> "readerGroups": ${readerGroups}, "isReadersInherit": false, "isAuthorsInherit": false, "isAdministratorsInherit": false, <#-- i18n section --> "name": "${name?json_string}", <#if description?has_content> "description": "${description?json_string}" <#else> "description": "${request.getTextWithKey("recordActionTemplateRecipe.object.ruleFolder.description", request.application.name)?json_string}" } ] } <#-- The macro for generating view and template metadata for an existing Rule Folder --> <#macro reusedRuleFolder templateHelper newObjectMetadata ruleFolder recipeObjectId objectIndex> { <#-- recipe section --> "objectStatus": "EXISTING", "templateObjectId": "${recipeObjectId}-${objectIndex?c}", "objectIndex": ${objectIndex?c}, <#-- bindings section --> "uuid": "${ruleFolder.getUuid()}", <#-- i18n section --> "name": "${ruleFolder.getName()?json_string}", "description": "${ruleFolder.getDescription()?json_string}" }