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.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> find​(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchTerm, String active)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findDigitalObjects​(UUID collectionUuid, int pageNumber, int pageSize, String searchTerm)  
      List<de.digitalcollections.model.identifiable.entity.agent.CorporateBody> findRelatedCorporateBodies​(UUID uuid, de.digitalcollections.model.list.filtering.FilterCriterion<String> predicate)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findSubcollections​(UUID collectionUuid, int pageNumber, int pageSize, String active, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchTerm)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findTopCollections​(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchTerm)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation> getBreadcrumbNavigation​(UUID uuid, Locale pLocale)  
      de.digitalcollections.model.identifiable.entity.Collection getByIdentifier​(String namespace, String id)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Collection> getByRefId​(long refId)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Collection> getByUuid​(UUID uuid, Locale pLocale, String active)  
      de.digitalcollections.model.identifiable.entity.Collection getParent​(UUID uuid)  
      List<de.digitalcollections.model.identifiable.entity.Collection> getParents​(UUID collectionUuid)  
      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={"/v6/collections/{uuid}/digitalobjects/{digitalObjectUuid}","/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={"/v6/collections/{uuid}/digitalobjects","/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={"/v6/collections/{uuid}/subcollections/{subcollectionUuid}","/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={"/v6/collections/{uuid}/subcollections","/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={"/v6/collections/count","/v5/collections/count","/v2/collections/count","/latest/collections/count"},
                    produces="application/json")
        public long count()
      • find

        @GetMapping(value="/v6/collections",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> find​(@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.list.sorting.Order> sortBy,
                                                                                                                                     @RequestParam(name="searchTerm",required=false)
                                                                                                                                     String searchTerm,
                                                                                                                                     @RequestParam(name="active",required=false)
                                                                                                                                     String active)
      • findDigitalObjects

        @GetMapping(value="/v6/collections/{uuid}/digitalobjects",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findDigitalObjects​(@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)
      • findRelatedCorporateBodies

        @GetMapping(value={"/v6/collections/{uuid}/related/corporatebodies","/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> findRelatedCorporateBodies​(@PathVariable("uuid")
                                                                                                                    UUID uuid,
                                                                                                                    @RequestParam(name="predicate",required=true)
                                                                                                                    de.digitalcollections.model.list.filtering.FilterCriterion<String> predicate)
      • findSubcollections

        @GetMapping(value="/v6/collections/{uuid}/subcollections",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findSubcollections​(@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.list.sorting.Order> sortBy,
                                                                                                                                                   @RequestParam(name="searchTerm",required=false)
                                                                                                                                                   String searchTerm)
      • findTopCollections

        @GetMapping(value="/v6/collections/top",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findTopCollections​(@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.list.sorting.Order> sortBy,
                                                                                                                                                   @RequestParam(name="searchTerm",required=false)
                                                                                                                                                   String searchTerm)
      • getBreadcrumbNavigation

        @GetMapping(value={"/v6/collections/{uuid}/breadcrumb","/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> getBreadcrumbNavigation​(@PathVariable("uuid")
                                                                                                                                      UUID uuid,
                                                                                                                                      @RequestParam(name="pLocale",required=false)
                                                                                                                                      Locale pLocale)
      • getByIdentifier

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

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

        @GetMapping(value={"/v6/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}}","/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> getByUuid​(@PathVariable("uuid")
                                                                                                                             UUID uuid,
                                                                                                                             @RequestParam(name="pLocale",required=false)
                                                                                                                             Locale pLocale,
                                                                                                                             @RequestParam(name="active",required=false)
                                                                                                                             String active)
                                                                                                                      throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • getParent

        @GetMapping(value={"/v6/collections/{uuid}/parent","/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={"/v6/collections/{uuid}/parents","/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)
      • getTopCollectionsLanguages

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

        @DeleteMapping(value={"/v6/collections/{uuid}/digitalobjects/{digitalObjectUuid}","/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={"/v6/collections/{uuid}/subcollections/{subcollectionUuid}","/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={"/v6/collections/{uuid}/digitalobjects","/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={"/v6/collections/{parentUuid}/collection","/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={"/v6/collections/{uuid}","/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