|
1
|
|
|
<?php |
|
2
|
|
|
namespace Dkd\PhpCmis\DataObjects; |
|
3
|
|
|
|
|
4
|
|
|
/* |
|
5
|
|
|
* This file is part of php-cmis-client. |
|
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\CreatablePropertyTypesInterface; |
|
14
|
|
|
use Dkd\PhpCmis\Data\NewTypeSettableAttributesInterface; |
|
15
|
|
|
use Dkd\PhpCmis\Data\RepositoryCapabilitiesInterface; |
|
16
|
|
|
use Dkd\PhpCmis\Enum\CapabilityAcl; |
|
17
|
|
|
use Dkd\PhpCmis\Enum\CapabilityChanges; |
|
18
|
|
|
use Dkd\PhpCmis\Enum\CapabilityContentStreamUpdates; |
|
19
|
|
|
use Dkd\PhpCmis\Enum\CapabilityJoin; |
|
20
|
|
|
use Dkd\PhpCmis\Enum\CapabilityOrderBy; |
|
21
|
|
|
use Dkd\PhpCmis\Enum\CapabilityQuery; |
|
22
|
|
|
use Dkd\PhpCmis\Enum\CapabilityRenditions; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* Repository info data implementation including browser binding specific data. |
|
26
|
|
|
*/ |
|
27
|
|
|
class RepositoryCapabilities extends AbstractExtensionData implements RepositoryCapabilitiesInterface |
|
28
|
|
|
{ |
|
29
|
|
|
/** |
|
30
|
|
|
* @var boolean |
|
31
|
|
|
*/ |
|
32
|
|
|
protected $supportsAllVersionsSearchable = false; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @var CapabilityAcl |
|
36
|
|
|
*/ |
|
37
|
|
|
protected $aclCapability; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @var CapabilityChanges |
|
41
|
|
|
*/ |
|
42
|
|
|
protected $changesCapability; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @var CapabilityContentStreamUpdates |
|
46
|
|
|
*/ |
|
47
|
|
|
protected $contentStreamUpdatesCapability; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @var CapabilityJoin |
|
51
|
|
|
*/ |
|
52
|
|
|
protected $joinCapability; |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @var CapabilityQuery |
|
56
|
|
|
*/ |
|
57
|
|
|
protected $queryCapability; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @var CapabilityRenditions |
|
61
|
|
|
*/ |
|
62
|
|
|
protected $renditionsCapability; |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @var boolean |
|
66
|
|
|
*/ |
|
67
|
|
|
protected $isPwcSearchable = false; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @var boolean |
|
71
|
|
|
*/ |
|
72
|
|
|
protected $isPwcUpdatable = false; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* @var boolean |
|
76
|
|
|
*/ |
|
77
|
|
|
protected $supportsGetDescendants = false; |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @var boolean |
|
81
|
|
|
*/ |
|
82
|
|
|
protected $supportsGetFolderTree = false; |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* @var CapabilityOrderBy |
|
86
|
|
|
*/ |
|
87
|
|
|
protected $orderByCapability; |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @var boolean |
|
91
|
|
|
*/ |
|
92
|
|
|
protected $supportsMultifiling = false; |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @var boolean |
|
96
|
|
|
*/ |
|
97
|
|
|
protected $supportsUnfiling = false; |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @var boolean |
|
101
|
|
|
*/ |
|
102
|
|
|
protected $supportsVersionSpecificFiling = false; |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* @var CreatablePropertyTypesInterface|null |
|
106
|
|
|
*/ |
|
107
|
|
|
protected $creatablePropertyTypes; |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* @var NewTypeSettableAttributesInterface|null |
|
111
|
|
|
*/ |
|
112
|
|
|
protected $newTypeSettableAttributes; |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* Constructor that sets some defaults |
|
116
|
|
|
*/ |
|
117
|
91 |
|
public function __construct() |
|
118
|
|
|
{ |
|
119
|
91 |
|
$this->setAclCapability(CapabilityAcl::cast(CapabilityAcl::__DEFAULT)); |
|
120
|
91 |
|
$this->setChangesCapability(CapabilityChanges::cast(CapabilityChanges::__DEFAULT)); |
|
121
|
91 |
|
$this->setJoinCapability(CapabilityJoin::cast(CapabilityJoin::__DEFAULT)); |
|
122
|
91 |
|
$this->setContentStreamUpdatesCapability( |
|
123
|
91 |
|
CapabilityContentStreamUpdates::cast(CapabilityContentStreamUpdates::__DEFAULT) |
|
124
|
91 |
|
); |
|
125
|
91 |
|
$this->setQueryCapability(CapabilityQuery::cast(CapabilityQuery::__DEFAULT)); |
|
126
|
91 |
|
$this->setRenditionsCapability(CapabilityRenditions::cast(CapabilityRenditions::__DEFAULT)); |
|
127
|
91 |
|
$this->setOrderByCapability(CapabilityOrderBy::cast(CapabilityOrderBy::__DEFAULT)); |
|
128
|
91 |
|
} |
|
129
|
|
|
|
|
130
|
|
|
/** |
|
131
|
|
|
* @return CapabilityAcl |
|
132
|
|
|
*/ |
|
133
|
1 |
|
public function getAclCapability() |
|
134
|
|
|
{ |
|
135
|
1 |
|
return CapabilityAcl::cast($this->aclCapability); |
|
136
|
|
|
} |
|
137
|
|
|
|
|
138
|
|
|
/** |
|
139
|
|
|
* @param CapabilityAcl $aclCapability |
|
140
|
|
|
*/ |
|
141
|
91 |
|
public function setAclCapability(CapabilityAcl $aclCapability) |
|
142
|
|
|
{ |
|
143
|
91 |
|
$this->aclCapability = $aclCapability; |
|
144
|
91 |
|
} |
|
145
|
|
|
|
|
146
|
|
|
/** |
|
147
|
|
|
* @return boolean |
|
148
|
|
|
*/ |
|
149
|
1 |
|
public function isAllVersionsSearchableSupported() |
|
150
|
|
|
{ |
|
151
|
1 |
|
return $this->supportsAllVersionsSearchable; |
|
152
|
|
|
} |
|
153
|
|
|
|
|
154
|
|
|
/** |
|
155
|
|
|
* @param boolean $supportsAllVersionsSearchable |
|
156
|
|
|
*/ |
|
157
|
10 |
|
public function setSupportsAllVersionsSearchable($supportsAllVersionsSearchable) |
|
158
|
|
|
{ |
|
159
|
10 |
|
$this->supportsAllVersionsSearchable = (boolean) $supportsAllVersionsSearchable; |
|
160
|
10 |
|
} |
|
161
|
|
|
|
|
162
|
|
|
/** |
|
163
|
|
|
* @return CapabilityChanges |
|
164
|
|
|
*/ |
|
165
|
1 |
|
public function getChangesCapability() |
|
166
|
|
|
{ |
|
167
|
1 |
|
return CapabilityChanges::cast($this->changesCapability); |
|
168
|
|
|
} |
|
169
|
|
|
|
|
170
|
|
|
/** |
|
171
|
|
|
* @param CapabilityChanges $changesCapability |
|
172
|
|
|
*/ |
|
173
|
91 |
|
public function setChangesCapability(CapabilityChanges $changesCapability) |
|
174
|
|
|
{ |
|
175
|
91 |
|
$this->changesCapability = $changesCapability; |
|
176
|
91 |
|
} |
|
177
|
|
|
|
|
178
|
|
|
/** |
|
179
|
|
|
* @return CapabilityContentStreamUpdates |
|
180
|
|
|
*/ |
|
181
|
1 |
|
public function getContentStreamUpdatesCapability() |
|
182
|
|
|
{ |
|
183
|
1 |
|
return CapabilityContentStreamUpdates::cast($this->contentStreamUpdatesCapability); |
|
184
|
|
|
} |
|
185
|
|
|
|
|
186
|
|
|
/** |
|
187
|
|
|
* @param CapabilityContentStreamUpdates $contentStreamUpdatesCapability |
|
188
|
|
|
*/ |
|
189
|
91 |
|
public function setContentStreamUpdatesCapability(CapabilityContentStreamUpdates $contentStreamUpdatesCapability) |
|
190
|
|
|
{ |
|
191
|
91 |
|
$this->contentStreamUpdatesCapability = $contentStreamUpdatesCapability; |
|
192
|
91 |
|
} |
|
193
|
|
|
|
|
194
|
|
|
/** |
|
195
|
|
|
* @return CreatablePropertyTypesInterface|null |
|
196
|
|
|
*/ |
|
197
|
1 |
|
public function getCreatablePropertyTypes() |
|
198
|
|
|
{ |
|
199
|
1 |
|
return $this->creatablePropertyTypes; |
|
200
|
|
|
} |
|
201
|
|
|
|
|
202
|
|
|
/** |
|
203
|
|
|
* @param CreatablePropertyTypesInterface $creatablePropertyTypes |
|
204
|
|
|
*/ |
|
205
|
3 |
|
public function setCreatablePropertyTypes(CreatablePropertyTypesInterface $creatablePropertyTypes) |
|
206
|
|
|
{ |
|
207
|
3 |
|
$this->creatablePropertyTypes = $creatablePropertyTypes; |
|
208
|
3 |
|
} |
|
209
|
|
|
|
|
210
|
|
|
/** |
|
211
|
|
|
* @return boolean |
|
212
|
|
|
*/ |
|
213
|
1 |
|
public function isPwcSearchableSupported() |
|
214
|
|
|
{ |
|
215
|
1 |
|
return $this->isPwcSearchable; |
|
216
|
|
|
} |
|
217
|
|
|
|
|
218
|
|
|
/** |
|
219
|
|
|
* @param boolean $isPwcSearchable |
|
220
|
|
|
*/ |
|
221
|
10 |
|
public function setSupportsPwcSearchable($isPwcSearchable) |
|
222
|
|
|
{ |
|
223
|
10 |
|
$this->isPwcSearchable = (boolean) $isPwcSearchable; |
|
224
|
10 |
|
} |
|
225
|
|
|
|
|
226
|
|
|
/** |
|
227
|
|
|
* @return boolean |
|
228
|
|
|
*/ |
|
229
|
1 |
|
public function isPwcUpdatableSupported() |
|
230
|
|
|
{ |
|
231
|
1 |
|
return $this->isPwcUpdatable; |
|
232
|
|
|
} |
|
233
|
|
|
|
|
234
|
|
|
/** |
|
235
|
|
|
* @param boolean $isPwcUpdatable |
|
236
|
|
|
*/ |
|
237
|
10 |
|
public function setSupportsPwcUpdatable($isPwcUpdatable) |
|
238
|
|
|
{ |
|
239
|
10 |
|
$this->isPwcUpdatable = (boolean) $isPwcUpdatable; |
|
240
|
10 |
|
} |
|
241
|
|
|
|
|
242
|
|
|
/** |
|
243
|
|
|
* @return CapabilityJoin |
|
244
|
|
|
*/ |
|
245
|
1 |
|
public function getJoinCapability() |
|
246
|
|
|
{ |
|
247
|
1 |
|
return CapabilityJoin::cast($this->joinCapability); |
|
248
|
|
|
} |
|
249
|
|
|
|
|
250
|
|
|
/** |
|
251
|
|
|
* @param CapabilityJoin $joinCapability |
|
252
|
|
|
*/ |
|
253
|
91 |
|
public function setJoinCapability(CapabilityJoin $joinCapability) |
|
254
|
|
|
{ |
|
255
|
91 |
|
$this->joinCapability = $joinCapability; |
|
256
|
91 |
|
} |
|
257
|
|
|
|
|
258
|
|
|
/** |
|
259
|
|
|
* @return NewTypeSettableAttributesInterface|null |
|
260
|
|
|
*/ |
|
261
|
1 |
|
public function getNewTypeSettableAttributes() |
|
262
|
|
|
{ |
|
263
|
1 |
|
return $this->newTypeSettableAttributes; |
|
264
|
|
|
} |
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* @param NewTypeSettableAttributesInterface $newTypeSettableAttributes |
|
268
|
|
|
*/ |
|
269
|
3 |
|
public function setNewTypeSettableAttributes(NewTypeSettableAttributesInterface $newTypeSettableAttributes) |
|
270
|
|
|
{ |
|
271
|
3 |
|
$this->newTypeSettableAttributes = $newTypeSettableAttributes; |
|
272
|
3 |
|
} |
|
273
|
|
|
|
|
274
|
|
|
/** |
|
275
|
|
|
* @return CapabilityOrderBy |
|
276
|
|
|
*/ |
|
277
|
1 |
|
public function getOrderByCapability() |
|
278
|
|
|
{ |
|
279
|
1 |
|
return CapabilityOrderBy::cast($this->orderByCapability); |
|
280
|
|
|
} |
|
281
|
|
|
|
|
282
|
|
|
/** |
|
283
|
|
|
* @param CapabilityOrderBy $orderByCapability |
|
284
|
|
|
*/ |
|
285
|
91 |
|
public function setOrderByCapability(CapabilityOrderBy $orderByCapability) |
|
286
|
|
|
{ |
|
287
|
91 |
|
$this->orderByCapability = $orderByCapability; |
|
288
|
91 |
|
} |
|
289
|
|
|
|
|
290
|
|
|
/** |
|
291
|
|
|
* @return CapabilityQuery |
|
292
|
|
|
*/ |
|
293
|
1 |
|
public function getQueryCapability() |
|
294
|
|
|
{ |
|
295
|
1 |
|
return CapabilityQuery::cast($this->queryCapability); |
|
296
|
|
|
} |
|
297
|
|
|
|
|
298
|
|
|
/** |
|
299
|
|
|
* @param CapabilityQuery $queryCapability |
|
300
|
|
|
*/ |
|
301
|
91 |
|
public function setQueryCapability(CapabilityQuery $queryCapability) |
|
302
|
|
|
{ |
|
303
|
91 |
|
$this->queryCapability = $queryCapability; |
|
304
|
91 |
|
} |
|
305
|
|
|
|
|
306
|
|
|
/** |
|
307
|
|
|
* @return CapabilityRenditions |
|
308
|
|
|
*/ |
|
309
|
1 |
|
public function getRenditionsCapability() |
|
310
|
|
|
{ |
|
311
|
1 |
|
return CapabilityRenditions::cast($this->renditionsCapability); |
|
312
|
|
|
} |
|
313
|
|
|
|
|
314
|
|
|
/** |
|
315
|
|
|
* @param CapabilityRenditions $renditionsCapability |
|
316
|
|
|
*/ |
|
317
|
91 |
|
public function setRenditionsCapability(CapabilityRenditions $renditionsCapability) |
|
318
|
|
|
{ |
|
319
|
91 |
|
$this->renditionsCapability = $renditionsCapability; |
|
320
|
91 |
|
} |
|
321
|
|
|
|
|
322
|
|
|
/** |
|
323
|
|
|
* @return boolean |
|
324
|
|
|
*/ |
|
325
|
1 |
|
public function isGetDescendantsSupported() |
|
326
|
|
|
{ |
|
327
|
1 |
|
return $this->supportsGetDescendants; |
|
328
|
|
|
} |
|
329
|
|
|
|
|
330
|
|
|
/** |
|
331
|
|
|
* @param boolean $supportsGetDescendants |
|
332
|
|
|
*/ |
|
333
|
10 |
|
public function setSupportsGetDescendants($supportsGetDescendants) |
|
334
|
|
|
{ |
|
335
|
10 |
|
$this->supportsGetDescendants = (boolean) $supportsGetDescendants; |
|
336
|
10 |
|
} |
|
337
|
|
|
|
|
338
|
|
|
/** |
|
339
|
|
|
* @return boolean |
|
340
|
|
|
*/ |
|
341
|
1 |
|
public function isGetFolderTreeSupported() |
|
342
|
|
|
{ |
|
343
|
1 |
|
return $this->supportsGetFolderTree; |
|
344
|
|
|
} |
|
345
|
|
|
|
|
346
|
|
|
/** |
|
347
|
|
|
* @param boolean $supportsGetFolderTree |
|
348
|
|
|
*/ |
|
349
|
10 |
|
public function setSupportsGetFolderTree($supportsGetFolderTree) |
|
350
|
|
|
{ |
|
351
|
10 |
|
$this->supportsGetFolderTree = (boolean) $supportsGetFolderTree; |
|
352
|
10 |
|
} |
|
353
|
|
|
|
|
354
|
|
|
/** |
|
355
|
|
|
* @return boolean |
|
356
|
|
|
*/ |
|
357
|
1 |
|
public function isMultifilingSupported() |
|
358
|
|
|
{ |
|
359
|
1 |
|
return $this->supportsMultifiling; |
|
360
|
|
|
} |
|
361
|
|
|
|
|
362
|
|
|
/** |
|
363
|
|
|
* @param boolean $supportsMultifiling |
|
364
|
|
|
*/ |
|
365
|
10 |
|
public function setSupportsMultifiling($supportsMultifiling) |
|
366
|
|
|
{ |
|
367
|
10 |
|
$this->supportsMultifiling = (boolean) $supportsMultifiling; |
|
368
|
10 |
|
} |
|
369
|
|
|
|
|
370
|
|
|
/** |
|
371
|
|
|
* @return boolean |
|
372
|
|
|
*/ |
|
373
|
1 |
|
public function isUnfilingSupported() |
|
374
|
|
|
{ |
|
375
|
1 |
|
return $this->supportsUnfiling; |
|
376
|
|
|
} |
|
377
|
|
|
|
|
378
|
|
|
/** |
|
379
|
|
|
* @param boolean $supportsUnfiling |
|
380
|
|
|
*/ |
|
381
|
10 |
|
public function setSupportsUnfiling($supportsUnfiling) |
|
382
|
|
|
{ |
|
383
|
10 |
|
$this->supportsUnfiling = (boolean) $supportsUnfiling; |
|
384
|
10 |
|
} |
|
385
|
|
|
|
|
386
|
|
|
/** |
|
387
|
|
|
* @return boolean |
|
388
|
|
|
*/ |
|
389
|
1 |
|
public function isVersionSpecificFilingSupported() |
|
390
|
|
|
{ |
|
391
|
1 |
|
return $this->supportsVersionSpecificFiling; |
|
392
|
|
|
} |
|
393
|
|
|
|
|
394
|
|
|
/** |
|
395
|
|
|
* @param boolean $supportsVersionSpecificFiling |
|
396
|
|
|
*/ |
|
397
|
10 |
|
public function setSupportsVersionSpecificFiling($supportsVersionSpecificFiling) |
|
398
|
|
|
{ |
|
399
|
10 |
|
$this->supportsVersionSpecificFiling = (boolean) $supportsVersionSpecificFiling; |
|
400
|
10 |
|
} |
|
401
|
|
|
} |
|
402
|
|
|
|