Class PersonController
- java.lang.Object
-
- de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.agent.Person>
-
- de.digitalcollections.cudami.server.controller.identifiable.entity.agent.PersonController
-
@RestController public class PersonController extends AbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.agent.Person>
-
-
Constructor Summary
Constructors Constructor Description PersonController(PersonService personService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount()org.springframework.http.ResponseEntitydelete(UUID uuid)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person>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> previewImageFilter)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person>findByGeoLocationOfBirth(UUID uuid, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person>findByGeoLocationOfDeath(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.agent.Person>getByIdentifier(javax.servlet.http.HttpServletRequest request)org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.agent.Person>getByUuid(UUID uuid, Locale pLocale)Set<de.digitalcollections.model.identifiable.entity.DigitalObject>getDigitalObjects(UUID uuid)List<Locale>getLanguages()protected IdentifiableService<de.digitalcollections.model.identifiable.entity.agent.Person>getService()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)-
Methods inherited from class de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController
addLabelFilter, extractNamespaceAndId, find
-
-
-
-
Constructor Detail
-
PersonController
public PersonController(PersonService personService)
-
-
Method Detail
-
getService
protected IdentifiableService<de.digitalcollections.model.identifiable.entity.agent.Person> getService()
- Specified by:
getServicein classAbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.agent.Person>
-
count
@GetMapping(value={"/v6/persons/count","/v5/persons/count","/v2/persons/count","/latest/persons/count"}, produces="application/json") public long count()
-
delete
@DeleteMapping(value="/v6/persons/{uuid}", produces="application/json") public org.springframework.http.ResponseEntity delete(@PathVariable("uuid") UUID uuid) throws ConflictException- Throws:
ConflictException
-
find
@GetMapping(value="/v6/persons", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person> 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="previewImage",required=false) de.digitalcollections.model.list.filtering.FilterCriterion<UUID> previewImageFilter)
-
findByGeoLocationOfBirth
@GetMapping(value="/v6/persons/placeofbirth/{uuid}", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person> findByGeoLocationOfBirth(@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.list.sorting.Order> sortBy)
-
findByGeoLocationOfDeath
@GetMapping(value="/v6/persons/placeofdeath/{uuid}", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.agent.Person> findByGeoLocationOfDeath(@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.list.sorting.Order> sortBy)
-
getByIdentifier
@GetMapping(value={"/v6/persons/identifier/**","/v5/persons/identifier/**","/v2/persons/identifier/**","/latest/persons/identifier/**"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.agent.Person> getByIdentifier(javax.servlet.http.HttpServletRequest request) throws IdentifiableServiceException, ValidationException- Overrides:
getByIdentifierin classAbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.agent.Person>- Throws:
IdentifiableServiceExceptionValidationException
-
getByIdentifier
@GetMapping(value={"/v6/persons/identifier","/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
-
getByUuid
@GetMapping(value={"/v6/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}}","/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> getByUuid(@PathVariable("uuid") UUID uuid, @RequestParam(name="pLocale",required=false) Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getDigitalObjects
@GetMapping(value={"/v6/persons/{uuid}/digitalobjects","/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={"/v6/persons/languages","/v5/persons/languages","/v3/persons/languages","/latest/persons/languages"}, produces="application/json") public List<Locale> getLanguages()
-
getWorks
@GetMapping(value={"/v6/persons/{uuid}/works","/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={"/v6/persons","/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}","/v6/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
-
-