Class WorkController


  • @RestController
    public class WorkController
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long count()  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.work.Work> 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.Work> 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.Work> getByUuid​(UUID uuid, Locale pLocale)  
      List<de.digitalcollections.model.identifiable.entity.agent.Agent> getCreators​(UUID uuid)  
      List<de.digitalcollections.model.identifiable.entity.work.Item> getItems​(UUID uuid)  
      de.digitalcollections.model.identifiable.entity.work.Work save​(de.digitalcollections.model.identifiable.entity.work.Work work, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.identifiable.entity.work.Work update​(UUID uuid, de.digitalcollections.model.identifiable.entity.work.Work work, org.springframework.validation.BindingResult errors)  
    • Constructor Detail

      • WorkController

        public WorkController​(WorkService workService)
    • Method Detail

      • count

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

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

        @GetMapping(value={"/v6/works/identifier","/v5/works/identifier","/v2/works/identifier","/latest/works/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/works/{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/works/{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/works/{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/works/{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.work.Work> getByUuid​(@PathVariable("uuid")
                                                                                                                            UUID uuid,
                                                                                                                            @RequestParam(name="pLocale",required=false)
                                                                                                                            Locale pLocale)
                                                                                                                     throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • getCreators

        @GetMapping(value={"/v6/works/{uuid}/creators","/v5/works/{uuid}/creators","/v2/works/{uuid}/creators","/latest/works/{uuid}/creators"},
                    produces="application/json")
        public List<de.digitalcollections.model.identifiable.entity.agent.Agent> getCreators​(@PathVariable
                                                                                             UUID uuid)
      • getItems

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

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