docs: public void doBatchAdd(@FormGroup("batchDataMediaPairInfo") Group batchDataMediaPairInfo,
                             @Param("pipelineId") Long pipelineId,
                             @FormField(name = "formBatchDataMediaPairError", group = "batchDataMediaPairInfo") CustomErrors err,
                             Navigator nav) throws Exception {
          String batchPairContent = batchDataMediaPairInfo.getField("batchPairContent").getStringValue();
          List<String> StringPairs = Arrays.asList(batchPairContent.split("\r\n"));
          try {
              for (String stringPair : StringPairs) {
                  List<String> pairData = Arrays.asList(stringPair.split(","));
                  if (pairData.size() < 4) {
                      throw new ManagerException("[" + stringPair + "] the line not all parameters");
                  }
                  // build the pair source
                  DataMedia sourceDataMedia = new DataMedia();
                  DataMediaSource sourceDataMediaSource = dataMediaSourceService.findById(Long.parseLong(StringUtils.trimToNull(pairData.get(2))));
                  sourceDataMedia.setNamespace(StringUtils.trimToNull(pairData.get(0)));
                  sourceDataMedia.setName(StringUtils.trimToNull(pairData.get(1)));
                  sourceDataMedia.setSource(sourceDataMediaSource);
                  Long sourceMediaId = dataMediaService.createReturnId(sourceDataMedia);
                  sourceDataMedia.setId(sourceMediaId);
                  // build the pair target
                  DataMedia targetDataMedia = new DataMedia();
                  Long weight = 5L;
                  if (StringUtils.isNumeric(pairData.get(3)) && pairData.size() <= 5) {// 如果是纯数字，那说明是简化配置模式
                      DataMediaSource targetDataMediaSource = dataMediaSourceService.findById(Long.parseLong(StringUtils.trimToNull(pairData.get(3))));
                      targetDataMedia.setNamespace(StringUtils.trimToNull(pairData.get(0)));
                      targetDataMedia.setName(StringUtils.trimToNull(pairData.get(1)));
                      targetDataMedia.setSource(targetDataMediaSource);
                      Long targetMediaId = dataMediaService.createReturnId(targetDataMedia);
                      targetDataMedia.setId(targetMediaId);
  
                      if (pairData.size() >= 5) {
                          weight = Long.parseLong(StringUtils.trimToNull(pairData.get(4)));
                      }
                  } else {
                      DataMediaSource targetDataMediaSource = dataMediaSourceService.findById(Long.parseLong(StringUtils.trimToNull(pairData.get(5))));
                      targetDataMedia.setNamespace(StringUtils.trimToNull(pairData.get(3)));
                      targetDataMedia.setName(StringUtils.trimToNull(pairData.get(4)));
                      targetDataMedia.setSource(targetDataMediaSource);
                      Long targetMediaId = dataMediaService.createReturnId(targetDataMedia);
                      targetDataMedia.setId(targetMediaId);
  
                      if (pairData.size() >= 7) {
                          weight = Long.parseLong(StringUtils.trimToNull(pairData.get(6)));
                      }
                  }
  
                  // build the pair
                  DataMediaPair dataMediaPair = new DataMediaPair();
                  dataMediaPair.setSource(sourceDataMedia);
                  dataMediaPair.setTarget(targetDataMedia);
                  dataMediaPair.setPushWeight(weight);
                  dataMediaPair.setPipelineId(pipelineId);
  
                  dataMediaPairService.createIfNotExist(dataMediaPair);
              }
          } catch (Exception e) {
              err.setMessage("invalidBatchDataMediaPair");
              return;
          }
          nav.redirectToLocation("dataMediaPairList.htm?pipelineId=" + pipelineId);
      }