Interface RentersJSONIfaceMapping

All Superinterfaces:
RentersHttpIface

public interface RentersJSONIfaceMapping extends 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.
  • Method Details

    • createRenter

      @PostExchange(url="/api/renters", contentType="application/json", accept="application/json") org.springframework.http.ResponseEntity<RenterDTO> createRenter(@RequestBody RenterDTO renter)
      Specified by:
      createRenter in interface RentersHttpIface
    • 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:
      getRenters in interface RentersHttpIface
    • getRenter

      @GetExchange(url="/api/renters/{id}", accept="application/json") org.springframework.http.ResponseEntity<RenterDTO> getRenter(@PathVariable("id") String id)
      Specified by:
      getRenter in interface RentersHttpIface
    • hasRenter

      @HttpExchange(method="HEAD", url="/api/renters/{id}") org.springframework.http.ResponseEntity<Void> hasRenter(@PathVariable("id") String id)
      Specified by:
      hasRenter in interface RentersHttpIface
    • 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:
      updateRenter in interface RentersHttpIface
    • removeRenter

      @DeleteExchange("/api/renters/{id}") org.springframework.http.ResponseEntity<Void> removeRenter(@PathVariable("id") String id)
      Specified by:
      removeRenter in interface RentersHttpIface
    • removeAllRenters

      @DeleteExchange("/api/renters") org.springframework.http.ResponseEntity<Void> removeAllRenters()
      Specified by:
      removeAllRenters in interface RentersHttpIface