Class FileResourcesMetadataController


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.digitalcollections.model.identifiable.resource.FileResource 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.resource.FileResource> find​(int pageNumber, int pageSize, String searchTerm, List<de.digitalcollections.model.list.sorting.Order> sortBy)  
      de.digitalcollections.model.identifiable.resource.FileResource getByUuid​(UUID uuid)  
      String list​(org.springframework.ui.Model model)  
      protected String module()  
      org.springframework.http.ResponseEntity save​(de.digitalcollections.model.identifiable.resource.FileResource fileResource)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> searchFileResourcesByType​(String type, int pageNumber, int pageSize, String searchTerm, List<de.digitalcollections.model.list.sorting.Order> sortBy)  
      org.springframework.http.ResponseEntity update​(UUID uuid, de.digitalcollections.model.identifiable.resource.FileResource fileResource)  
      String view​(UUID uuid, org.springframework.ui.Model model)  
      • Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController

        verifyBinding
    • Method Detail

      • create

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

        @GetMapping("/api/fileresources/new")
        @ResponseBody
        public de.digitalcollections.model.identifiable.resource.FileResource create()
                                                                              throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • edit

        @GetMapping("/fileresources/{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/fileresources")
        @ResponseBody
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> 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/fileresources/{uuid}")
        @ResponseBody
        public de.digitalcollections.model.identifiable.resource.FileResource getByUuid​(@PathVariable
                                                                                        UUID uuid)
                                                                                 throws de.digitalcollections.model.exception.TechnicalException
        Throws:
        de.digitalcollections.model.exception.TechnicalException
      • list

        @GetMapping("/fileresources")
        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()
      • save

        @PostMapping("/api/fileresources")
        public org.springframework.http.ResponseEntity save​(@RequestBody
                                                            de.digitalcollections.model.identifiable.resource.FileResource fileResource)
      • searchFileResourcesByType

        @GetMapping("/api/fileresources/type/{type}")
        @ResponseBody
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> searchFileResourcesByType​(@PathVariable
                                                                                                                                                              String type,
                                                                                                                                                              @RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                                              int pageNumber,
                                                                                                                                                              @RequestParam(name="pageSize",required=false,defaultValue="5")
                                                                                                                                                              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
      • update

        @PutMapping("/api/fileresources/{uuid}")
        public org.springframework.http.ResponseEntity update​(@PathVariable
                                                              UUID uuid,
                                                              @RequestBody
                                                              de.digitalcollections.model.identifiable.resource.FileResource fileResource)
      • view

        @GetMapping("/fileresources/{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