Class PersonController
- java.lang.Object
-
- de.digitalcollections.cudami.server.controller.identifiable.entity.agent.PersonController
-
@RestController public class PersonController extends Object
-
-
Constructor Summary
Constructors Constructor Description PersonController(PersonService personService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount()de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person>findAll(int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String language, String initial, de.digitalcollections.model.filter.FilterCriterion<UUID> previewImageFilter, String searchTerm)org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.agent.Person>findByIdentifier(String namespace, String id)org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.agent.Person>get(UUID uuid, Locale pLocale)org.springframework.http.ResponseEntity<Void>getByIdentifier(String namespace, String id, javax.servlet.http.HttpServletRequest request)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person>getByPlaceOfBirth(UUID uuid, int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person>getByPlaceOfDeath(UUID uuid, int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy)Set<de.digitalcollections.model.identifiable.entity.DigitalObject>getDigitalObjects(UUID uuid)List<Locale>getLanguages()Set<de.digitalcollections.model.identifiable.entity.work.Work>getWorks(UUID uuid)de.digitalcollections.model.identifiable.entity.agent.Personsave(de.digitalcollections.model.identifiable.entity.agent.Person person, org.springframework.validation.BindingResult errors)de.digitalcollections.model.identifiable.entity.agent.Personupdate(UUID uuid, de.digitalcollections.model.identifiable.entity.agent.Person person, org.springframework.validation.BindingResult errors)
-
-
-
Constructor Detail
-
PersonController
public PersonController(PersonService personService)
-
-
Method Detail
-
count
@GetMapping(value={"/v5/persons/count","/v2/persons/count","/latest/persons/count"}, produces="application/json") public long count()
-
findAll
@GetMapping(value={"/v5/persons","/v2/persons","/latest/persons"}, produces="application/json") public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person> findAll(@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.paging.Order> sortBy, @RequestParam(name="language",required=false,defaultValue="de") String language, @RequestParam(name="initial",required=false) String initial, @RequestParam(name="previewImage",required=false) de.digitalcollections.model.filter.FilterCriterion<UUID> previewImageFilter, @RequestParam(name="searchTerm",required=false) String searchTerm)
-
findByIdentifier
@GetMapping(value={"/v5/persons/identifier/{namespace}:{id}","/v2/persons/identifier/{namespace}:{id}","/latest/persons/identifier/{namespace}:{id}"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.agent.Person> findByIdentifier(@PathVariable String namespace, @PathVariable String id) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getByPlaceOfBirth
@GetMapping(value={"/v5/persons/placeofbirth/{uuid}","/v2/persons/placeofbirth/{uuid}","/latest/persons/placeofbirth/{uuid}"}, produces="application/json") public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person> getByPlaceOfBirth(@PathVariable("uuid") 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.paging.Order> sortBy)
-
getByPlaceOfDeath
@GetMapping(value={"/v5/persons/placeofdeath/{uuid}","/v2/persons/placeofdeath/{uuid}","/latest/persons/placeofdeath/{uuid}"}, produces="application/json") public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person> getByPlaceOfDeath(@PathVariable("uuid") 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.paging.Order> sortBy)
-
get
@GetMapping(value={"/v5/persons/{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/persons/{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/persons/{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.agent.Person> get(@PathVariable("uuid") UUID uuid, @RequestParam(name="pLocale",required=false) Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getByIdentifier
@GetMapping(value={"/v5/persons/identifier","/v2/persons/identifier","/latest/persons/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
-
getDigitalObjects
@GetMapping(value={"/v5/persons/{uuid}/digitalobjects","/v2/persons/{uuid}/digitalobjects","/latest/persons/{uuid}/digitalobjects"}, produces="application/json") public Set<de.digitalcollections.model.identifiable.entity.DigitalObject> getDigitalObjects(@PathVariable("uuid") UUID uuid) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getLanguages
@GetMapping(value={"/v5/persons/languages","/v3/persons/languages","/latest/persons/languages"}, produces="application/json") public List<Locale> getLanguages()
-
getWorks
@GetMapping(value={"/v5/persons/{uuid}/works","/v2/persons/{uuid}/works","/latest/persons/{uuid}/works"}, produces="application/json") public Set<de.digitalcollections.model.identifiable.entity.work.Work> getWorks(@PathVariable("uuid") UUID uuid) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
save
@PostMapping(value={"/v5/persons","/v2/persons","/latest/persons"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.agent.Person save(@RequestBody de.digitalcollections.model.identifiable.entity.agent.Person person, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException, ValidationException
-
update
@PutMapping(value={"/v5/persons/{uuid}","/v2/persons/{uuid}","/latest/persons/{uuid}"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.agent.Person update(@PathVariable("uuid") UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.agent.Person person, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException, ValidationException
-
-