WSInputOutputDeleteProcessClass.php 1.67 KB
<?php

/**
 * @class WSInputOutputDeleteProcessClass
 * @brief Class that's implement an InputOutputInterface used to treat a delete process request
 * @details
 */
class WSInputOutputDeleteProcessClass extends IHMInputOutputDeleteProcessClass implements InputOutputInterface
{
	protected $jobsManager       = null;
	// private $paramsData        = null;

	/*
	 * @brief Constructor
	*/
	function __construct()
	{
		$this->jobsManager      = new WSJobsManagerClass();
	}

	/*
	 * @brief translate input data from WS client to AMDA_Integration module for a delete process request
	*/
// 	public function getInputData($input,$function,$requestId="")
// 	{
// 		if (isset($this->paramsData))
// 			unset($this->paramsData);
// 
// 		$this->paramsData = new ProcessRequestDataClass();
// 
// 		$this->paramsData->setManagerFilePath(IHMConfigClass::getProcessManagerFilePath());
// 		$this->paramsData->setType(ProcessTypeEnumClass::DELETE);
// 
// 		$this->paramsData->setId($input->id);
// 
// 		return $this->paramsData;
// 	}

	/*
	 * @brief translate output data from AMDA_Integration module to IHM client for a delete process request
	*/
// 	public function getOutput($data)
// 	{
// 		if (!$data->getSuccess())
// 		{
// 			return array(
// 					'success' => false,
// 					'message' => $data->getLastErrorMessage());
// 		}
// 
// 		$res = $this->jobsManager->deleteJob($this->paramsData->getId());
// 
// 		/*if (!$res['success'])
// 		{
// 			return array(
// 					'success' => false,
// 					'message' => $res['message']);
// 		}*/
// 
// 		return array(
// 				'success' => true,
// 				'id'      => $this->paramsData->getId());
// 	}
}

?>