*/ interface DeliveryExecutionStateService extends StateServiceInterface { /** * Sets a delivery execution in the awaiting state * * @param DeliveryExecution $deliveryExecution * @return bool */ public function waitExecution(DeliveryExecution $deliveryExecution); /** * Sets a delivery execution in the inprogress state * * @param DeliveryExecution $deliveryExecution * @return bool */ public function resumeExecution(DeliveryExecution $deliveryExecution); /** * Authorises a delivery execution * * @param DeliveryExecution $deliveryExecution * @param array $reason * @param string $testCenter test center uri * @return bool */ public function authoriseExecution(DeliveryExecution $deliveryExecution, $reason = null, $testCenter = null); /** * Pauses a delivery execution * * @param DeliveryExecution $deliveryExecution * @param array $reason * @return bool * @throws \Exception */ public function pauseExecution(DeliveryExecution $deliveryExecution, $reason = null); /** * Cancel a delivery execution * * @param DeliveryExecution $deliveryExecution * @param array $reason * @return bool */ public function cancelExecution(DeliveryExecution $deliveryExecution, $reason = null); /** * Whether delivery execution can be canceled or not * * @param DeliveryExecution $deliveryExecution * @return bool */ public function isCancelable(DeliveryExecution $deliveryExecution); /** * Report irregularity to a delivery execution * * @todo remove this method to separate service * @param DeliveryExecution $deliveryExecution * @param array $reason * @return bool */ public function reportExecution(DeliveryExecution $deliveryExecution, $reason); }