Class UCSBDatesController

java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.UCSBDatesController

@RequestMapping("/api/ucsbdates") @RestController public class UCSBDatesController extends ApiController
  • Constructor Details

    • UCSBDatesController

      public UCSBDatesController()
  • Method Details

    • allUCSBDates

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<UCSBDate> allUCSBDates()
    • postUCSBDate

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public UCSBDate postUCSBDate(@RequestParam String quarterYYYYQ, @RequestParam String name, @RequestParam("localDateTime") @DateTimeFormat(iso=DATE_TIME) LocalDateTime localDateTime) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getById

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public UCSBDate getById(@RequestParam Long id)
    • deleteUCSBDate

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public UCSBDate updateUCSBDate(@RequestParam Long id, @RequestBody @Valid @Valid UCSBDate incoming)