+ if (StringUtils.isBlank(configParams)) {
+ //throw new MissingParameterException("Request Param (configParams) is Missing ..");
+ Map <String,String> tempMap=new HashMap<> ();
+ configParams = tempMap.toString();
+ log.info("validateParams():: Request Param (configParams) is Missing ..");
+
+ }
+ PropertyDefinition propertyDefinition = parsePDContent(pdContent);
+ ObjectMapper mapper = new ObjectMapper();
+ Map<String, String> requestParamMap = mapper.readValue(configParams, HashMap.class);
+ List<Parameter> parameters = propertyDefinition.getParameters();
+ Map<String, String> missingKeys = new HashMap<>();
+ for (Parameter parameter : parameters) {
+ if (parameter != null && parameter.isRequired()) {
+ resolveParameterValue(requestParamMap, missingKeys, parameter);
+ }
+ }
+ if (missingKeys.size() > 0) {
+
+ String requiredFields = mapper.writeValueAsString(missingKeys);
+ log.info(" Below mentioned keys and respective source type are mandatory");
+ log.info(requiredFields);
+
+ ctx.setAttribute(responsePrefix + ParamsHandlerConstant.OUTPUT_PARAM_STATUS,
+ ParamsHandlerConstant.OUTPUT_STATUS_FAILURE);
+ ctx.setAttribute(ParamsHandlerConstant.OUTPUT_PARAM_STATUS,
+ ParamsHandlerConstant.OUTPUT_STATUS_FAILURE);
+ ctx.setAttribute(responsePrefix + ParamsHandlerConstant.OUTPUT_PARAM_ERROR_MESSAGE,
+ "Missing Mandatory Keys and source are" + requiredFields);
+ throw new SvcLogicException(
+ " Missing Mandatory Keys and source are" + requiredFields);
+ } else {
+ log.info("success ");
+ ctx.setAttribute(ParamsHandlerConstant.OUTPUT_PARAM_STATUS,
+ ParamsHandlerConstant.OUTPUT_STATUS_SUCCESS);
+ }