class AllResultFileDownloadController {

    @SuppressWarnings("unchecked")
    @RequestMapping(value = "/downloadAll")
    public void downloadFiles(final HttpSession session, final HttpServletResponse response) {
        List<List<String>> searchResultWithPairs = (List<List<String>>) session.getAttribute(SEARCH_RESULT_KEY);
        if (searchResultWithPairs != null && !searchResultWithPairs.isEmpty()) {
            writeZipToResponse(response, searchResultWithPairs);
            clearSearchResultFromSession(session);
        }
    }

}