Interface RentersJSONIfaceMapping
- All Superinterfaces:
RentersHttpIface
This is an implementation of a Spring 6 HTTP Interface, which
provides a client-side definition for HTTP calls versus writing
the RestTemplate/RestClient calls manually.
Since annotations are hard-wired within code, this version of the
interface was written to address JSON requests/responses.
-
Field Summary
Fields inherited from interface info.ejava.assignments.api.houserenters.client.renters.RentersHttpIface
RENTER_PATH, RENTERS_PATH -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<RenterDTO> createRenter(RenterDTO renter) org.springframework.http.ResponseEntity<RenterDTO> org.springframework.http.ResponseEntity<RenterListDTO> getRenters(Integer pageNumber, Integer pageSize) org.springframework.http.ResponseEntity<Void> org.springframework.http.ResponseEntity<Void> org.springframework.http.ResponseEntity<Void> removeRenter(String id) org.springframework.http.ResponseEntity<RenterDTO> updateRenter(String id, RenterDTO renter)
-
Method Details
-
createRenter
@PostExchange(url="/api/renters", contentType="application/json", accept="application/json") org.springframework.http.ResponseEntity<RenterDTO> createRenter(@RequestBody RenterDTO renter) - Specified by:
createRenterin interfaceRentersHttpIface
-
getRenters
@GetExchange(url="/api/renters", accept="application/json") org.springframework.http.ResponseEntity<RenterListDTO> getRenters(@RequestParam(name="pageNumber",required=false) Integer pageNumber, @RequestParam(name="pageSize",required=false) Integer pageSize) - Specified by:
getRentersin interfaceRentersHttpIface
-
getRenter
@GetExchange(url="/api/renters/{id}", accept="application/json") org.springframework.http.ResponseEntity<RenterDTO> getRenter(@PathVariable("id") String id) - Specified by:
getRenterin interfaceRentersHttpIface
-
hasRenter
@HttpExchange(method="HEAD", url="/api/renters/{id}") org.springframework.http.ResponseEntity<Void> hasRenter(@PathVariable("id") String id) - Specified by:
hasRenterin interfaceRentersHttpIface
-
updateRenter
@PutExchange(url="/api/renters/{id}", contentType="application/json", accept="application/json") org.springframework.http.ResponseEntity<RenterDTO> updateRenter(@PathVariable("id") String id, @RequestBody RenterDTO renter) - Specified by:
updateRenterin interfaceRentersHttpIface
-
removeRenter
@DeleteExchange("/api/renters/{id}") org.springframework.http.ResponseEntity<Void> removeRenter(@PathVariable("id") String id) - Specified by:
removeRenterin interfaceRentersHttpIface
-
removeAllRenters
- Specified by:
removeAllRentersin interfaceRentersHttpIface
-