Class ItemController

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addDigitalObject​(UUID uuid, UUID digitalObjectUuid)  
      boolean addWork​(UUID uuid, UUID workUuid)  
      long count()  
      org.springframework.http.ResponseEntity delete​(UUID uuid)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.work.Item> find​(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchTerm, String labelTerm, Locale labelLanguage, de.digitalcollections.model.list.filtering.FilterCriterion<UUID> partOfItemUuidFilterCriterion)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findDigitalObjects​(UUID uuid, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy)  
      org.springframework.http.ResponseEntity<Void> getByIdentifier​(String namespace, String id, javax.servlet.http.HttpServletRequest request)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Item> getByIdentifier​(javax.servlet.http.HttpServletRequest request)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Item> getByUuid​(UUID uuid, Locale pLocale)  
      List<Locale> getLanguages()  
      List<Locale> getLanguagesOfDigitalObjects​(UUID uuid)  
      protected IdentifiableService<de.digitalcollections.model.identifiable.entity.work.Item> getService()  
      Set<de.digitalcollections.model.identifiable.entity.work.Work> getWorks​(UUID uuid)  
      de.digitalcollections.model.identifiable.entity.work.Item save​(de.digitalcollections.model.identifiable.entity.work.Item item, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.identifiable.entity.work.Item update​(UUID uuid, de.digitalcollections.model.identifiable.entity.work.Item item, org.springframework.validation.BindingResult errors)  
    • Constructor Detail

      • ItemController

        public ItemController​(ItemService itemService)
    • Method Detail

      • addWork

        @PostMapping(value={"/latest/items/{uuid}/works/{workUuid}","/v2/items/{uuid}/works/{workUuid}"},
                     produces="application/json")
        public boolean addWork​(@PathVariable
                               UUID uuid,
                               @PathVariable
                               UUID workUuid)
      • count

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

        @DeleteMapping(value="/v6/items/{uuid}",
                       produces="application/json")
        public org.springframework.http.ResponseEntity delete​(@PathVariable("uuid")
                                                              UUID uuid)
                                                       throws ConflictException
        Throws:
        ConflictException
      • find

        @GetMapping(value="/v6/items",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.work.Item> find​(@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,
                                                                                                                                    @RequestParam(name="label",required=false)
                                                                                                                                    String labelTerm,
                                                                                                                                    @RequestParam(name="labelLanguage",required=false)
                                                                                                                                    Locale labelLanguage,
                                                                                                                                    @RequestParam(name="part_of_item.uuid",required=false)
                                                                                                                                    de.digitalcollections.model.list.filtering.FilterCriterion<UUID> partOfItemUuidFilterCriterion)
      • findDigitalObjects

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

        @GetMapping(value={"/v6/items/identifier","/v5/items/identifier","/v2/items/identifier","/latest/items/identifier"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity<Void> getByIdentifier​(@RequestParam(name="namespace",required=true)
                                                                             String namespace,
                                                                             @RequestParam(name="id",required=true)
                                                                             String id,
                                                                             javax.servlet.http.HttpServletRequest request)
                                                                      throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • getByUuid

        @GetMapping(value="/v6/items/{uuid}",
                    produces="application/json")
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Item> getByUuid​(@PathVariable("uuid")
                                                                                                                            UUID uuid,
                                                                                                                            @RequestParam(name="pLocale",required=false)
                                                                                                                            Locale pLocale)
                                                                                                                     throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • getLanguages

        @GetMapping(value="/v6/items/languages",
                    produces="application/json")
        public List<Locale> getLanguages()
      • getLanguagesOfDigitalObjects

        @GetMapping(value="/v6/items/{uuid}/digitalobjects/languages",
                    produces="application/json")
        public List<Locale> getLanguagesOfDigitalObjects​(@PathVariable
                                                         UUID uuid)
      • getWorks

        @GetMapping(value={"/v6/items/{uuid}/works","/v2/items/{uuid}/works","/latest/items/{uuid}/works"},
                    produces="application/json")
        public Set<de.digitalcollections.model.identifiable.entity.work.Work> getWorks​(@PathVariable
                                                                                       UUID uuid)
      • update

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