Class ClientController

java.lang.Object
xyz.nardone.agenda_fps.servizio.controllers.ClientController

@Controller @RequestMapping(path="/clients") public class ClientController extends Object
Endpoints for creating, updating, and listing clients.
  • Constructor Details

    • ClientController

      public ClientController()
  • Method Details

    • getAllClients

      @GetMapping(path="/all") @ResponseBody public Iterable<Client> getAllClients()
      Returns all clients.
    • getClient

      @PostMapping(path="/get") @ResponseBody public Client getClient(@RequestParam Integer clientId)
      Returns a client by ID.
    • addClient

      @PutMapping(path="/add") @ResponseBody public Response addClient(@RequestBody ClientIds client)
      Creates a new client linked to a banker.
    • updateClient

      @PutMapping(path="/update") @ResponseBody public Response updateClient(@RequestBody Client client)
      Updates client details and banker relationship.
    • deleteClientById

      @DeleteMapping(path="/delete") @ResponseBody public Response deleteClientById(@RequestParam Integer clienteId)
      Deletes a client and its callbacks.
    • deleteAllClients

      @DeleteMapping(path="/delete_all") @ResponseBody public Response deleteAllClients()
      Deletes all clients and their callbacks.
    • getClientsByBankerId

      @PostMapping(path="banker_clients") @ResponseBody public Iterable<Client> getClientsByBankerId(@RequestParam(required=false) Integer id_banker)
      Returns clients for a specific banker.