Class HumanSettlementController
java.lang.Object
de.digitalcollections.cudami.server.controller.identifiable.entity.geo.HumanSettlementController
@RestController
@Api(description="The human settlement controller",
name="Human settlement controller")
public class HumanSettlementController
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description HumanSettlementController() -
Method Summary
Modifier and Type Method Description de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement>findAll(org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageable pageable, int pageNumber, int pageSize, java.util.List<de.digitalcollections.model.api.paging.Order> sortBy, java.lang.String language, java.lang.String initial)org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement>get(java.util.UUID uuid, java.util.Locale pLocale)org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement>getByIdentifier(java.lang.String namespace, java.lang.String id)de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlementsave(de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement humanSettlement, org.springframework.validation.BindingResult errors)de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlementupdate(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement humanSettlement, org.springframework.validation.BindingResult errors)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
HumanSettlementController
public HumanSettlementController()
-
-
Method Details
-
findAll
@ApiMethod(description="get all human settlements") @GetMapping(value={"/latest/human_settlements","/v2/human_settlements"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement> findAll(org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageable pageable, @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.api.paging.Order> sortBy, @RequestParam(name="language",required=false,defaultValue="de") java.lang.String language, @RequestParam(name="initial",required=false) java.lang.String initial) -
get
@ApiMethod(description="get a human settlement as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/human_settlements/{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/human_settlements/{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","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement> get(@ApiPathParam(description="UUID of the human settlement, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.UUID uuid, @ApiQueryParam(name="pLocale",description="Desired locale, e.g. <tt>de</tt>. If unset, contents in all languages will be returned") @RequestParam(name="pLocale",required=false) java.util.Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
getByIdentifier
@ApiMethod(description="get a human settlement as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/human_settlements/identifier","/v2/human_settlements/identifier"}, produces={"application/json","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement> getByIdentifier(@RequestParam(name="namespace",required=true) java.lang.String namespace, @RequestParam(name="id",required=true) java.lang.String id) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
save
@ApiMethod(description="save a newly created human settlement") @PostMapping(value={"/latest/human_settlements","/v2/human_settlements"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement save(@RequestBody de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement humanSettlement, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@ApiMethod(description="update a human settlement") @PutMapping(value={"/latest/human_settlements/{uuid}","/v2/human_settlements/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement update(@PathVariable("uuid") java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.geo.HumanSettlement humanSettlement, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-