set task report using  task persistence

@deprecated since version 7.10.0, to be removed in 8.0.

@param $taskId
@param $report
@return self
171841
public function updateTaskReport($taskId, $report)
    {
        if ($this->getPersistence()->has($taskId)) {
            $this->getPersistence()->setReport($taskId, $report);
        }
        return $this;
    }
570798
@Override
  public void recordTaskOwnerChange(String taskId, String owner) {
    if (isHistoryLevelAtLeast(HistoryLevel.AUDIT)) {
      HistoricTaskInstanceEntity historicTaskInstance = getHistoricTaskInstanceEntityManager().findById(taskId);
      if (historicTaskInstance != null) {
        historicTaskInstance.setOwner(owner);
      }
    }
  }
254630
public function onFinish(Server $server, int $taskId, $data): void
    {
        $this->log("task finished on the task worker. status: $data", [
            'taskId'   => $taskId,
            'workerId' => $server->worker_id,
        ], 'debug');
    }
773558
public synchronized void setFinished(final int taskId) {
    final TaskEntity task = getTask(taskId, runningTasks);
    runningTasks.remove(task);
    finishedTasks.add(task);
  }
105860
public function remove($taskId)
    {
        $idList = $this->getIds();

        if (in_array($taskId, $idList)) {
            $this->getConfig()->remove($taskId);
            unlink($this->taskIdToFileName($taskId));
        }

        return $this;
    }
383088
public function deleteTaskById( $TaskId){
        $rest = $this->getService( self::API_FS_TASK . $TaskId);
        $rest->DELETE();

        return $rest->getSuccess();
    }
1268023
public function stop($taskId) {
		if ($this->TaskClient->stop($taskId)) {
			$this->Session->setFlash("Task $taskId will be stopped shortly", 'alert/simple', array(
				'class' => 'alert-success', 'title' => 'Ok!'
			));
		} else {
			$this->Session->setFlash("Can't stop task $taskId!", 'alert/simple', array(
				'class' => 'alert-error', 'title' => 'Error!'
			));
		}
		$this->redirect($this->referer());
	}
909422
public function create($projectId,$taskId,array $params = array())
    {
        $defaults = array(
            'text'      => null,
            'user_id'     => null,
            'user_email'  => null
        );
        $params = array_filter(array_merge($defaults, $params));
        
        $data = array('comment'=>$params);

        $path = '/projects/'.urlencode($projectId).'/tasks/'.urlencode($taskId).'/comments.json';
        return $this->post($path,$data);
    }
487335
public function update(Task $task)
    {
        $this->om->persist($task);
        $this->om->flush();

        $this->notify(NotifierInterface::MESSAGE_UPDATE);

        return $task;
    }
1364929
public function regenerateTask($id)
    {
        $taskEntity = $this->taskRepo->find($id);
        if (!($taskEntity instanceof Task)) {
            throw new TaskQueueServiceException("No such task :" . $id, 1);
        }
        if ($taskEntity->getStatus() != Task::STATUS_FAILED) {
            throw new TaskQueueServiceException(
                "Invalid status for task. Current status: '" .
                $taskEntity->getStatus() .
                "' must be 'failed' to be able to restart it",
                1
            );
        }
        $data = $taskEntity->getData();
        $taskEntity->setStatus(Task::STATUS_RESTARTED);
        $this->entityManager->flush();
        $parts = explode("::", $data, 2);
        $taskObject = $this->serializer->deserialize($parts[1], $parts[0], 'json');
        $taskObject->setTaskIdentifier($taskEntity->getId());
        $data = get_class($taskObject) . '::' . $this->serializer->serialize($taskObject, 'json');
        $this->beanstalk
            ->useTube($taskEntity->getTube())
            ->put($data);
        return true;
    }
824524
public function setTask(Task $task = null)
    {
        $this->task = $task;
        if (null !== $task) {
            $task->addComment($this);
        }

        return $this;
    }
984814
public function write($taskId, array $attributes)
    {
        if (!isset($this->tasks[$taskId])) {
            return false;
        }

        /** @var OrmObject $task */
        $task = $this->tasks[$taskId];
        $written = false;

        foreach ($attributes as $key=>$value) {
            $task->__set($key, $value);
            $written = true;
        }

        return $written;
    }
51462
public function delete(string $taskId = null)
    {
        $this->getGoogleTasks($this->taskId)->deleteTask($taskId ?? $this->id);
    }
147727
public function update(Task $task): Task
    {
        $id = $task->getId();

        $task->setId(null);

        $response = $this->client->put($this->prepareUrlForKey('update-task', ['id' => $id]), [], $task->jsonSerialize());
        $responseData = $response->getDecodedBody();

        return new Task($responseData);
    }
1055918
public function delete($taskId)
    {
        if (!isset($this->tasks[$taskId])) {
            return false;
        }
        unset($this->tasks[$taskId]);
        return true;
    }
230407
public function create(Report &$report)
    {
        $data = $report->exportData();
        $endpoint = '/admin/reports.json';
        $response = $this->request(
            $endpoint, 'POST', array(
            'report' => $data
            )
        );
        $report->setData($response['report']);
    }
40133
public function save() {
    if ($this->id) {
      return self::update($this->id, $this);
    }
    else {
      $new = self::create($this);
      $this->task_id = $new->task_id;
      return $this;
    }
  }