Class JobsController

java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.JobsController

@RequestMapping("/api/jobs") @RestController public class JobsController extends ApiController
  • Constructor Details

    • JobsController

      public JobsController()
  • Method Details

    • allJobs

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all") public Iterable<Job> allJobs()
    • allJobsPaged

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all/pageable") public org.springframework.data.domain.Page<Job> allJobsPaged(@RequestParam int page, @RequestParam int size)
    • launchTestJob

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/testjob") public Job launchTestJob(@RequestParam Boolean fail, @RequestParam Integer sleepMs)
    • launchTestJob

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/milkthecowjob") public Job launchTestJob()
    • updateCowHealth

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/updatecowhealth") public Job updateCowHealth()
    • setCowHealth

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/setcowhealth") public Job setCowHealth(@RequestParam Long commonsID, @RequestParam double health)
    • instructorReport

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/instructorreport") public Job instructorReport()
    • instructorReportSingleCommons

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/instructorreportsinglecommons") public Job instructorReportSingleCommons(@RequestParam Long commonsId)