@RequestMapping("cups/{cupId}/logo/") public void cupLogo(final @PathVariable("cupId") int cupId, final HttpServletResponse response) throws IOException { final Cup cup = cupService.load(cupId); final File cupLogo = logoService.getLogoFile(cup); if (isLogo(cupLogo)) { downloadFile(cupLogo, response); return; } downloadFile(logoService.getLogoFile(cup.getCategory()), response); }
@RequestMapping("teams/{teamId}/logo/") public void teamLogo(final @PathVariable("teamId") int teamId, final HttpServletResponse response) throws IOException { downloadFile(logoService.getLogoFile(teamService.load(teamId)), response); }
@RequestMapping("categories/{categoryId}/logo/") public void categoryLogo( final @PathVariable("categoryId") int categoryId, final HttpServletResponse response) throws IOException { downloadFile(logoService.getLogoFile(categoryService.load(categoryId)), response); }