Class ItemController


  • @RestController
    public class ItemController
    extends Object
    • 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()  
      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)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Item> getByIdentifier​(String namespace, String id)  
      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> getByUuid​(UUID uuid, Locale pLocale)  
      Set<de.digitalcollections.model.identifiable.entity.DigitalObject> getDigitalObjects​(UUID uuid)  
      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

      • addDigitalObject

        @PostMapping(value={"/latest/items/{uuid}/digitalobjects/{digitalObjectUuid}","/v2/items/{uuid}/digitalobjects/{digitalObjectUuid}"},
                     produces="application/json")
        public boolean addDigitalObject​(@PathVariable
                                        UUID uuid,
                                        @PathVariable
                                        UUID digitalObjectUuid)
      • 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()
      • 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)
      • getByIdentifier

        @GetMapping(value={"/v6/items/identifier/{namespace}:{id}","/v6/items/identifier/{namespace}:{id}.json","/v5/items/identifier/{namespace}:{id}","/v5/items/identifier/{namespace}:{id}.json","/v2/items/identifier/{namespace}:{id}","/v2/items/identifier/{namespace}:{id}.json","/latest/items/identifier/{namespace}:{id}","/latest/items/identifier/{namespace}:{id}.json"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Item> getByIdentifier​(@PathVariable
                                                                                                                                  String namespace,
                                                                                                                                  @PathVariable
                                                                                                                                  String id)
                                                                                                                           throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • 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}","/v5/items/{uuid}","/v2/items/{uuid}","/latest/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
      • getDigitalObjects

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

        @GetMapping(value={"/latest/items/{uuid}/works","/v2/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