Class IndividualRidesController

java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.IndividualRidesController

@RequestMapping("/api/individualRides") @RestController public class IndividualRidesController extends ApiController
  • Constructor Details

    • IndividualRidesController

      public IndividualRidesController()
  • Method Details

    • allIndividualRides

      @PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("/all") public Iterable<IndividualRides> allIndividualRides()
    • allIndividualRidesWithDriverId

      @PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("/allWithDriverId") public Iterable<IndividualRides> allIndividualRidesWithDriverId(@RequestParam Long id)
    • allIndividualRidesWithRiderId

      @PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("/allWithRiderId") public Iterable<IndividualRides> allIndividualRidesWithRiderId(@RequestParam Long id)
    • getById

      @PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("") public IndividualRides getById(@RequestParam Long id)
    • deleteRide

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @DeleteMapping("") public Object deleteRide(@RequestParam Long id)
    • updateIndividualRide

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public IndividualRides updateIndividualRide(@RequestParam Long id, @RequestBody @Valid @Valid IndividualRides incoming)
    • postIndividualRide

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public IndividualRides postIndividualRide(@RequestParam Long driverId, @RequestParam Long riderId, @RequestParam String startTimeString, @RequestParam String endTimeString, @RequestParam String pickupLocation, @RequestParam String dropoffLocation)