<#ftl output_format="JSON"> <#-- The macro for generating template metadata for a new Document Folder --> <#macro newDocumentFolder request recipeObjectId uuid name parentUuid adminGroups="" readerGroups="" replaceable=true triggers="" description=""> { <#-- recipe section --> "version": 2, "objectType": "DOCUMENT_FOLDER", "replaceable": ${replaceable?c}, "recipeObjectId": "${recipeObjectId}", "templateForCreate": "ix/v2/createDocumentFolder_v2.ftlx", "templateForReuse": "recipes/v2/existingDocumentFoldersHelper_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("DOCUMENT_FOLDER_VERSION")}"], "parentUuid": "${parentUuid}", <#if adminGroups?has_content> "administratorGroups": ${adminGroups}, <#if readerGroups?has_content> "readerGroups": ${readerGroups}, "isReadersInherit": true, "isAuthorsInherit": true, "isAdministratorsInherit": true, <#-- i18n section --> "name": "${name?json_string}", <#if description?has_content> "description": "${description?json_string}" <#else> "description": "${request.getTextWithKey("recordActionTemplateRecipe.object.docFolder.description.appDoc", request.application.name)?json_string}" } ] } <#-- The macro for generating view and template metadata for an existing Document Folder --> <#macro reusedDocumentFolder templateHelper newObjectMetadata documentFolder recipeObjectId objectIndex> { <#-- recipe section --> "objectStatus": "EXISTING", "templateObjectId": "${recipeObjectId}-${objectIndex?c}", "objectIndex": ${objectIndex?c}, <#-- bindings section --> "uuid": "${documentFolder.getUuid()}", <#-- i18n section --> "name": "${documentFolder.getName()?json_string}", "description": "${documentFolder.getDescription()?json_string}" }