Class OrderControllerImpl

java.lang.Object
de.dlr.proseo.planner.rest.OrderControllerImpl
All Implemented Interfaces:
OrderController

@Component public class OrderControllerImpl extends Object implements OrderController
Spring MVC controller for the prosEO planner; implements the services required to plan and handle processing orders.
Author:
Ernst Melchinger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The production planner security configuration
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<RestOrder>
    approveOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Deprecated.
    org.springframework.http.ResponseEntity<RestOrder>
    cancelOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Cancel processing order by ID.
    org.springframework.http.ResponseEntity<RestOrder>
    closeOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Close processing order by ID.
    org.springframework.http.ResponseEntity<RestOrder>
    deleteOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Delete processing order by ID.
    org.springframework.http.ResponseEntity<RestOrder>
    getOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Deprecated.
    org.springframework.http.ResponseEntity<List<RestOrder>>
    getOrders(org.springframework.http.HttpHeaders httpHeaders)
    Deprecated.
    org.springframework.http.ResponseEntity<RestOrder>
    planOrder(String releaseId, String facility, Boolean wait, org.springframework.http.HttpHeaders httpHeaders)
    Plan processing order of id on processing facility
    org.springframework.http.ResponseEntity<RestOrder>
    releaseOrder(String orderId, Boolean wait, org.springframework.http.HttpHeaders httpHeaders)
    Release processing order of id (at the moment the same functionality as resumeOrder)
    org.springframework.http.ResponseEntity<RestOrder>
    resetOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Reset processing order by ID.
    org.springframework.http.ResponseEntity<RestOrder>
    resumeOrder(String orderId, Boolean wait, org.springframework.http.HttpHeaders httpHeaders)
    Resume processing order (currently an alias for releaseOrder).
    org.springframework.http.ResponseEntity<RestOrder>
    retryOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
    Retry processing order by ID.
    org.springframework.http.ResponseEntity<RestOrder>
    suspendOrder(String orderId, Boolean force, org.springframework.http.HttpHeaders httpHeaders)
    Suspend processing order by ID.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • OrderControllerImpl

      public OrderControllerImpl()
  • Method Details

    • getOrders

      @Deprecated public org.springframework.http.ResponseEntity<List<RestOrder>> getOrders(org.springframework.http.HttpHeaders httpHeaders)
      Deprecated.
      Get all processing orders (deprecated).
      Specified by:
      getOrders in interface OrderController
      Parameters:
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a list of RestOrder and HTTP status
    • getOrder

      @Deprecated public org.springframework.http.ResponseEntity<RestOrder> getOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Deprecated.
      Get processing order by ID (deprecated).
      Specified by:
      getOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • approveOrder

      @Deprecated public org.springframework.http.ResponseEntity<RestOrder> approveOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Deprecated.
      Approve processing order by ID (deprecated).
      Specified by:
      approveOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • resetOrder

      public org.springframework.http.ResponseEntity<RestOrder> resetOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Reset processing order by ID.
      Specified by:
      resetOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • deleteOrder

      public org.springframework.http.ResponseEntity<RestOrder> deleteOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Delete processing order by ID.
      Specified by:
      deleteOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • planOrder

      public org.springframework.http.ResponseEntity<RestOrder> planOrder(String releaseId, String facility, Boolean wait, org.springframework.http.HttpHeaders httpHeaders)
      Plan processing order of id on processing facility
      Specified by:
      planOrder in interface OrderController
      Parameters:
      releaseId - the processing order database ID
      facility - the processing facility name
      wait - indicates whether to wait for the order planning to complete
      httpHeaders - the HTTP request headers (injected)
      Returns:
      HTTP status "CREATED" and the updated REST order, if the planning succeeded, or HTTP status "NOT MODIFIED", an error message and the original REST order, if a warning was issued, or HTTP status "NOT FOUND" and an error message, if either the order or the facility cannot be found, or HTTP status "BAD REQUEST" and an error message, if the planning failed for some reason, or HTTP status "INTERNAL SERVER ERROR" and an error message, if any unforeseen error occurred
    • releaseOrder

      public org.springframework.http.ResponseEntity<RestOrder> releaseOrder(String orderId, Boolean wait, org.springframework.http.HttpHeaders httpHeaders)
      Release processing order of id (at the moment the same functionality as resumeOrder)
      Specified by:
      releaseOrder in interface OrderController
      Parameters:
      orderId - the processing order database ID
      wait - indicates whether to wait for the order releasing to complete
      httpHeaders - the HTTP request headers (injected)
      Returns:
      HTTP status "OK" and the updated REST order, if the releasing succeeded, or HTTP status "NOT FOUND" and an error message, if the order cannot be found, or HTTP status "BAD REQUEST" and an error message, if the releasing failed for some reason, or HTTP status "INTERNAL SERVER ERROR" and an error message, if any unforeseen error occurred
    • resumeOrder

      public org.springframework.http.ResponseEntity<RestOrder> resumeOrder(String orderId, Boolean wait, org.springframework.http.HttpHeaders httpHeaders)
      Resume processing order (currently an alias for releaseOrder).
      Specified by:
      resumeOrder in interface OrderController
      Parameters:
      orderId - the processing order database ID
      wait - indicates whether to wait for the order releasing to complete
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • cancelOrder

      public org.springframework.http.ResponseEntity<RestOrder> cancelOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Cancel processing order by ID.
      Specified by:
      cancelOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • closeOrder

      public org.springframework.http.ResponseEntity<RestOrder> closeOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Close processing order by ID.
      Specified by:
      closeOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • suspendOrder

      public org.springframework.http.ResponseEntity<RestOrder> suspendOrder(String orderId, Boolean force, org.springframework.http.HttpHeaders httpHeaders)
      Suspend processing order by ID.
      Specified by:
      suspendOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      force - indicates whether to force suspend the order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status
    • retryOrder

      public org.springframework.http.ResponseEntity<RestOrder> retryOrder(String orderId, org.springframework.http.HttpHeaders httpHeaders)
      Retry processing order by ID.
      Specified by:
      retryOrder in interface OrderController
      Parameters:
      orderId - the ID of the processing order
      httpHeaders - the HTTP request headers (injected)
      Returns:
      ResponseEntity containing a RestOrder and HTTP status