|
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\ExtensionDataInterface; |
|
14
|
|
|
use Dkd\PhpCmis\Data\ObjectDataInterface; |
|
15
|
|
|
use Dkd\PhpCmis\PolicyServiceInterface; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Policy Service Browser Binding client. |
|
19
|
|
|
*/ |
|
20
|
|
|
class PolicyService extends AbstractBrowserBindingService implements PolicyServiceInterface |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* Applies a specified policy to an object. |
|
24
|
|
|
* |
|
25
|
|
|
* @param string $repositoryId The identifier for the repository. |
|
26
|
|
|
* @param string $policyId The identifier for the policy to be applied. |
|
27
|
|
|
* @param string $objectId The identifier of the object. |
|
28
|
|
|
* @param ExtensionDataInterface|null $extension |
|
29
|
|
|
*/ |
|
30
|
|
|
public function applyPolicy($repositoryId, $policyId, $objectId, ExtensionDataInterface $extension = null) |
|
31
|
|
|
{ |
|
32
|
|
|
// TODO: Implement applyPolicy() method. |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* Gets the list of policies currently applied to the specified object. |
|
37
|
|
|
* |
|
38
|
|
|
* @param string $repositoryId The identifier for the repository. |
|
39
|
|
|
* @param string $objectId The identifier of the object. |
|
40
|
|
|
* @param string|null $filter a comma-separated list of query names that defines which properties must be |
|
41
|
|
|
* returned by the repository (default is repository specific) |
|
42
|
|
|
* @param ExtensionDataInterface|null $extension |
|
43
|
|
|
* @return ObjectDataInterface[] A list of the policy objects. |
|
44
|
|
|
*/ |
|
45
|
|
|
public function getAppliedPolicies( |
|
46
|
|
|
$repositoryId, |
|
47
|
|
|
$objectId, |
|
48
|
|
|
$filter = null, |
|
49
|
|
|
ExtensionDataInterface $extension = null |
|
50
|
|
|
) { |
|
51
|
|
|
// TODO: Implement getAppliedPolicies() method. |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* Removes a specified policy from an object. |
|
56
|
|
|
* |
|
57
|
|
|
* @param string $repositoryId The identifier for the repository. |
|
58
|
|
|
* @param string $policyId The identifier for the policy to be removed. |
|
59
|
|
|
* @param string $objectId The identifier of the object. |
|
60
|
|
|
* @param ExtensionDataInterface|null $extension |
|
61
|
|
|
*/ |
|
62
|
|
|
public function removePolicy($repositoryId, $policyId, $objectId, ExtensionDataInterface $extension = null) |
|
63
|
|
|
{ |
|
64
|
|
|
// TODO: Implement removePolicy() method. |
|
65
|
|
|
} |
|
66
|
|
|
} |
|
67
|
|
|
|