Skip to content

Commit

Permalink
AUS-4238 Remove downloadNVCLProcessingResults
Browse files Browse the repository at this point in the history
  • Loading branch information
vjf committed Oct 16, 2024
1 parent 645844e commit f2c1149
Showing 1 changed file with 0 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -760,49 +760,6 @@ public ModelAndView getNVCLProcessingResults(@RequestParam("jobId") String jobId
}
}


/**
* Downloads results of NVCL processing job
* @param jobId
* job id NVCL processing job
* @param returns results as a byte stream encoded in zip format, containing csv files
* @throws Exception
*/
@RequestMapping("/downloadNVCLProcessingResults.do")
public void downloadNVCLProcessingResults(@RequestParam("jobId") String jobId, HttpServletResponse response) throws Exception {
AnalyticalJobResults results = this.dataService2_0.getProcessingResults(jobId);

response.setContentType("application/zip");
response.setHeader("Content-Disposition","inline; filename=nvclanalytics-" + jobId + ".zip;");
ZipOutputStream zout = new ZipOutputStream(response.getOutputStream());

try{
zout.putNextEntry(new ZipEntry("passIds.csv"));
for (String id : results.getPassBoreholes()) {
zout.write((id + '\n').getBytes());
}
zout.closeEntry();

zout.putNextEntry(new ZipEntry("failIds.csv"));
for (String id : results.getFailBoreholes()) {
zout.write((id + '\n').getBytes());
}
zout.closeEntry();

zout.putNextEntry(new ZipEntry("errorIds.csv"));
for (String id : results.getErrorBoreholes()) {
zout.write((id + '\n').getBytes());
}
zout.closeEntry();

zout.finish();
zout.flush();
} finally {
zout.close();
}
}


/**
* Requests the image tray depth from NVCL services
*
Expand Down

0 comments on commit f2c1149

Please sign in to comment.