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\AclCapabilitiesInterface; |
14
|
|
|
use Dkd\PhpCmis\Data\ExtensionFeatureInterface; |
15
|
|
|
use Dkd\PhpCmis\Data\RepositoryCapabilitiesInterface; |
16
|
|
|
use Dkd\PhpCmis\Data\RepositoryInfoInterface; |
17
|
|
|
use Dkd\PhpCmis\Enum\BaseTypeId; |
18
|
|
|
use Dkd\PhpCmis\Enum\CmisVersion; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Repository info data implementation. |
22
|
|
|
*/ |
23
|
|
|
class RepositoryInfo extends AbstractExtensionData implements RepositoryInfoInterface |
24
|
|
|
{ |
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
protected $id = ''; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
protected $name = ''; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var string |
37
|
|
|
*/ |
38
|
|
|
protected $description = ''; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var CmisVersion |
42
|
|
|
*/ |
43
|
|
|
protected $cmisVersion; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var RepositoryCapabilitiesInterface |
47
|
|
|
*/ |
48
|
|
|
protected $capabilities; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
*/ |
53
|
|
|
protected $rootFolderId = ''; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @var AclCapabilitiesInterface |
57
|
|
|
*/ |
58
|
|
|
protected $aclCapabilities; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var string |
62
|
|
|
*/ |
63
|
|
|
protected $principalIdAnonymous = ''; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var string |
67
|
|
|
*/ |
68
|
|
|
protected $principalIdAnyone = ''; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @var string |
72
|
|
|
*/ |
73
|
|
|
protected $thinClientUri = ''; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var boolean |
77
|
|
|
*/ |
78
|
|
|
protected $changesIncomplete = false; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var BaseTypeId[] |
82
|
|
|
*/ |
83
|
|
|
protected $changesOnType = []; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @var string |
87
|
|
|
*/ |
88
|
|
|
protected $latestChangeLogToken = ''; |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @var string |
92
|
|
|
*/ |
93
|
|
|
protected $vendorName = ''; |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @var string |
97
|
|
|
*/ |
98
|
|
|
protected $productName = ''; |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @var string |
102
|
|
|
*/ |
103
|
|
|
protected $productVersion = ''; |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @var ExtensionFeatureInterface[] |
107
|
|
|
*/ |
108
|
|
|
protected $extensionFeatures = []; |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param AclCapabilitiesInterface $aclCapabilities |
112
|
|
|
*/ |
113
|
2 |
|
public function setAclCapabilities(AclCapabilitiesInterface $aclCapabilities) |
114
|
|
|
{ |
115
|
2 |
|
$this->aclCapabilities = $aclCapabilities; |
116
|
2 |
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param RepositoryCapabilitiesInterface $capabilities |
120
|
|
|
*/ |
121
|
2 |
|
public function setCapabilities(RepositoryCapabilitiesInterface $capabilities) |
122
|
|
|
{ |
123
|
2 |
|
$this->capabilities = $capabilities; |
124
|
2 |
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param boolean $changesIncomplete |
128
|
|
|
*/ |
129
|
3 |
|
public function setChangesIncomplete($changesIncomplete) |
130
|
|
|
{ |
131
|
3 |
|
$this->changesIncomplete = $this->castValueToSimpleType('boolean', $changesIncomplete); |
132
|
3 |
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @param \Dkd\PhpCmis\Enum\BaseTypeId[] $changesOnType |
136
|
|
|
*/ |
137
|
3 |
|
public function setChangesOnType(array $changesOnType) |
138
|
|
|
{ |
139
|
3 |
|
foreach ($changesOnType as $baseTypeId) { |
140
|
3 |
|
$this->checkType(BaseTypeId::class, $baseTypeId); |
141
|
2 |
|
} |
142
|
2 |
|
$this->changesOnType = $changesOnType; |
143
|
2 |
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @param string $description |
147
|
|
|
*/ |
148
|
3 |
|
public function setDescription($description) |
149
|
|
|
{ |
150
|
3 |
|
$this->description = $this->castValueToSimpleType('string', $description); |
151
|
3 |
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @param ExtensionFeatureInterface[] $extensionFeatures |
155
|
|
|
*/ |
156
|
3 |
|
public function setExtensionFeatures(array $extensionFeatures) |
157
|
|
|
{ |
158
|
3 |
|
foreach ($extensionFeatures as $extensionFeature) { |
159
|
3 |
|
$this->checkType(ExtensionFeatureInterface::class, $extensionFeature); |
160
|
2 |
|
} |
161
|
2 |
|
$this->extensionFeatures = $extensionFeatures; |
162
|
2 |
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @param string $id |
166
|
|
|
*/ |
167
|
9 |
|
public function setId($id) |
168
|
|
|
{ |
169
|
9 |
|
$this->id = $this->castValueToSimpleType('string', $id, true); |
170
|
9 |
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* @param string $latestChangeLogToken |
174
|
|
|
*/ |
175
|
3 |
|
public function setLatestChangeLogToken($latestChangeLogToken) |
176
|
|
|
{ |
177
|
3 |
|
$this->latestChangeLogToken = $this->castValueToSimpleType('string', $latestChangeLogToken, true); |
178
|
3 |
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @param string $name |
182
|
|
|
*/ |
183
|
3 |
|
public function setName($name) |
184
|
|
|
{ |
185
|
3 |
|
$this->name = $this->castValueToSimpleType('string', $name, true); |
186
|
3 |
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* @param string $principalIdAnonymous |
190
|
|
|
*/ |
191
|
3 |
|
public function setPrincipalIdAnonymous($principalIdAnonymous) |
192
|
|
|
{ |
193
|
3 |
|
$this->principalIdAnonymous = $this->castValueToSimpleType('string', $principalIdAnonymous, true); |
194
|
3 |
|
} |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @param string $principalIdAnyone |
198
|
|
|
*/ |
199
|
3 |
|
public function setPrincipalIdAnyone($principalIdAnyone) |
200
|
|
|
{ |
201
|
3 |
|
$this->principalIdAnyone = $this->castValueToSimpleType('string', $principalIdAnyone, true); |
202
|
3 |
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param string $productName |
206
|
|
|
*/ |
207
|
3 |
|
public function setProductName($productName) |
208
|
|
|
{ |
209
|
3 |
|
$this->productName = $this->castValueToSimpleType('string', $productName, true); |
210
|
3 |
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* @param string $productVersion |
214
|
|
|
*/ |
215
|
3 |
|
public function setProductVersion($productVersion) |
216
|
|
|
{ |
217
|
3 |
|
$this->productVersion = $this->castValueToSimpleType('string', $productVersion, true); |
218
|
3 |
|
} |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* @param string $rootFolderId |
222
|
|
|
*/ |
223
|
3 |
|
public function setRootFolderId($rootFolderId) |
224
|
|
|
{ |
225
|
3 |
|
$this->rootFolderId = $this->castValueToSimpleType('string', $rootFolderId, true); |
226
|
3 |
|
} |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* @param string $thinClientUri |
230
|
|
|
*/ |
231
|
3 |
|
public function setThinClientUri($thinClientUri) |
232
|
|
|
{ |
233
|
3 |
|
$this->thinClientUri = $this->castValueToSimpleType('string', $thinClientUri, true); |
234
|
3 |
|
} |
235
|
|
|
|
236
|
|
|
/** |
237
|
|
|
* @param string $vendorName |
238
|
|
|
*/ |
239
|
3 |
|
public function setVendorName($vendorName) |
240
|
|
|
{ |
241
|
3 |
|
$this->vendorName = $this->castValueToSimpleType('string', $vendorName, true); |
242
|
3 |
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* {@inheritdoc} |
246
|
|
|
*/ |
247
|
1 |
|
public function getAclCapabilities() |
248
|
|
|
{ |
249
|
1 |
|
return $this->aclCapabilities; |
250
|
|
|
} |
251
|
|
|
|
252
|
|
|
/** |
253
|
|
|
* {@inheritdoc} |
254
|
|
|
*/ |
255
|
1 |
|
public function getCapabilities() |
256
|
|
|
{ |
257
|
1 |
|
return $this->capabilities; |
258
|
|
|
} |
259
|
|
|
|
260
|
|
|
/** |
261
|
|
|
* {@inheritdoc} |
262
|
|
|
*/ |
263
|
1 |
|
public function getChangesOnType() |
264
|
|
|
{ |
265
|
1 |
|
return $this->changesOnType; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* {@inheritdoc} |
270
|
|
|
*/ |
271
|
1 |
|
public function getDescription() |
272
|
|
|
{ |
273
|
1 |
|
return $this->description; |
274
|
|
|
} |
275
|
|
|
|
276
|
|
|
/** |
277
|
|
|
* {@inheritdoc} |
278
|
|
|
*/ |
279
|
1 |
|
public function getExtensionFeatures() |
280
|
|
|
{ |
281
|
1 |
|
return $this->extensionFeatures; |
282
|
|
|
} |
283
|
|
|
|
284
|
|
|
/** |
285
|
|
|
* {@inheritdoc} |
286
|
|
|
*/ |
287
|
9 |
|
public function getId() |
288
|
|
|
{ |
289
|
9 |
|
return $this->id; |
290
|
|
|
} |
291
|
|
|
|
292
|
|
|
/** |
293
|
|
|
* {@inheritdoc} |
294
|
|
|
*/ |
295
|
1 |
|
public function getLatestChangeLogToken() |
296
|
|
|
{ |
297
|
1 |
|
return $this->latestChangeLogToken; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* {@inheritdoc} |
302
|
|
|
*/ |
303
|
1 |
|
public function getName() |
304
|
|
|
{ |
305
|
1 |
|
return $this->name; |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* {@inheritdoc} |
310
|
|
|
*/ |
311
|
1 |
|
public function getProductName() |
312
|
|
|
{ |
313
|
1 |
|
return $this->productName; |
314
|
|
|
} |
315
|
|
|
|
316
|
|
|
/** |
317
|
|
|
* {@inheritdoc} |
318
|
|
|
*/ |
319
|
1 |
|
public function getProductVersion() |
320
|
|
|
{ |
321
|
1 |
|
return $this->productVersion; |
322
|
|
|
} |
323
|
|
|
|
324
|
|
|
/** |
325
|
|
|
* {@inheritdoc} |
326
|
|
|
*/ |
327
|
1 |
|
public function getRootFolderId() |
328
|
|
|
{ |
329
|
1 |
|
return $this->rootFolderId; |
330
|
|
|
} |
331
|
|
|
|
332
|
|
|
/** |
333
|
|
|
* {@inheritdoc} |
334
|
|
|
*/ |
335
|
1 |
|
public function getThinClientUri() |
336
|
|
|
{ |
337
|
1 |
|
return $this->thinClientUri; |
338
|
|
|
} |
339
|
|
|
|
340
|
|
|
/** |
341
|
|
|
* {@inheritdoc} |
342
|
|
|
*/ |
343
|
1 |
|
public function getVendorName() |
344
|
|
|
{ |
345
|
1 |
|
return $this->vendorName; |
346
|
|
|
} |
347
|
|
|
|
348
|
|
|
/** |
349
|
|
|
* {@inheritdoc} |
350
|
|
|
*/ |
351
|
1 |
|
public function getChangesIncomplete() |
352
|
|
|
{ |
353
|
1 |
|
return $this->changesIncomplete; |
354
|
|
|
} |
355
|
|
|
|
356
|
|
|
/** |
357
|
|
|
* {@inheritdoc} |
358
|
|
|
*/ |
359
|
1 |
|
public function getCmisVersion() |
360
|
|
|
{ |
361
|
1 |
|
return CmisVersion::cast($this->cmisVersion); |
362
|
|
|
} |
363
|
|
|
|
364
|
|
|
/** |
365
|
|
|
* Set the supported CMIS version |
366
|
|
|
* |
367
|
|
|
* @param CmisVersion|null $cmisVersion |
368
|
|
|
*/ |
369
|
2 |
|
public function setCmisVersion(CmisVersion $cmisVersion = null) |
370
|
|
|
{ |
371
|
2 |
|
$this->cmisVersion = CmisVersion::cast($cmisVersion); |
372
|
2 |
|
} |
373
|
|
|
|
374
|
|
|
/** |
375
|
|
|
* {@inheritdoc} |
376
|
|
|
*/ |
377
|
1 |
|
public function getPrincipalIdAnonymous() |
378
|
|
|
{ |
379
|
1 |
|
return $this->principalIdAnonymous; |
380
|
|
|
} |
381
|
|
|
|
382
|
|
|
/** |
383
|
|
|
* {@inheritdoc} |
384
|
|
|
*/ |
385
|
1 |
|
public function getPrincipalIdAnyone() |
386
|
|
|
{ |
387
|
1 |
|
return $this->principalIdAnyone; |
388
|
|
|
} |
389
|
|
|
} |
390
|
|
|
|