Class ProjectsController


  • @Controller
    public class ProjectsController
    extends de.digitalcollections.commons.springmvc.controller.AbstractController
    Controller for project management pages.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity addDigitalObjects​(UUID uuid, List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)  
      de.digitalcollections.model.identifiable.entity.Project create()  
      String create​(org.springframework.ui.Model model)  
      String edit​(UUID uuid, Locale activeLanguage, org.springframework.ui.Model model)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Project> find​(int pageNumber, int pageSize, String searchTerm, List<de.digitalcollections.model.list.sorting.Order> sortBy)  
      de.digitalcollections.model.identifiable.entity.Project getByUuid​(UUID uuid)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> getDigitalObjects​(UUID uuid, int pageNumber, int pageSize, String searchTerm)  
      String list​(org.springframework.ui.Model model)  
      protected String module()  
      org.springframework.http.ResponseEntity removeDigitalObject​(UUID projectUuid, UUID digitalobjectUuid)  
      org.springframework.http.ResponseEntity save​(de.digitalcollections.model.identifiable.entity.Project project)  
      org.springframework.http.ResponseEntity update​(UUID uuid, de.digitalcollections.model.identifiable.entity.Project project)  
      String view​(UUID uuid, org.springframework.ui.Model model)  
      • Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController

        verifyBinding
    • Method Detail

      • addDigitalObjects

        @PostMapping("/api/projects/{uuid}/digitalobjects")
        public org.springframework.http.ResponseEntity addDigitalObjects​(@PathVariable
                                                                         UUID uuid,
                                                                         @RequestBody
                                                                         List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)
                                                                  throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • create

        @GetMapping("/projects/new")
        public String create​(org.springframework.ui.Model model)
                      throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • create

        @GetMapping("/api/projects/new")
        @ResponseBody
        public de.digitalcollections.model.identifiable.entity.Project create()
                                                                       throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • edit

        @GetMapping("/projects/{uuid}/edit")
        public String edit​(@PathVariable
                           UUID uuid,
                           @RequestParam(name="activeLanguage",required=false)
                           Locale activeLanguage,
                           org.springframework.ui.Model model)
                    throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • find

        @GetMapping("/api/projects")
        @ResponseBody
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Project> find​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                  int pageNumber,
                                                                                                                                  @RequestParam(name="pageSize",required=false,defaultValue="25")
                                                                                                                                  int pageSize,
                                                                                                                                  @RequestParam(name="searchTerm",required=false)
                                                                                                                                  String searchTerm,
                                                                                                                                  @RequestParam(name="sortBy",required=false)
                                                                                                                                  List<de.digitalcollections.model.list.sorting.Order> sortBy)
                                                                                                                           throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • getByUuid

        @GetMapping("/api/projects/{uuid}")
        @ResponseBody
        public de.digitalcollections.model.identifiable.entity.Project getByUuid​(@PathVariable
                                                                                 UUID uuid)
                                                                          throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • getDigitalObjects

        @GetMapping("/api/projects/{uuid}/digitalobjects")
        @ResponseBody
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> getDigitalObjects​(@PathVariable
                                                                                                                                                     UUID uuid,
                                                                                                                                                     @RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                                     int pageNumber,
                                                                                                                                                     @RequestParam(name="pageSize",required=false,defaultValue="25")
                                                                                                                                                     int pageSize,
                                                                                                                                                     @RequestParam(name="searchTerm",required=false)
                                                                                                                                                     String searchTerm)
                                                                                                                                              throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • list

        @GetMapping("/projects")
        public String list​(org.springframework.ui.Model model)
                    throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • module

        @ModelAttribute("menu")
        protected String module()
      • removeDigitalObject

        @DeleteMapping("/api/projects/{projectUuid}/digitalobjects/{digitalobjectUuid}")
        @ResponseBody
        public org.springframework.http.ResponseEntity removeDigitalObject​(@PathVariable
                                                                           UUID projectUuid,
                                                                           @PathVariable
                                                                           UUID digitalobjectUuid)
                                                                    throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • save

        @PostMapping("/api/projects")
        public org.springframework.http.ResponseEntity save​(@RequestBody
                                                            de.digitalcollections.model.identifiable.entity.Project project)
      • update

        @PutMapping("/api/projects/{uuid}")
        public org.springframework.http.ResponseEntity update​(@PathVariable
                                                              UUID uuid,
                                                              @RequestBody
                                                              de.digitalcollections.model.identifiable.entity.Project project)
      • view

        @GetMapping("/projects/{uuid}")
        public String view​(@PathVariable
                           UUID uuid,
                           org.springframework.ui.Model model)
                    throws de.digitalcollections.model.exception.TechnicalException,
                           de.digitalcollections.model.exception.ResourceNotFoundException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
        de.digitalcollections.model.exception.ResourceNotFoundException