From d080aa2ebd5c8b98e0210185030b90ed5a4a6edd Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Tue, 13 Nov 2018 14:47:30 +0530 Subject: Replace xmlencode with xmlEscape Replace xmlencode with xmlEscape. Change-Id: Ib84e7e4f10881abbc938ee03b66ed3358f06e2dc Issue-ID: SO-689 Signed-off-by: subhash kumar singh --- .../scripts/ActivateSDNCNetworkResource.groovy | 139 +++++++++---------- .../scripts/CreateSDNCNetworkResource.groovy | 147 +++++++++++---------- .../scripts/DeActivateSDNCNetworkResource.groovy | 133 ++++++++++--------- .../scripts/DeleteSDNCNetworkResource.groovy | 147 +++++++++++---------- 4 files changed, 289 insertions(+), 277 deletions(-) (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap') diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy index 30e6c452e0..64de29eaa9 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy @@ -29,6 +29,7 @@ import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.bpmn.core.UrnPropertiesReader @@ -48,6 +49,8 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + MsoUtils msoUtils = new MsoUtils() public void preProcessRequest(DelegateExecution execution) { def isDebugEnabled = execution.getVariable("isDebugLogEnabled") @@ -148,13 +151,13 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(ServiceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(ServiceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; @@ -228,44 +231,44 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(networkInstanceId)} + ${msoUtils.xmlEscape(networkInstanceId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -288,45 +291,45 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(networkInstanceId)} + ${msoUtils.xmlEscape(networkInstanceId)} $parentServiceInstanceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -343,43 +346,43 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(networkInstanceId)} + ${msoUtils.xmlEscape(networkInstanceId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy index f8c2ced2c7..d0a3dddba9 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy @@ -32,6 +32,7 @@ import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AaiUtil import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.bpmn.core.UrnPropertiesReader import org.onap.so.client.aai.AAIObjectPlurals @@ -55,6 +56,8 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() + MsoUtils msoUtils = new MsoUtils() + public void preProcessRequest(DelegateExecution execution){ msoLogger.info(" ***** Started preProcessRequest *****") @@ -276,44 +279,44 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -335,34 +338,34 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} @@ -370,11 +373,11 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { $parentServiceInstanceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -391,40 +394,40 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> ${hdrRequestId} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -472,13 +475,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(ServiceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(ServiceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; @@ -505,13 +508,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(ServiceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(ServiceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy index ed8b3b4e0a..6ab03b9769 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy @@ -27,6 +27,7 @@ import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.bpmn.core.UrnPropertiesReader @@ -45,6 +46,8 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor JsonUtils jsonUtil = new JsonUtils() SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + MsoUtils msoUtils = new MsoUtils() public void preProcessRequest(DelegateExecution execution) { @@ -166,44 +169,44 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -224,33 +227,33 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} @@ -258,11 +261,11 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -276,42 +279,42 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -353,13 +356,13 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy index b5c9f8cda6..6456fc3a5d 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy @@ -27,6 +27,7 @@ import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.MsoUtils import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.bpmn.core.UrnPropertiesReader @@ -48,6 +49,8 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils() + + MsoUtils msoUtils = new MsoUtils() public void preProcessRequest(DelegateExecution execution){ msoLogger.info(" ***** Started preProcessRequest *****") @@ -192,44 +195,44 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} vnf-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -250,33 +253,33 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} connection-attachment-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} @@ -284,11 +287,11 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -302,42 +305,42 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(sdnc_svcAction)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(sdnc_svcAction)} network-topology-operation sdncCallback generic-resource - ${msoUtils.xmlEncode(hdrRequestId)} - ${msoUtils.xmlEncode(sdnc_requestAction)} - ${msoUtils.xmlEncode(source)} + ${msoUtils.xmlEscape(hdrRequestId)} + ${msoUtils.xmlEscape(sdnc_requestAction)} + ${msoUtils.xmlEscape(source)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(serviceType)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(serviceType)} - ${msoUtils.xmlEncode(serviceModelInvariantUuid)} - ${msoUtils.xmlEncode(serviceModelUuid)} - ${msoUtils.xmlEncode(serviceModelVersion)} - ${msoUtils.xmlEncode(serviceModelName)} + ${msoUtils.xmlEscape(serviceModelInvariantUuid)} + ${msoUtils.xmlEscape(serviceModelUuid)} + ${msoUtils.xmlEscape(serviceModelVersion)} + ${msoUtils.xmlEscape(serviceModelName)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(globalCustomerId)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(globalCustomerId)} $resourceInstnaceId - ${msoUtils.xmlEncode(modelInvariantUuid)} - ${msoUtils.xmlEncode(modelCustomizationUuid)} - ${msoUtils.xmlEncode(modelUuid)} - ${msoUtils.xmlEncode(modelVersion)} - ${msoUtils.xmlEncode(modelName)} + ${msoUtils.xmlEscape(modelInvariantUuid)} + ${msoUtils.xmlEscape(modelCustomizationUuid)} + ${msoUtils.xmlEscape(modelUuid)} + ${msoUtils.xmlEscape(modelVersion)} + ${msoUtils.xmlEscape(modelName)} @@ -385,13 +388,13 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; @@ -418,13 +421,13 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor { - ${msoUtils.xmlEncode(operType)} - ${msoUtils.xmlEncode(operationId)} - ${msoUtils.xmlEncode(progress)} - ${msoUtils.xmlEncode(resourceCustomizationUuid)} - ${msoUtils.xmlEncode(serviceInstanceId)} - ${msoUtils.xmlEncode(status)} - ${msoUtils.xmlEncode(statusDescription)} + ${msoUtils.xmlEscape(operType)} + ${msoUtils.xmlEscape(operationId)} + ${msoUtils.xmlEscape(progress)} + ${msoUtils.xmlEscape(resourceCustomizationUuid)} + ${msoUtils.xmlEscape(serviceInstanceId)} + ${msoUtils.xmlEscape(status)} + ${msoUtils.xmlEscape(statusDescription)} """; -- cgit 1.2.3-korg