-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathActionEntityRepositoryInterface.php
59 lines (53 loc) · 1.69 KB
/
ActionEntityRepositoryInterface.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
<?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\ActionEntityInterface;
use Opengento\Gdpr\Api\Data\ActionEntitySearchResultsInterface;
/**
* @api
*/
interface ActionEntityRepositoryInterface
{
/**
* Save action entity
*
* @param ActionEntityInterface $actionEntity
* @return ActionEntityInterface
* @throws CouldNotSaveException
*/
public function save(ActionEntityInterface $actionEntity): ActionEntityInterface;
/**
* Retrieve action entity by ID
*
* @param int $actionId
* @return ActionEntityInterface
* @throws NoSuchEntityException
*/
public function getById(int $actionId): ActionEntityInterface;
/**
* Retrieve action entity list by search filter criteria
*
* @param SearchCriteriaInterface $searchCriteria
* @return ActionEntitySearchResultsInterface
* @throws LocalizedException
*/
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultsInterface;
/**
* Delete action entity
*
* @param ActionEntityInterface $actionEntity
* @return bool true on success
* @throws CouldNotDeleteException
*/
public function delete(ActionEntityInterface $actionEntity): bool;
}