Class DigitalObjectsController


  • @Controller
    public class DigitalObjectsController
    extends de.digitalcollections.commons.springmvc.controller.AbstractController
    Controller for digital objects management pages.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findAll​(int pageNumber, int pageSize, String searchTerm)  
      de.digitalcollections.model.identifiable.entity.DigitalObject findOneByIdentifier​(String namespace, String id)  
      de.digitalcollections.model.identifiable.entity.DigitalObject get​(UUID uuid)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> getAssociatedCollections​(UUID uuid, int pageNumber, int pageSize, String searchTerm)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Project> getAssociatedProjects​(UUID uuid, int pageNumber, int pageSize, String searchTerm)  
      de.digitalcollections.model.identifiable.entity.DigitalObject getByRefId​(long refId)  
      String list​(org.springframework.ui.Model model)  
      protected String module()  
      de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> search​(int pageNumber, int pageSize, String sortField, de.digitalcollections.model.paging.Direction sortDirection, String searchTerm)  
      String view​(UUID uuid, org.springframework.ui.Model model)  
      • Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController

        verifyBinding
    • Method Detail

      • module

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

        @GetMapping("/api/digitalobjects")
        @ResponseBody
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findAll​(@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 HttpException
        Throws:
        HttpException
      • findOneByIdentifier

        @GetMapping("/api/digitalobjects/identifier/{namespace}:{id}")
        @ResponseBody
        public de.digitalcollections.model.identifiable.entity.DigitalObject findOneByIdentifier​(@PathVariable
                                                                                                 String namespace,
                                                                                                 @PathVariable
                                                                                                 String id)
                                                                                          throws HttpException
        Throws:
        HttpException
      • get

        @GetMapping("/api/digitalobjects/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}")
        @ResponseBody
        public de.digitalcollections.model.identifiable.entity.DigitalObject get​(@PathVariable
                                                                                 UUID uuid)
                                                                          throws HttpException
        Throws:
        HttpException
      • getByRefId

        @GetMapping("/api/digitalobjects/{refId:[0-9]+}")
        @ResponseBody
        public de.digitalcollections.model.identifiable.entity.DigitalObject getByRefId​(@PathVariable
                                                                                        long refId)
                                                                                 throws HttpException
        Throws:
        HttpException
      • getAssociatedCollections

        @GetMapping(value="/api/digitalobjects/{uuid}/collections",
                    produces="application/json")
        @ResponseBody
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> getAssociatedCollections​(@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 HttpException
        Throws:
        HttpException
      • getAssociatedProjects

        @GetMapping(value="/api/digitalobjects/{uuid}/projects",
                    produces="application/json")
        @ResponseBody
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Project> getAssociatedProjects​(@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 HttpException
        Throws:
        HttpException
      • search

        @GetMapping("/api/digitalobjects/search")
        @ResponseBody
        public de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> search​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                           int pageNumber,
                                                                                                                                           @RequestParam(name="pageSize",required=false,defaultValue="5")
                                                                                                                                           int pageSize,
                                                                                                                                           @RequestParam(name="sortField",required=false)
                                                                                                                                           String sortField,
                                                                                                                                           @RequestParam(name="sortDirection",required=false)
                                                                                                                                           de.digitalcollections.model.paging.Direction sortDirection,
                                                                                                                                           @RequestParam(name="searchTerm",required=false)
                                                                                                                                           String searchTerm)
                                                                                                                                    throws HttpException
        Throws:
        HttpException
      • view

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