Klasse OrderUtil

java.lang.Object
de.dlr.proseo.planner.util.OrderUtil

@Component public class OrderUtil extends Object
Handle processing orders
Autor:
Ernst Melchinger
  • Felddetails

    • config

      Planner configuration
    • rtb

      @Autowired org.springframework.boot.web.client.RestTemplateBuilder rtb
      REST template builder
  • Konstruktordetails

    • OrderUtil

      public OrderUtil()
  • Methodendetails

    • cancel

      @Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage cancel(ProcessingOrder orderX)
      Cancel the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • reset

      public PlannerResultMessage reset(ProcessingOrder order)
      Reset the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • delete

      @Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage delete(ProcessingOrder order)
      Delete the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • approve

      @Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage approve(ProcessingOrder order)
      Approve the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • plan

      public PlannerResultMessage plan(long id, ProcessingFacility procFacility, Boolean wait)
      Plan the processing order and it jobs and job steps.
      Parameter:
      procFacility - The processing facility to run the order
      wait - indicates whether to wait for the order planning to complete
      order - The processing order
      Gibt zurück:
      Result message
    • resume

      public PlannerResultMessage resume(ProcessingOrder order, Boolean wait, String user, String pw)
      Resume the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      wait - indicates whether to wait for the order releasing to complete
      user - the username for calling other prosEO services (e. g. AIP Client)
      pw - the password for calling other prosEO services (e. g. AIP Client)
      Gibt zurück:
      Result message
    • startOrder

      @Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage startOrder(ProcessingOrder order)
      Start the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • suspend

      public PlannerResultMessage suspend(long id, Boolean force)
      Suspend the processing order and its jobs and job steps.
      Parameter:
      force - The flag to force kill of currently running job steps on processing facility
      order - The processing order id
      Gibt zurück:
      Result message
    • prepareSuspend

      public PlannerResultMessage prepareSuspend(long id, Boolean force)
      Prepare the suspend of the processing order. All jobs are set to state ON_HOLD first to avoid start of further job steps.
      Parameter:
      force - The flag to force kill of currently running job steps on processing facility
      order - The processing order id
      Gibt zurück:
      Result message
    • retry

      @Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage retry(ProcessingOrder order)
      Retry the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • close

      public PlannerResultMessage close(Long orderId)
      Close the processing order and it jobs and job steps.
      Parameter:
      order - The processing Order
      Gibt zurück:
      Result message
    • checkFinish

      public Boolean checkFinish(Long orderId)
      Check whether the processing order and it jobs and job steps are finished.
      Parameter:
      order - The processing Order
      Gibt zurück:
      true after success
    • checkAutoClose

      @Transactional(isolation=REPEATABLE_READ) public Boolean checkAutoClose(ProcessingOrder order)
      If the order is in systematic processing and the mission has an order retention period, the order is automatically closed after completion and the eviction time is set.
      Parameter:
      order - The processing order
      Gibt zurück:
      true if closed
    • setTimes

      @Transactional(isolation=REPEATABLE_READ) public void setTimes(ProcessingOrder order)
      Set the actual completion time and the estimated completion time if it is null.
      Parameter:
      order - The processing order
    • setStateMessage

      @Transactional(isolation=REPEATABLE_READ) public void setStateMessage(ProcessingOrder order, String stateMessage)
      Set the state message of the order.
      Parameter:
      order - The processing order
    • sendNotification

      @Transactional(isolation=REPEATABLE_READ) public Boolean sendNotification(ProcessingOrder order)
    • getProcessingFacilities

      @Transactional(isolation=REPEATABLE_READ) public List<ProcessingFacility> getProcessingFacilities(long id)
      Get the processing facility(-ies) processing the order At the moment there is normally only one facility to do so.
      Parameter:
      order - The processing order
      Gibt zurück:
      List of processinig facilities
    • setHasFailedJobSteps

      @Transactional(isolation=REPEATABLE_READ) public void setHasFailedJobSteps(ProcessingOrder order, Boolean failed)
      Set the failed job steps flag in the order on failure
      Parameter:
      order - the order to update
      failed - indicates whether a job step has failed
    • logOrderState

      public void logOrderState(ProcessingOrder order)
    • checkNextForRestart

      public void checkNextForRestart()
      Look for next order in state PLANNING, RELEASING and SUSPENDING to restart.
    • restartReleasingOrder

      public void restartReleasingOrder(long id)
      restart the corresponding thread.
    • restartSuspendingOrder

      public void restartSuspendingOrder(long id)
      restart the corresponding thread.