Class JobsController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.JobsController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallJobs()
org.springframework.data.domain.Page<Job>
allJobsPaged
(int page, int size) instructorReportSingleCommons
(Long commonsId) launchTestJob
(Boolean fail, Integer sleepMs) launchTestJob
(Long commonsId) setCowHealth
(Long commonsID, double health) updateCowHealth
(Long commonsId) Methods inherited from class edu.ucsb.cs156.happiercows.controllers.ApiController
genericMessage, getCurrentUser, handleBadRequest, handleGenericException
-
Constructor Details
-
JobsController
public JobsController()
-
-
Method Details
-
allJobs
-
allJobsPaged
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all/pageable") public org.springframework.data.domain.Page<Job> allJobsPaged(@RequestParam int page, @RequestParam int size) -
launchTestJob
-
launchTestJob
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/milkthecowjob") public Job launchTestJob() -
launchTestJob
-
updateCowHealth
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/updatecowhealth") public Job updateCowHealth() -
updateCowHealth
-
setCowHealth
-
instructorReport
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/instructorreport") public Job instructorReport() -
instructorReportSingleCommons
-
recordCommonStats
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/recordcommonstats") public Job recordCommonStats()
-