コード例 #1
0
 @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";
 }
コード例 #2
0
 @ModelAttribute("project")
 public Project getProject(@PathVariable(value = "id") Long projectId) {
   return projectDao.getProjectById(projectId);
 }