Class DriverAvailabilityController

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

@RequestMapping("/api/driverAvailability") @RestController public class DriverAvailabilityController extends ApiController
  • Constructor Details

    • DriverAvailabilityController

      public DriverAvailabilityController()
  • Method Details

    • postDriverAvailability

      @PreAuthorize("hasAnyRole(\'ADMIN\', \'DRIVER\')") @PostMapping("/new") public DriverAvailability postDriverAvailability(@RequestParam String day, @RequestParam String startTime, @RequestParam String endTime, @RequestParam String notes)
    • deletemenuitem

      @PreAuthorize("hasAnyRole(\'ADMIN\', \'DRIVER\')") @DeleteMapping("") public Object deletemenuitem(@RequestParam Long id)
    • updatemenuitem

      @PreAuthorize("hasAnyRole(\'ADMIN\', \'DRIVER\')") @PutMapping("") public DriverAvailability updatemenuitem(@RequestParam Long id, @RequestBody @Valid @Valid DriverAvailability incoming)
    • allmenuitems

      @PreAuthorize("hasAnyRole(\'ADMIN\', \'DRIVER\')") @GetMapping("/all") public Iterable<DriverAvailability> allmenuitems()
    • getById

      @PreAuthorize("hasAnyRole(\'ADMIN\', \'DRIVER\')") @GetMapping("") public DriverAvailability getById(@RequestParam Long id)
    • allDriverAvailabilities

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin/all") public org.springframework.http.ResponseEntity<String> allDriverAvailabilities() throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • driverAvailabilityByID

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin") public DriverAvailability driverAvailabilityByID(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException