Class PersonalSchedulesController

java.lang.Object
edu.ucsb.cs156.courses.controllers.ApiController
edu.ucsb.cs156.courses.controllers.PersonalSchedulesController

@RequestMapping("/api/personalschedules") @RestController public class PersonalSchedulesController extends ApiController
  • Constructor Details

    • PersonalSchedulesController

      public PersonalSchedulesController()
  • Method Details

    • allUsersSchedules

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin/all") public Iterable<PersonalSchedule> allUsersSchedules()
    • thisUsersSchedules

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<PersonalSchedule> thisUsersSchedules()
    • getScheduleById

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public PersonalSchedule getScheduleById(@RequestParam Long id)
    • getScheduleById_admin

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin") public PersonalSchedule getScheduleById_admin(@RequestParam Long id)
    • postSchedule

      @PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/post") public PersonalSchedule postSchedule(@RequestParam String name, Optional<String> description, @RequestParam String quarter)
    • deleteSchedule

      @PreAuthorize("hasRole(\'ROLE_USER\')") @DeleteMapping("") public Object deleteSchedule(@RequestParam Long id)
    • deleteSchedule_Admin

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @DeleteMapping("/admin") public Object deleteSchedule_Admin(@RequestParam Long id)
    • putScheduleById

      @PreAuthorize("hasRole(\'ROLE_USER\')") @PutMapping("") public PersonalSchedule putScheduleById(@RequestParam Long id, @RequestBody @Valid @Valid PersonalSchedule incomingSchedule)
    • putScheduleById_admin

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("/admin") public PersonalSchedule putScheduleById_admin(@RequestParam Long id, @RequestBody @Valid @Valid PersonalSchedule incomingSchedule)