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()
    • launchTestJob

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/milkthecowjobsinglecommons") public Job launchTestJob(@RequestParam Long commonsId)
    • updateCowHealth

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/updatecowhealthsinglecommons") public Job updateCowHealth(@RequestParam Long commonsId)
    • 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)
    • recordCommonStats

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/recordcommonstats") public Job recordCommonStats()