summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1-policy-instance-property-payload-template.vtl10
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1-policy-type-create-schema-property-payload-template.vtl26
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getNearRT-RICs-payload.vtl1
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyInstances-payload.vtl1
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyType-payload.vtl1
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyTypes-payload.vtl1
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getStatus-payload.vtl1
7 files changed, 41 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}
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1-policy-type-create-schema-property-payload-template.vtl b/platform-logic/restapi-templates/src/main/velocity/a1-policy-type-create-schema-property-payload-template.vtl
new file mode 100644
index 00000000..0230addd
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1-policy-type-create-schema-property-payload-template.vtl
@@ -0,0 +1,26 @@
+## Velocity template for creating the payload for creating A1 policy type
+#set($begCntr1=0)
+#set($endCntr1=0)
+#set($entries=$ctx.getAttribute("create-policy-type-input.properties_length"))
+#set($endCntr1=$endCntr1.parseInt($entries))
+#set( $endCntr1 = $endCntr1 - 1)
+{
+ "description": "$ctx.getAttribute("create-policy-type-input.description")",
+ "name": "$ctx.getAttribute("create-policy-type-input.name")",
+ "policy_type_id": $ctx.getAttribute("create-policy-type-input.policy-type-id"),
+ "create_schema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {#foreach($no1 in [$begCntr1..$endCntr1])
+ "$ctx.getAttribute("create-policy-type-input.properties[$no1].property-name")" : {
+ #set($begCntr2=0)
+ #set($endCntr2=0)
+ #set($entries=$ctx.getAttribute("create-policy-type-input.properties[$no1].policy-statements_length"))
+ #set($endCntr2=$endCntr2.parseInt($entries))
+ #set( $endCntr2 = $endCntr2 - 1)
+ #foreach($no2 in [$begCntr2..$endCntr2])
+ "$ctx.getAttribute("create-policy-type-input.properties[$no1].policy-statements[$no2].policy-statement")" :
+ "$ctx.getAttribute("create-policy-type-input.properties[$no1].policy-statements[$no2].policy-statement-value")"
+ #if( $no2 < $endCntr2), #end#end}#if( $no1 < $endCntr1), #end #end
+}}}
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getNearRT-RICs-payload.vtl b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getNearRT-RICs-payload.vtl
new file mode 100644
index 00000000..cfe7f03e
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getNearRT-RICs-payload.vtl
@@ -0,0 +1 @@
+## Velocity template for getNearRT-RICs DMAAP response payload
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyInstances-payload.vtl b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyInstances-payload.vtl
new file mode 100644
index 00000000..0d007ac9
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyInstances-payload.vtl
@@ -0,0 +1 @@
+## Velocity template for getPolicyInstances DMAAP response payload
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyType-payload.vtl b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyType-payload.vtl
new file mode 100644
index 00000000..19449d08
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyType-payload.vtl
@@ -0,0 +1 @@
+## Velocity template for getPolicyType DMAAP response payload
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyTypes-payload.vtl b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyTypes-payload.vtl
new file mode 100644
index 00000000..cf396f0f
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getPolicyTypes-payload.vtl
@@ -0,0 +1 @@
+## Velocity template for getPolicyTypes DMAAP response payload
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getStatus-payload.vtl b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getStatus-payload.vtl
new file mode 100644
index 00000000..3af64402
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-dmaap-publish-getStatus-payload.vtl
@@ -0,0 +1 @@
+## Velocity template for getStatus DMAAP response payload