code: public static String replaceStrByMap(Map<String, String> requestParameters,
              String sourceContent) {
  
          String contentAfterReplace = sourceContent;
  
          for (Entry<String, String> entry : requestParameters.entrySet()) {
  
              String sourceContentHelperNew = contentAfterReplace;
              String varName = entry.getKey();
              String replacement = entry.getValue();
  
              if (varName.contains(PcConstants.NODE_REQUEST_PREFIX_REPLACE_VAR)) {
  
                  String varTrueName = "$"
                          + varName
                                  .replace(
                                          PcConstants.NODE_REQUEST_PREFIX_REPLACE_VAR,
                                          "");
                  sourceContentHelperNew = contentAfterReplace.replace(
                          varTrueName, replacement);
                  contentAfterReplace = sourceContentHelperNew;
              }
  
          }
  
          return contentAfterReplace;
      }
docs: 20130507: auto replace part.
  
  @param requestParameters
  the request parameters
  @param sourceContent
  the source content
  @return the string