1
|
|
|
<?php |
2
|
|
|
namespace Dkd\PhpCmis\Bindings\Browser; |
3
|
|
|
|
4
|
|
|
/** |
5
|
|
|
* This file is part of php-cmis-lib. |
6
|
|
|
* |
7
|
|
|
* (c) Sascha Egerer <[email protected]> |
8
|
|
|
* |
9
|
|
|
* For the full copyright and license information, please view the LICENSE |
10
|
|
|
* file that was distributed with this source code. |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
use Dkd\PhpCmis\Data\AclInterface; |
14
|
|
|
use Dkd\PhpCmis\AclServiceInterface; |
15
|
|
|
use Dkd\PhpCmis\Data\ExtensionDataInterface; |
16
|
|
|
use Dkd\PhpCmis\Enum\AclPropagation; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Acl Service Browser Binding client. |
20
|
|
|
*/ |
21
|
|
|
class AclService extends AbstractBrowserBindingService implements AclServiceInterface |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* Adds or removes the given ACEs to or from the ACL of the object. |
25
|
|
|
* |
26
|
|
|
* @param string $repositoryId The identifier for the repository. |
27
|
|
|
* @param string $objectId The identifier of the object. |
28
|
|
|
* @param AclInterface|null $addAces The ACEs to be added. |
29
|
|
|
* @param AclInterface|null $removeAces The ACEs to be removed. |
30
|
|
|
* @param AclPropagation|null $aclPropagation Specifies how ACEs should be handled. |
31
|
|
|
* @param ExtensionDataInterface|null $extension |
32
|
|
|
* @return AclInterface the ACL of the object |
33
|
|
|
*/ |
34
|
|
|
public function applyAcl( |
35
|
|
|
$repositoryId, |
36
|
|
|
$objectId, |
37
|
|
|
AclInterface $addAces = null, |
38
|
|
|
AclInterface $removeAces = null, |
39
|
|
|
AclPropagation $aclPropagation = null, |
40
|
|
|
ExtensionDataInterface $extension = null |
41
|
|
|
) { |
42
|
|
|
// TODO: Implement applyAcl() method. |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Get the ACL currently applied to the specified object. |
47
|
|
|
* |
48
|
|
|
* @param string $repositoryId The identifier for the repository. |
49
|
|
|
* @param string $objectId The identifier of the object. |
50
|
|
|
* @param boolean $onlyBasicPermissions The repository SHOULD make a best effort to fully express the native |
51
|
|
|
* security applied to the object. |
52
|
|
|
* <code>true</code> indicates that the client requests that the returned ACL be expressed using |
53
|
|
|
* only the CMIS basic permissions. |
54
|
|
|
* <code>false</code> indicates that the server may respond using either solely CMIS basic permissions, |
55
|
|
|
* or repository specific permissions or some combination of both. |
56
|
|
|
* @param ExtensionDataInterface|null $extension |
57
|
|
|
* @return AclInterface the ACL of the object |
58
|
|
|
*/ |
59
|
|
|
public function getAcl( |
60
|
|
|
$repositoryId, |
61
|
|
|
$objectId, |
62
|
|
|
$onlyBasicPermissions = true, |
63
|
|
|
ExtensionDataInterface $extension = null |
64
|
|
|
) { |
65
|
|
|
// TODO: Implement getAcl() method. |
66
|
|
|
} |
67
|
|
|
} |
68
|
|
|
|