<#ftl output_format="JSON"> <#-- newConstant: The macro for generating view and template metadata for a new constant --> <#macro newConstant request recipeObjectId uuid name description ruleFolderUuid typeName typeNamespace isEnvironmentSpecific=false value="" designObjectConstantFile="" triggers=""> { <#-- recipe section --> "version": 2, "objectType": "CONSTANT", "recipeObjectId": "${recipeObjectId}", "templateForCreate": "ix/v2/createConstant_v2.ftlx", "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}", "parentUuid": "${ruleFolderUuid}", "versionUuids": ["${uuid}"], "typeName": "${typeName}", "typeNamespace": "${typeNamespace}", <#if designObjectConstantFile?has_content> <#include "${designObjectConstantFile}"> <#else> "value": "${value}", "isEnvironmentSpecific": ${isEnvironmentSpecific?c}, <#if isEnvironmentSpecific> "isEnvironmentSpecific": true, "icfProperties": [ { "metadataName": "value", "propertyName": "VALUE" } ], <#else> "isEnvironmentSpecific": false, <#-- i18n section --> "name": "${name?json_string}", "description": "${description?json_string}" } ] } <#-- The macro for generating view and template metadata for an existing Constants --> <#macro reusedConstant templateHelper newObjectMetadata constant recipeObjectId objectIndex> { <#-- recipe section --> "objectStatus": "EXISTING", "templateObjectId": "${recipeObjectId}-${objectIndex?c}", "objectIndex": ${objectIndex?c}, <#-- bindings section --> "uuid": "${constant.getUuid()}", <#-- i18n section --> "name": "${constant.getName()?json_string}", "description": "${constant.getDescription()?json_string}" }