- /*public void getDummyValues(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
-
- log.info("Received getDummyValues call with params : " + inParams);
-
- String responsePrefix = inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX);
-
- try {
-
- responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
- String instarKeys = inParams.get("instarKeys");
- ObjectMapper mapper = new ObjectMapper();
- if ( instarKeys != null ) {
-
- List<String> keyList = mapper.readValue(instarKeys, ArrayList.class);
-
- Map<String, String> instarParams =new HashMap<String, String>();
- if(keyList != null){
- //System.out.println(keyList.toString());
-
-
- for(int i=0;i<keyList.size();i++)
- {
- log.info(" -->"+keyList.get(i));
-
- //ctx.setAttribute(keyList.get(i), "test" + i);
-
- instarParams.put( keyList.get(i), "test" + i);
- }
-
- }
- log.info("INSTARPARAMMAP " + instarParams);
- String jsonString = mapper.writeValueAsString(instarParams);
- log.info(jsonString);
- ctx.setAttribute(responsePrefix + "configuration-parameters", jsonString);
-
- }
-
- log.info("getDummyValues Successful ");
- } catch (Exception e) {
- ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
- AppcAaiClientConstant.OUTPUT_STATUS_FAILURE);
- ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
- log.error("Failed in getDummyValues " + e.getMessage());
-
- throw new SvcLogicException(e.getMessage());
- }
-
- }
-
- */
- /*public void getRequestKeys(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
-
- log.info("Received getRequestKeys call with params : " + inParams);
-
- String responsePrefix = inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX);
-
- try {
-
- responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
- String instarKeys = inParams.get("instarKeys");
-
- ObjectMapper mapper = new ObjectMapper();
- if ( instarKeys != null ) {
-
- List<String> keyList = mapper.readValue(instarKeys, ArrayList.class);
-
- //Map<String, String> instarParams =new HashMap<String, String>();
- if(keyList != null){
-
-
- for(int i=0;i<keyList.size();i++)
- {
- log.info("INSTARKEY -->"+keyList.get(i));
-
-
- String instarParameter = ctx.getAttribute("INSTAR." + keyList.get(i));
- log.info("INSTARPARAMETER " + instarParameter);
- Parameter param = parseParameterContent(instarParameter);
-
- log.info("PARAMETER KEY SIZE " + param.getRequestKeys().size());
- log.info("RULE TYPE " + param.getClassType());
-
- for ( int j =0 ; j < param.getRequestKeys().size() ; j++ ) {
-
- log.info(" PARAM KEY NAME " + param.getRequestKeys().get(j).getKeyName());
- log.info(" PARAM KEY VALUE " + param.getRequestKeys().get(j).getKeyValue());
- }
-
- // instarParams.put( keyList.get(i), "test" + i);
- }
-
- }
- //log.info("INSTARPARAMMAP " + instarParams);
- //String jsonString = mapper.writeValueAsString(instarParams);
- //log.info(jsonString);
- //ctx.setAttribute(responsePrefix + "configuration-parameters", jsonString);
-
- }
-
- log.info("getRequestKeys Successful ");
- } catch (Exception e) {
- ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
- AppcAaiClientConstant.OUTPUT_STATUS_FAILURE);
- ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
- log.error("Failed in getRequestKeys " + e.getMessage());
-
- throw new SvcLogicException(e.getMessage());
- }
-
- }
-
-
- public Parameter parseParameterContent(String parameter) throws JsonParseException, JsonMappingException, IOException{
- Parameter parameterDefinition = null;
- if(StringUtils.isNotBlank(parameter)){
- ObjectMapper mapper = new ObjectMapper();
- parameterDefinition = mapper.readValue(parameter, Parameter.class);
- }
- return parameterDefinition;
- }*/