aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl')
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl b/platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl
new file mode 100644
index 00000000..c743d2b5
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl
@@ -0,0 +1,10 @@
+## Velocity template for creating payload for creating A1 Policy instance
+#set($begCntr=0)
+#set($endCntr=0)
+#set($entries=$ctx.getAttribute("create-policy-instance-input.properties_length"))
+#set($endCntr=$endCntr.parseInt($entries))
+#set( $endCntr = $endCntr - 1)
+{#foreach($no in [$begCntr..$endCntr])
+"$ctx.getAttribute("create-policy-instance-input.properties[$no].property-name")" :
+$ctx.getAttribute("create-policy-instance-input.properties[$no].property-value")
+#if( $foreach.count < $endCntr+1), #end #end}