Class WorkController
java.lang.Object
de.digitalcollections.cudami.server.controller.identifiable.entity.work.WorkController
@RestController
public class WorkController
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description WorkController(WorkService workService) -
Method Summary
Modifier and Type Method Description longcount()de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.work.Work>findAll(int pageNumber, int pageSize, java.util.List<de.digitalcollections.model.paging.Order> sortBy, java.lang.String language, java.lang.String initial)org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Work>get(java.util.UUID uuid, java.util.Locale pLocale)org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Work>getByIdentifier(java.lang.String namespace, java.lang.String id)java.util.List<de.digitalcollections.model.identifiable.entity.agent.Agent>getCreators(java.util.UUID uuid)java.util.List<de.digitalcollections.model.identifiable.entity.work.Item>getItems(java.util.UUID uuid)de.digitalcollections.model.identifiable.entity.work.Worksave(de.digitalcollections.model.identifiable.entity.work.Work work, org.springframework.validation.BindingResult errors)de.digitalcollections.model.identifiable.entity.work.Workupdate(java.util.UUID uuid, de.digitalcollections.model.identifiable.entity.work.Work work, org.springframework.validation.BindingResult errors)
-
Constructor Details
-
Method Details
-
count
@GetMapping(value={"/v5/works/count","/v2/works/count","/latest/works/count"}, produces="application/json") public long count() -
findAll
@GetMapping(value={"/v5/works","/v2/works","/latest/works"}, produces="application/json") public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.work.Work> findAll(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="5") int pageSize, @RequestParam(name="sortBy",required=false) java.util.List<de.digitalcollections.model.paging.Order> sortBy, @RequestParam(name="language",required=false,defaultValue="de") java.lang.String language, @RequestParam(name="initial",required=false) java.lang.String initial) -
get
@GetMapping(value={"/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> get(@PathVariable("uuid") java.util.UUID uuid, @RequestParam(name="pLocale",required=false) java.util.Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getByIdentifier
@GetMapping(value={"/v5/works/identifier","/v2/works/identifier","/latest/works/identifier"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.work.Work> getByIdentifier(@RequestParam(name="namespace",required=true) java.lang.String namespace, @RequestParam(name="id",required=true) java.lang.String id) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
save
@PostMapping(value={"/v5/works","/v2/works","/latest/works"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.work.Work save(@RequestBody de.digitalcollections.model.identifiable.entity.work.Work work, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@PutMapping(value={"/v5/works/{uuid}","/v2/works/{uuid}","/latest/works/{uuid}"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.work.Work update(@PathVariable("uuid") java.util.UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.work.Work work, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getCreators
@GetMapping(value={"/v5/works/{uuid}/creators","/v2/works/{uuid}/creators","/latest/works/{uuid}/creators"}, produces="application/json") public java.util.List<de.digitalcollections.model.identifiable.entity.agent.Agent> getCreators(@PathVariable java.util.UUID uuid) -
getItems
@GetMapping(value={"/v5/works/{uuid}/items","/v2/works/{uuid}/items","/latest/works/{uuid}/items"}, produces="application/json") public java.util.List<de.digitalcollections.model.identifiable.entity.work.Item> getItems(@PathVariable java.util.UUID uuid)
-