/**
  * {@inheritdoc}
  */
 public function delete($id)
 {
     /** @var $link \Magento\Downloadable\Model\Link */
     $link = $this->linkFactory->create()->load($id);
     if (!$link->getId()) {
         throw new NoSuchEntityException(__('There is no downloadable link with provided ID.'));
     }
     try {
         $this->resourceModel->delete($link);
     } catch (\Exception $exception) {
         throw new StateException(__('Cannot delete link with id %1', $link->getId()), $exception);
     }
     return true;
 }