Class CollectionController


  • @RestController
    public class CollectionController
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity addDigitalObject​(UUID collectionUuid, UUID digitalObjectUuid)  
      org.springframework.http.ResponseEntity addDigitalObjects​(UUID collectionUuid, List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)  
      org.springframework.http.ResponseEntity addSubcollection​(UUID uuid, UUID subcollectionUuid)  
      org.springframework.http.ResponseEntity addSubcollections​(UUID uuid, List<de.digitalcollections.model.identifiable.entity.Collection> subcollections)  
      long count()  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findAll​(int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String active)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findAllTop​(int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String searchTerm)  
      de.digitalcollections.model.identifiable.entity.Collection findByIdentifier​(String namespace, String id)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Collection> findByRefId​(long refId)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Collection> findByUuid​(UUID uuid, Locale pLocale, String active)  
      de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Collection> findCollections​(int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String searchTerm, String active)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation> getBreadcrumb​(UUID uuid, Locale pLocale)  
      de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> getDigitalObjects​(UUID collectionUuid, int pageNumber, int pageSize, String searchTerm)  
      de.digitalcollections.model.identifiable.entity.Collection getParent​(UUID uuid)  
      List<de.digitalcollections.model.identifiable.entity.Collection> getParents​(UUID collectionUuid)  
      List<de.digitalcollections.model.identifiable.entity.agent.CorporateBody> getRelatedCorporateBodies​(UUID uuid, de.digitalcollections.model.filter.FilterCriterion<String> predicate)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> getSubcollections​(UUID collectionUuid, int pageNumber, int pageSize, String active, List<de.digitalcollections.model.paging.Order> sortBy, String searchTerm)  
      List<Locale> getTopCollectionsLanguages()  
      org.springframework.http.ResponseEntity removeDigitalObject​(UUID collectionUuid, UUID digitalObjectUuid)  
      org.springframework.http.ResponseEntity removeSubcollection​(UUID uuid, UUID subcollectionUuid)  
      de.digitalcollections.model.identifiable.entity.Collection save​(de.digitalcollections.model.identifiable.entity.Collection collection, org.springframework.validation.BindingResult errors)  
      org.springframework.http.ResponseEntity saveDigitalObjects​(UUID collectionUuid, List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)  
      de.digitalcollections.model.identifiable.entity.Collection saveWithParentCollection​(UUID parentUuid, de.digitalcollections.model.identifiable.entity.Collection collection)  
      de.digitalcollections.model.identifiable.entity.Collection update​(UUID uuid, de.digitalcollections.model.identifiable.entity.Collection collection, org.springframework.validation.BindingResult errors)  
    • Method Detail

      • addDigitalObject

        @PostMapping(value={"/v5/collections/{uuid}/digitalobjects/{digitalObjectUuid}","/v3/collections/{uuid}/digitalobjects/{digitalObjectUuid}","/latest/collections/{uuid}/digitalobjects/{digitalObjectUuid}"},
                     produces="application/json")
        public org.springframework.http.ResponseEntity addDigitalObject​(@PathVariable("uuid")
                                                                        UUID collectionUuid,
                                                                        @PathVariable("digitalObjectUuid")
                                                                        UUID digitalObjectUuid)
      • addDigitalObjects

        @PostMapping(value={"/v5/collections/{uuid}/digitalobjects","/v3/collections/{uuid}/digitalobjects","/latest/collections/{uuid}/digitalobjects"},
                     produces="application/json")
        public org.springframework.http.ResponseEntity addDigitalObjects​(@PathVariable("uuid")
                                                                         UUID collectionUuid,
                                                                         @RequestBody
                                                                         List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)
      • addSubcollection

        @PostMapping(value={"/v5/collections/{uuid}/subcollections/{subcollectionUuid}","/v3/collections/{uuid}/subcollections/{subcollectionUuid}","/latest/collections/{uuid}/subcollections/{subcollectionUuid}"},
                     produces="application/json")
        public org.springframework.http.ResponseEntity addSubcollection​(@PathVariable("uuid")
                                                                        UUID uuid,
                                                                        @PathVariable("subcollectionUuid")
                                                                        UUID subcollectionUuid)
      • addSubcollections

        @PostMapping(value={"/v5/collections/{uuid}/subcollections","/v3/collections/{uuid}/subcollections","/latest/collections/{uuid}/subcollections"},
                     produces="application/json")
        public org.springframework.http.ResponseEntity addSubcollections​(@PathVariable("uuid")
                                                                         UUID uuid,
                                                                         @RequestBody
                                                                         List<de.digitalcollections.model.identifiable.entity.Collection> subcollections)
      • count

        @GetMapping(value={"/v5/collections/count","/v2/collections/count","/latest/collections/count"},
                    produces="application/json")
        public long count()
      • findAll

        @GetMapping(value="/v5/collections",
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findAll​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                   int pageNumber,
                                                                                                                                   @RequestParam(name="pageSize",required=false,defaultValue="25")
                                                                                                                                   int pageSize,
                                                                                                                                   @RequestParam(name="sortBy",required=false)
                                                                                                                                   List<de.digitalcollections.model.paging.Order> sortBy,
                                                                                                                                   @RequestParam(name="active",required=false)
                                                                                                                                   String active)
      • findAllTop

        @GetMapping(value={"/v5/collections/top","/v2/collections/top","/latest/collections/top"},
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findAllTop​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                      int pageNumber,
                                                                                                                                      @RequestParam(name="pageSize",required=false,defaultValue="5")
                                                                                                                                      int pageSize,
                                                                                                                                      @RequestParam(name="sortBy",required=false)
                                                                                                                                      List<de.digitalcollections.model.paging.Order> sortBy,
                                                                                                                                      @RequestParam(name="searchTerm",required=false)
                                                                                                                                      String searchTerm)
      • findByIdentifier

        @GetMapping(value={"/v5/collections/identifier/{namespace}:{id}","/v2/collections/identifier/{namespace}:{id}","/latest/collections/identifier/{namespace}:{id}"},
                    produces="application/json")
        public de.digitalcollections.model.identifiable.entity.Collection findByIdentifier​(@PathVariable
                                                                                           String namespace,
                                                                                           @PathVariable
                                                                                           String id)
                                                                                    throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • findByRefId

        @GetMapping(value={"/v5/collections/{refId:[0-9]+}","/latest/collections/{refId:[0-9]+}"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Collection> findByRefId​(@PathVariable
                                                                                                                               long refId)
                                                                                                                        throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • findByUuid

        @GetMapping(value={"/v5/collections/{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}}","/v2/collections/{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}}","/latest/collections/{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}}"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Collection> findByUuid​(@PathVariable("uuid")
                                                                                                                              UUID uuid,
                                                                                                                              @RequestParam(name="pLocale",required=false)
                                                                                                                              Locale pLocale,
                                                                                                                              @RequestParam(name="active",required=false)
                                                                                                                              String active)
                                                                                                                       throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • findCollections

        @GetMapping(value="/v5/collections/search",
                    produces="application/json")
        public de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Collection> findCollections​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                                 int pageNumber,
                                                                                                                                                 @RequestParam(name="pageSize",required=false,defaultValue="5")
                                                                                                                                                 int pageSize,
                                                                                                                                                 @RequestParam(name="sortBy",required=false)
                                                                                                                                                 List<de.digitalcollections.model.paging.Order> sortBy,
                                                                                                                                                 @RequestParam(name="searchTerm",required=false)
                                                                                                                                                 String searchTerm,
                                                                                                                                                 @RequestParam(name="active",required=false)
                                                                                                                                                 String active)
      • getBreadcrumb

        @GetMapping(value={"/v5/collections/{uuid}/breadcrumb","/v3/collections/{uuid}/breadcrumb","/latest/collections/{uuid}/breadcrumb"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation> getBreadcrumb​(@PathVariable("uuid")
                                                                                                                            UUID uuid,
                                                                                                                            @RequestParam(name="pLocale",required=false)
                                                                                                                            Locale pLocale)
      • getDigitalObjects

        @GetMapping(value="/v5/collections/{uuid}/digitalobjects",
                    produces="application/json")
        public de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> getDigitalObjects​(@PathVariable("uuid")
                                                                                                                                                      UUID collectionUuid,
                                                                                                                                                      @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)
      • getParent

        @GetMapping(value={"/v5/collections/{uuid}/parent","/v3/collections/{uuid}/parent","/latest/collections/{uuid}/parent"},
                    produces="application/json")
        public de.digitalcollections.model.identifiable.entity.Collection getParent​(@PathVariable
                                                                                    UUID uuid)
      • getParents

        @GetMapping(value={"/v5/collections/{uuid}/parents","/v3/collections/{uuid}/parents","/latest/collections/{uuid}/parents"},
                    produces="application/json")
        public List<de.digitalcollections.model.identifiable.entity.Collection> getParents​(@PathVariable("uuid")
                                                                                           UUID collectionUuid)
      • getRelatedCorporateBodies

        @GetMapping(value={"/v5/collections/{uuid}/related/corporatebodies","/v3/collections/{uuid}/related/corporatebodies","/latest/collections/{uuid}/related/corporatebodies"},
                    produces="application/json")
        public List<de.digitalcollections.model.identifiable.entity.agent.CorporateBody> getRelatedCorporateBodies​(@PathVariable("uuid")
                                                                                                                   UUID uuid,
                                                                                                                   @RequestParam(name="predicate",required=true)
                                                                                                                   de.digitalcollections.model.filter.FilterCriterion<String> predicate)
      • getSubcollections

        @GetMapping(value="/v5/collections/{uuid}/subcollections",
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> getSubcollections​(@PathVariable("uuid")
                                                                                                                                             UUID collectionUuid,
                                                                                                                                             @RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                             int pageNumber,
                                                                                                                                             @RequestParam(name="pageSize",required=false,defaultValue="25")
                                                                                                                                             int pageSize,
                                                                                                                                             @RequestParam(name="active",required=false)
                                                                                                                                             String active,
                                                                                                                                             @RequestParam(name="sortBy",required=false)
                                                                                                                                             List<de.digitalcollections.model.paging.Order> sortBy,
                                                                                                                                             @RequestParam(name="searchTerm",required=false)
                                                                                                                                             String searchTerm)
      • getTopCollectionsLanguages

        @GetMapping(value={"/v5/collections/top/languages","/v2/collections/top/languages","/latest/collections/top/languages"},
                    produces="application/json")
        public List<Locale> getTopCollectionsLanguages()
      • removeDigitalObject

        @DeleteMapping(value={"/v5/collections/{uuid}/digitalobjects/{digitalObjectUuid}","/v3/collections/{uuid}/digitalobjects/{digitalObjectUuid}","/latest/collections/{uuid}/digitalobjects/{digitalObjectUuid}"},
                       produces="application/json")
        public org.springframework.http.ResponseEntity removeDigitalObject​(@PathVariable("uuid")
                                                                           UUID collectionUuid,
                                                                           @PathVariable("digitalObjectUuid")
                                                                           UUID digitalObjectUuid)
      • removeSubcollection

        @DeleteMapping(value={"/v5/collections/{uuid}/subcollections/{subcollectionUuid}","/v3/collections/{uuid}/subcollections/{subcollectionUuid}","/latest/collections/{uuid}/subcollections/{subcollectionUuid}"},
                       produces="application/json")
        public org.springframework.http.ResponseEntity removeSubcollection​(@PathVariable("uuid")
                                                                           UUID uuid,
                                                                           @PathVariable("subcollectionUuid")
                                                                           UUID subcollectionUuid)
      • saveDigitalObjects

        @PutMapping(value={"/v5/collections/{uuid}/digitalobjects","/v3/collections/{uuid}/digitalobjects","/latest/collections/{uuid}/digitalobjects"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity saveDigitalObjects​(@PathVariable("uuid")
                                                                          UUID collectionUuid,
                                                                          @RequestBody
                                                                          List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)
      • saveWithParentCollection

        @PostMapping(value={"/v5/collections/{parentUuid}/collection","/v2/collections/{parentUuid}/collection","/latest/collections/{parentUuid}/collection"},
                     produces="application/json")
        public de.digitalcollections.model.identifiable.entity.Collection saveWithParentCollection​(@PathVariable
                                                                                                   UUID parentUuid,
                                                                                                   @RequestBody
                                                                                                   de.digitalcollections.model.identifiable.entity.Collection collection)
                                                                                            throws IdentifiableServiceException,
                                                                                                   ValidationException
        Throws:
        IdentifiableServiceException
        ValidationException
      • update

        @PutMapping(value={"/v5/collections/{uuid}","/v2/collections/{uuid}","/latest/collections/{uuid}"},
                    produces="application/json")
        public de.digitalcollections.model.identifiable.entity.Collection update​(@PathVariable
                                                                                 UUID uuid,
                                                                                 @RequestBody
                                                                                 de.digitalcollections.model.identifiable.entity.Collection collection,
                                                                                 org.springframework.validation.BindingResult errors)
                                                                          throws IdentifiableServiceException,
                                                                                 ValidationException
        Throws:
        IdentifiableServiceException
        ValidationException