Class TaskController

java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.common.tasks.TaskController

@Validated @MeasuredRestController public class TaskController extends org.openwms.core.http.AbstractWebController
A TaskController.
Author:
Heiko Scherrer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final TaskService
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
     
    org.springframework.http.ResponseEntity<TaskVO>
    create(TaskVO task, javax.servlet.http.HttpServletRequest req)
     
    org.springframework.http.ResponseEntity<List<TaskVO>>
     
    org.springframework.http.ResponseEntity<TaskVO>
     
    org.springframework.http.ResponseEntity<TaskVO>
    finish(String pKey)
     
    org.springframework.http.ResponseEntity<org.openwms.core.http.Index>
     
    org.springframework.http.ResponseEntity<TaskVO>
    pause(String pKey)
     
    org.springframework.http.ResponseEntity<TaskVO>
    resume(String pKey)
     
    org.springframework.http.ResponseEntity<TaskVO>
    start(String pKey)
     
    org.springframework.http.ResponseEntity<TaskVO>
    update(TaskVO task)
     

    Methods inherited from class org.openwms.core.http.AbstractWebController

    buildNOKResponse, buildNOKResponseWithKey, buildOKResponse, buildResponse, buildResponse, getLocationForCreatedResource, getLocationURIForCreatedResource, handleBehaviorAwareException, handleBusinessRuntimeException, handleConstraintViolationException, handleException, handleHttpBusinessException, handleRemovalNotAllowedException, handleTechnicalRuntimeException, handleValidationException, illegalArgumentException, translate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • TaskController

      public TaskController(TaskService taskService)
  • Method Details

    • findAll

      @GetMapping(value="/tasks", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<List<TaskVO>> findAll()
    • findByPKey

      @GetMapping(value="/tasks/{pKey}", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> findByPKey(@PathVariable("pKey") String pKey)
    • create

      @PostMapping(value="/tasks", consumes="application/vnd.openwms.common.task-v1+json", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> create(@RequestBody TaskVO task, javax.servlet.http.HttpServletRequest req)
    • addLinks

      private void addLinks(TaskVO vo)
    • update

      @PutMapping(value="/tasks", consumes="application/vnd.openwms.common.task-v1+json", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> update(@RequestBody TaskVO task)
    • start

      @PostMapping(value="/tasks/{pKey}/start", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> start(@PathVariable("pKey") String pKey)
    • pause

      @PostMapping(value="/tasks/{pKey}/pause", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> pause(@PathVariable("pKey") String pKey)
    • resume

      @PostMapping(value="/tasks/{pKey}/resume", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> resume(@PathVariable("pKey") String pKey)
    • finish

      @PostMapping(value="/tasks/{pKey}/finish", produces="application/vnd.openwms.common.task-v1+json") public org.springframework.http.ResponseEntity<TaskVO> finish(@PathVariable("pKey") String pKey)
    • index

      @GetMapping("/tasks/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()