From 6993f46b4b7ac530b223a06771eb638885120ce0 Mon Sep 17 00:00:00 2001 From: "Balaji, Ramya (rb111y)" Date: Fri, 25 May 2018 17:21:11 -0400 Subject: [PATCH] Corrected config params validations Issue-ID: APPC-932 Change-Id: Ie4166c7e5079c67d112d6e17b5dcd1f0ceaefacc Signed-off-by: Balaji, Ramya (rb111y) (cherry picked from commit 2f76aaa31d09cd691636650e13f36ecdb17e1df4) --- .../config/params/parser/PropertyDefinitionNode.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/parser/PropertyDefinitionNode.java b/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/parser/PropertyDefinitionNode.java index a9707b6a2..9b5e5485b 100644 --- a/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/parser/PropertyDefinitionNode.java +++ b/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/parser/PropertyDefinitionNode.java @@ -111,7 +111,8 @@ public class PropertyDefinitionNode implements SvcLogicJavaPlugin { } if (StringUtils.isBlank(requestParamJson)) { - throw new MissingParameterException(STR_JSON_DATA_MISSING); + //throw new MissingParameterException(STR_JSON_DATA_MISSING); + log.info("processExternalSystemParamKeys:: "+ STR_JSON_DATA_MISSING); } if (StringUtils.isBlank(systemName)) { @@ -152,7 +153,10 @@ public class PropertyDefinitionNode implements SvcLogicJavaPlugin { String mergeJsonData = inParams.get(ParamsHandlerConstant.INPUT_PARAM_MERGE__JSON_DATA); if (StringUtils.isBlank(requestParamJson)) { - throw new MissingParameterException(STR_JSON_DATA_MISSING); + //throw new MissingParameterException(STR_JSON_DATA_MISSING); + Map tempMap=new HashMap (); + requestParamJson = tempMap.toString(); + log.info("mergeJsonData()::"+STR_JSON_DATA_MISSING); } if (StringUtils.isBlank(mergeJsonData)) { @@ -230,7 +234,10 @@ public class PropertyDefinitionNode implements SvcLogicJavaPlugin { } if (StringUtils.isBlank(requestParamJson)) { - throw new MissingParameterException("Request Param is Missing .."); + //throw new MissingParameterException("Request Param is Missing .."); + log.info("getSystemRequestParamInfoFromPD() ::: requestParamJson is blank!!!"); + HashMap paramMap = new HashMap (); + requestParamJson = paramMap.toString(); } ObjectMapper mapper = new ObjectMapper(); @@ -324,7 +331,11 @@ public class PropertyDefinitionNode implements SvcLogicJavaPlugin { } if (StringUtils.isBlank(configParams)) { - throw new MissingParameterException("Request Param (configParams) is Missing .."); + //throw new MissingParameterException("Request Param (configParams) is Missing .."); + Map tempMap=new HashMap (); + configParams = tempMap.toString(); + log.info("validateParams():: Request Param (configParams) is Missing .."); + } PropertyDefinition propertyDefinition = parsePDContent(pdContent); ObjectMapper mapper = new ObjectMapper(); -- 2.16.6