public static void replaceHttpHeaderMapNodeSpecific(Map<String,String> httpHeaderMap,Map<String,String> requestParameters){
  boolean needToReplaceVarInHttpHeader=false;
  for (  String parameter : requestParameters.keySet()) {
    if (parameter.contains(PcConstants.NODE_REQUEST_PREFIX_REPLACE_VAR)) {
      needToReplaceVarInHttpHeader=true;
      break;
    }
  }
  if (!needToReplaceVarInHttpHeader) {
    logger.debug("No need to replace. Since there are no HTTP header variables. ");
    return;
  }
  for (  Entry<String,String> entry : httpHeaderMap.entrySet()) {
    String key=entry.getKey();
    String valueOriginal=entry.getValue();
    String valueUpdated=NodeReqResponse.replaceStrByMap(requestParameters,valueOriginal);
    httpHeaderMap.put(key,valueUpdated);
  }
}

public static void replaceHttpHeaderMapNodeSpecific ( Map < String , String > httpHeaderMap , Map < String , String > requestParameters ) { boolean needToReplaceVarInHttpHeader = false ; for ( String parameter : requestParameters . keySet ( ) ) { if ( parameter . contains ( PcConstants . NODE_REQUEST_PREFIX_REPLACE_VAR ) ) { needToReplaceVarInHttpHeader = true ; break ; } } if ( ! needToReplaceVarInHttpHeader ) { logger . debug ( "No need to replace. Since there are no HTTP header variables. " ) ; return ; } for ( Entry < String , String > entry : httpHeaderMap . entrySet ( ) ) { String key = entry . getKey ( ) ; String valueOriginal = entry . getValue ( ) ; String valueUpdated = NodeReqResponse . replaceStrByMap ( requestParameters , valueOriginal ) ; httpHeaderMap . put ( key , valueUpdated ) ; } }
! ! ! ! assumption : all var exists in http header must of type : apivarreplace_name_prefix_http_header 20140310 this may be costly ( o ( n ^ 2 ) ) of the updated related # of headers ; # of parameters in the requests . better to only do it when there are some replacement in the request parameters . a prefix : tobe tested
