-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDataObjectServiceInterface.php
More file actions
102 lines (90 loc) · 3.71 KB
/
DataObjectServiceInterface.php
File metadata and controls
102 lines (90 loc) · 3.71 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
declare(strict_types=1);
/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PCL
*/
namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Service;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Request\DataObjectParameters;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\DataObject;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\DataObjectAddParameters;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\Type\DataObjectFolder;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\DatabaseException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ElementSavingFailedException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ForbiddenException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidElementTypeException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidFilterServiceTypeException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidFilterTypeException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidQueryTypeException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\UserNotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Response\Collection;
use Pimcore\Model\DataObject as DataObjectModel;
use Pimcore\Model\UserInterface;
/**
* @internal
*/
interface DataObjectServiceInterface
{
/**
* @throws DatabaseException
* @throws ElementSavingFailedException
* @throws ForbiddenException
* @throws InvalidElementTypeException
* @throws NotFoundException
* @throws UserNotFoundException
*/
public function addDataObject(
int $parentId,
DataObjectAddParameters $parameters,
): int;
/**
* @throws ForbiddenException|InvalidFilterServiceTypeException|InvalidQueryTypeException
* @throws InvalidFilterTypeException|NotFoundException|SearchException|UserNotFoundException
*/
public function getDataObjects(DataObjectParameters $parameters): Collection;
/**
* @throws SearchException|NotFoundException|UserNotFoundException
*/
public function getDataObject(int $id, bool $getDetailData = true): DataObject;
/**
* @throws SearchException|NotFoundException
*/
public function getDataObjectForUser(int $id, UserInterface $user): DataObject;
/**
* @throws SearchException|NotFoundException
*/
public function getDataObjectFolder(int $id, bool $checkPermissionsForCurrentUser = true): DataObjectFolder;
/**
* @throws SearchException|NotFoundException
*/
public function getDataObjectFolderForUser(int $id, UserInterface $user): DataObjectFolder;
/**
* @throws ForbiddenException|NotFoundException
*/
public function getDataObjectElement(
UserInterface $user,
int $dataObjectId,
): DataObjectModel;
/**
* @throws ForbiddenException|NotFoundException
*/
public function getDataObjectElementByPath(
UserInterface $user,
string $path,
): DataObjectModel;
/**
* @throws ForbiddenException|InvalidQueryTypeException|NotFoundException|UserNotFoundException
*/
public function setTreeSorting(DataObjectModel $parent, QueryInterface $dataObjectQuery): void;
}