@RequestMapping(value = "/projects/{id}/cleanse", method = RequestMethod.GET) @PreAuthorize("hasPermission(#project, 'write')") public String getCleanseView(Model model, @ModelAttribute(value = "project") Project project) { List<Animal> projectAnimalsList = animalDao.getAnimalsByProjectId(project.getId()); model.addAttribute("projectAnimalsList", projectAnimalsList); model.addAttribute("projectBoundingBox", projectDao.getBoundingBox(project)); model.addAttribute( "projectDetectionDateRange", projectDao.getDetectionDateRange(project, true)); model.addAttribute("argosClasses", ArgosClass.values()); return "project-cleanse"; }
@ModelAttribute("project") public Project getProject(@PathVariable(value = "id") Long projectId) { return projectDao.getProjectById(projectId); }