Corrected config params validations 09/49209/1
authorBalaji, Ramya (rb111y) <rb111y@att.com>
Fri, 25 May 2018 21:21:11 +0000 (17:21 -0400)
committerPatrick Brady <pb071s@att.com>
Fri, 25 May 2018 22:03:06 +0000 (22:03 +0000)
Issue-ID: APPC-932
Change-Id: Ie4166c7e5079c67d112d6e17b5dcd1f0ceaefacc
Signed-off-by: Balaji, Ramya (rb111y) <rb111y@att.com>
(cherry picked from commit 2f76aaa31d09cd691636650e13f36ecdb17e1df4)

appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/parser/PropertyDefinitionNode.java

index a9707b6..9b5e548 100644 (file)
@@ -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 <String,String> tempMap=new HashMap<String, String> ();
+                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 <String, String> ();
+            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 <String,String> tempMap=new HashMap<String, String> ();
+                configParams = tempMap.toString();
+                log.info("validateParams():: Request Param (configParams) is Missing ..");
+                
             }
             PropertyDefinition propertyDefinition = parsePDContent(pdContent);
             ObjectMapper mapper = new ObjectMapper();