<#ftl output_format="JSON"> <#-- The macro for generating view and template metadata for a new Data Store --> <#macro newDataStore request recipeObjectId uuid name entities="" description="" adminGroups="" readerGroups="" replaceable=true triggers=""> { <#-- recipe section --> "version": 2, "objectType": "DATASTORE", "replaceable": ${replaceable?c}, "recipeObjectId": "${recipeObjectId}", "templateForCreate": "ix/v2/createDataStore_v2.ftlx", "templateForReuse": "recipes/v2/existingDataStoresHelper_v2.ftl", "templateForUpdate": "ix/v2/updateDataStore_v2.xsl", "selectedObjectIndex": 0, "isVisible": true, <#if triggers?has_content> "triggers": ${triggers}, <#-- the section for exposing the special customization of sub-components/field --> "visibleComponents": [ { "metadataField": "dataStoreEntities", "label": "${request.getTextWithKey("recordActionTemplateRecipe.object.dataStore.label.datastoreEntity")?json_string}" } ], <#-- the set of new and reused objects --> "objects": [ { "objectStatus": "NEW", "templateObjectId": "${recipeObjectId}-0", "objectIndex": 0, <#-- bindings section --> "uuid": "${uuid}", "versionUuids": ["${request.generateUuid("DATASTORE_VERSION")}"], "currentVersionUuid": "${uuid}", "dataStoreSourceUuid": "${request.getTargetObject().getAdditionalProperty("dataStoreSourceUuid")?json_string}", "autoUpdateSchema": false, <#if adminGroups?has_content> "administratorGroups": ${adminGroups}, <#if readerGroups?has_content> "readerGroups": ${readerGroups}, "isReadersInherit": false, "isAuthorsInherit": false, "isAdministratorsInherit": false, <#if entities?has_content> "dataStoreEntities": [ <#list entities as entity> { "uuid": "${entity.uuid}", "name": "${entity.name?json_string}", "type": "${entity.type}", "datatypeRecipeObjectId": "${entity.datatypeRecipeObjectId}", "dseObjectStatus": "${entity.dseObjectStatus}" <#if entity?has_next> }, <#else> } ], <#-- i18n section --> "name": "${name?json_string}", "description": "${description?json_string}" } ] } <#-- The macro for generating view and template metadata for an existing Data Store --> <#macro reusedDataStore templateHelper newObjectMetadata dataStore recipeObjectId objectIndex entities=""> { <#-- recipe section --> "objectStatus": "EXISTING", "templateObjectId": "${recipeObjectId}-${objectIndex?c}", "objectIndex": ${objectIndex?c}, <#-- bindings section --> "uuid": "${dataStore.getUuid()}", <#if entities?has_content> "dataStoreEntities": [ <#list entities as entity> { "uuid": "${entity.uuid}", "name": "${entity.name?json_string}", "type": "${entity.type}", "datatypeRecipeObjectId": "${entity.recipeObjectId}", "dseObjectStatus": "${entity.dseObjectStatus}" <#if entity?has_next> }, <#else> } ], <#-- i18n section --> "name": "${dataStore.getName()?json_string}", "description": "${dataStore.getDescription()?json_string}" }