Klasse GUIOrderController

java.lang.Object
de.dlr.proseo.ui.gui.GUIBaseController
de.dlr.proseo.ui.gui.GUIOrderController

@Controller public class GUIOrderController extends GUIBaseController
A controller for retrieving and handling order data
Autor:
David Mazo
  • Konstruktordetails

    • GUIOrderController

      public GUIOrderController()
  • Methodendetails

    • showOrder

      @GetMapping("/order-show") public String showOrder()
      Show the order view
      Gibt zurück:
      the name of the order view template
    • editOrder

      @GetMapping("/order-edit") public String editOrder()
      Show the order edit view
      Gibt zurück:
      the name of the order edit view template
    • order

      @GetMapping("/order") public String order()
      Show the order view
      Gibt zurück:
      the name of the order view template
    • getIdentifier

      @RequestMapping("/order-show/get") public org.springframework.web.context.request.async.DeferredResult<String> getIdentifier(@RequestParam(required=false,value="identifier") String identifier, @RequestParam(required=false,value="states") String states, @RequestParam(required=false,value="from") String from, @RequestParam(required=false,value="to") String to, @RequestParam(required=false,value="products") String products, @RequestParam(required=false,value="recordFrom") Long recordFrom, @RequestParam(required=false,value="recordTo") Long recordTo, @RequestParam(required=false,value="sortby") String sortby, @RequestParam(required=false,value="up") Boolean up, org.springframework.ui.Model model)
      Retrieve the order list filtered by the specified parameters.
      Parameter:
      identifier - The order identifier (name) as a pattern.
      states - The order states (separated by ':').
      from - The start date of the time period.
      to - The end date of the time period.
      products - The product class list (separated by ':').
      recordFrom - the first record to retrieve
      recordTo - the last record to retrieve
      sortby - The sort column.
      up - The sort direction (true for 'up').
      model - The model to hold the data.
      Gibt zurück:
      The deferred result containing the result.
    • setState

      @RequestMapping("/order-state/post") public org.springframework.web.context.request.async.DeferredResult<String> setState(@RequestParam(required=true,value="id") String id, @RequestParam(required=true,value="state") String state, @RequestParam(required=false,value="facility") String facility, org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse httpResponse)
      Set the new state of an order.
      Parameter:
      id - The order id.
      state - The new state.
      facility - The facility (for plan).
      model - The model to hold the data.
      httpResponse - The HTTP response object.
      Gibt zurück:
      The deferred result containing the result.
    • setJobState

      @RequestMapping("/job-state/post") public org.springframework.web.context.request.async.DeferredResult<String> setJobState(@RequestParam(required=true,value="id") String id, @RequestParam(required=true,value="state") String state, org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse httpResponse)
      Set the new state of a job
      Parameter:
      id - The job id
      state - The new state
      model - The model to hold the data
      httpResponse - The HTTP Servlet Response
      Gibt zurück:
      The deferred result containing the result
    • setJobStepState

      @RequestMapping("/jobstep-state/post") public org.springframework.web.context.request.async.DeferredResult<String> setJobStepState(@RequestParam(required=true,value="id") String id, @RequestParam(required=true,value="state") String state, org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse httpResponse)
      Set the new state of a job step
      Parameter:
      id - The job step id
      state - The new state
      model - The model to hold the data
      httpResponse - The HTTP Servlet Response
      Gibt zurück:
      The deferred result containing the result
    • getId

      @RequestMapping("/order/get") public org.springframework.web.context.request.async.DeferredResult<String> getId(@RequestParam(required=true,value="id") String id, org.springframework.ui.Model model)
      Retrieve a single order
      Parameter:
      id - The order id.
      model - The model to hold the data
      Gibt zurück:
      The deferred result containing the result
    • getIdForEdit

      @RequestMapping("/order-edit/get") public org.springframework.web.context.request.async.DeferredResult<String> getIdForEdit(@RequestParam(required=true,value="id") String id, org.springframework.ui.Model model)
      Retrieve a single order
      Parameter:
      id - The order id.
      model - The model to hold the data
      Gibt zurück:
      The deferred result containing the result
    • submitOrder

      @RequestMapping(value="/order-submit", method=POST, consumes="application/json", produces="application/json") @ResponseBody public org.springframework.http.ResponseEntity<OrderInfo> submitOrder(@RequestBody de.dlr.proseo.model.rest.model.RestOrder updateOrder)
      Submit a single order
      Parameter:
      updateOrder - the updated order
      Gibt zurück:
      The result
    • getJobsOfOrder

      @RequestMapping("/jobs/get") public org.springframework.web.context.request.async.DeferredResult<String> getJobsOfOrder(@RequestParam(required=true,value="orderid") String id, @RequestParam(required=false,value="recordFrom") Long recordFrom, @RequestParam(required=false,value="recordTo") Long recordTo, @RequestParam(required=false,value="job") String jobId, @RequestParam(required=false,value="jobStep") String jobStepId, @RequestParam(required=false,value="jobstates") String states, @RequestParam(required=false,value="calcPage") Boolean calcP, org.springframework.ui.Model model)
      Retrieve the jobs of an order filtered by following criteria. If recordFrom is not set the job or job step are used to calculate it.
      Parameter:
      id - the order id
      recordFrom - the first record to retrieve
      recordTo - the last record to retrieve
      jobId - the job id
      jobStepId - the job step id
      states - the job states
      calcP - whether to calculate the page
      model - the attributes to return
      Gibt zurück:
      the result
    • getGraphOfJob

      @RequestMapping("/jobs/graph") public org.springframework.web.context.request.async.DeferredResult<String> getGraphOfJob(@RequestParam(required=true,value="jobid") String jobId, org.springframework.ui.Model model)
      Return the job graph
      Parameter:
      jobId - the job id
      model - the model
      Gibt zurück:
      the job graph
    • hasorbits

      @GetMapping("/hasorbits") public org.springframework.http.ResponseEntity<?> hasorbits(@RequestParam(required=true,value="spacecraft") String spacecraft, @RequestParam(required=true,value="from") Long from, @RequestParam(required=true,value="to") Long to)
      Return whether a spacecraft has orbits between the numbers denoted by from and to
      Parameter:
      spacecraft - the spacecraft
      from - the first permitted orbit number
      to - the last permitted orbit number
      Gibt zurück:
      true if the spacecraft has orbits between the specified parameters
    • hasOrder

      @GetMapping("/hasorder") public org.springframework.http.ResponseEntity<?> hasOrder(@RequestParam(required=true,value="identifier") String identifier, @RequestParam(required=true,value="nid") String id)
      Checks if there is an order with the specified identifier and id.
      Parameter:
      identifier - The order identifier
      id - The id
      Gibt zurück:
      ResponseEntity containing a boolean value indicating if the order exists, with HTTP status OK
    • jobStepLog

      @GetMapping("/jobsteplog.txt") public org.springframework.http.ResponseEntity<String> jobStepLog(@RequestParam(required=true,value="id") String id)
      Retrieves the job step log for the specified id.
      Parameter:
      id - The id of the job step
      Gibt zurück:
      ResponseEntity containing the job step log as a String, with appropriate HTTP headers and status OK
    • countOrders

      public Long countOrders(String orderName, String nid)
      Count the number of orders
      Parameter:
      orderName - the order name
      nid - excluded id
      Gibt zurück:
      The number of orbits
    • countOrdersL

      public Long countOrdersL(String identifier, String states, String products, String from, String to, Long recordFrom, Long recordTo, String sortCol, Boolean up)
      Count the orders specified by following parameters
      Parameter:
      identifier - Identifier pattern
      states - The states (divided by ':')
      products - The product classes (divided by ':')
      from - The earliest start time
      to - The latest start time
      recordFrom - the first record to retrieve
      recordTo - the last record to retrieve
      sortCol - The sort criteria
      up - Ascending if true, otherwise descending
      Gibt zurück:
      The number of orders found