protected abstract void writeResponse()

in server/src/main/java/jetbrains/buildServer/torrent/web/AbstractLinksController.java [67:81]


  protected abstract void writeResponse(@NotNull HttpServletResponse response,
                                        Map<File, String> torrentsAndArtifacts,
                                        @NotNull SBuild build) throws IOException;

  @NotNull
  private Map<File, String> getArtifactsWithTorrents(@NotNull File baseDir, @NotNull Collection<File> torrentFiles) {
    Map<File, String> torrentFilesAndArtifactsPath = new HashMap<>();
    for (File f: torrentFiles) {
      String path = FileUtil.getRelativePath(baseDir, f);
      if (path == null) continue;
      path = path.replace('\\', '/');
      torrentFilesAndArtifactsPath.put(f, path.substring(0, path.length() - TorrentUtil.TORRENT_FILE_SUFFIX.length()));
    }
    return torrentFilesAndArtifactsPath;
  }