<#ftl output_format="JSON"> <#-- The macro for generating view and template metadata for a new Group --> <#macro newGroup request uuid defaultApplicationObjectKey name recipeObjectId adminGroups="" memberGroups="" replaceable=true triggers="" description="" hasNext=false> { <#-- recipe section --> "version": 2, "objectType": "GROUP", "replaceable": ${replaceable?c}, "recipeObjectId": "${recipeObjectId}", "templateForCreate": "ix/v2/createGroup_v2.ftlx", "templateForReuse": "recipes/v2/existingGroupsHelper_v2.ftl", "defaultApplicationObjectKey": "${defaultApplicationObjectKey}", "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}", "currentVersionUuid": "${uuid}", "versionUuids": ["${uuid}"], <#if adminGroups?has_content> "adminGroups": ${adminGroups}, <#if memberGroups?has_content> "memberGroups": ${memberGroups}, "memberUsers": ["${request.getUserName()}"], <#-- i18n section --> "name": "${name?json_string}", <#if description?has_content> "description": "${description?json_string}" <#else> "description": "${request.getTextWithKey("recordActionTemplateRecipe.object.group.description", request.application.name)?json_string}" } ] }<#if hasNext>, <#-- The macro for generating view and template metadata for an existing Group --> <#macro reusedGroup templateHelper newObjectMetadata group recipeObjectId objectIndex> { <#-- recipe section --> "objectStatus": "EXISTING", "templateObjectId": "${recipeObjectId}-${objectIndex?c}", "objectIndex": ${objectIndex?c}, <#-- bindings section --> "uuid": "${group.getUuid()}", <#-- i18n section --> "name": "${group.getName()?json_string}", "description": "${group.getDescription()?json_string}" }