-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathEraseEntityRepositoryInterface.php
69 lines (62 loc) · 2 KB
/
EraseEntityRepositoryInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Copyright © OpenGento, All rights reserved.
* See LICENSE bundled with this library for license details.
*/
declare(strict_types=1);
namespace Opengento\Gdpr\Api;
use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Api\SearchResultsInterface;
use Magento\Framework\Exception\CouldNotDeleteException;
use Magento\Framework\Exception\CouldNotSaveException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Opengento\Gdpr\Api\Data\EraseEntityInterface;
use Opengento\Gdpr\Api\Data\EraseEntitySearchResultsInterface;
/**
* @api
*/
interface EraseEntityRepositoryInterface
{
/**
* Save erase entity scheduler
*
* @param EraseEntityInterface $eraseEntity
* @return EraseEntityInterface
* @throws CouldNotSaveException
*/
public function save(EraseEntityInterface $eraseEntity): EraseEntityInterface;
/**
* Retrieve erase entity scheduler by ID
*
* @param int $eraseId
* @return EraseEntityInterface
* @throws NoSuchEntityException
*/
public function getById(int $eraseId): EraseEntityInterface;
/**
* Retrieve erase entity scheduler by entity
*
* @param int $entityId
* @param string $entityType
* @return EraseEntityInterface
* @throws NoSuchEntityException
*/
public function getByEntity(int $entityId, string $entityType): EraseEntityInterface;
/**
* Retrieve erase entity schedulers list by search filter criteria
*
* @param SearchCriteriaInterface $searchCriteria
* @return EraseEntitySearchResultsInterface
* @throws LocalizedException
*/
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultsInterface;
/**
* Delete erase entity scheduler
*
* @param EraseEntityInterface $eraseEntity
* @return bool true on success
* @throws CouldNotDeleteException
*/
public function delete(EraseEntityInterface $eraseEntity): bool;
}