@@ 281-303 (lines=23) @@ | ||
278 | * @return string|null Returns the new object id or <code>null</code> if the repository sent an empty |
|
279 | * result (which should not happen) |
|
280 | */ |
|
281 | public function createFolder( |
|
282 | $repositoryId, |
|
283 | PropertiesInterface $properties, |
|
284 | $folderId, |
|
285 | array $policies = [], |
|
286 | AclInterface $addAces = null, |
|
287 | AclInterface $removeAces = null, |
|
288 | ExtensionDataInterface $extension = null |
|
289 | ) { |
|
290 | $url = $this->getObjectUrl($repositoryId, $folderId); |
|
291 | $queryArray = $this->createQueryArray( |
|
292 | Constants::CMISACTION_CREATE_FOLDER, |
|
293 | $properties, |
|
294 | $policies, |
|
295 | $addAces, |
|
296 | $removeAces, |
|
297 | $extension |
|
298 | ); |
|
299 | ||
300 | $newObject = $this->getJsonConverter()->convertObject((array) $this->postJson($url, $queryArray)); |
|
301 | ||
302 | return ($newObject === null) ? null : $newObject->getId(); |
|
303 | } |
|
304 | ||
305 | /** |
|
306 | * Creates an item object of the specified type (given by the cmis:objectTypeId property). |
|
@@ 394-416 (lines=23) @@ | ||
391 | * @return string|null Returns the new item id of the relationship object or <code>null</code> if the repository |
|
392 | * sent an empty result (which should not happen) |
|
393 | */ |
|
394 | public function createRelationship( |
|
395 | $repositoryId, |
|
396 | PropertiesInterface $properties, |
|
397 | array $policies = [], |
|
398 | AclInterface $addAces = null, |
|
399 | AclInterface $removeAces = null, |
|
400 | ExtensionDataInterface $extension = null |
|
401 | ) { |
|
402 | $url = $this->getRepositoryUrl($repositoryId); |
|
403 | ||
404 | $queryArray = $this->createQueryArray( |
|
405 | Constants::CMISACTION_CREATE_RELATIONSHIP, |
|
406 | $properties, |
|
407 | $policies, |
|
408 | $addAces, |
|
409 | $removeAces, |
|
410 | $extension |
|
411 | ); |
|
412 | ||
413 | $newObject = $this->getJsonConverter()->convertObject((array) $this->postJson($url, $queryArray)); |
|
414 | ||
415 | return ($newObject === null) ? null : $newObject->getId(); |
|
416 | } |
|
417 | ||
418 | /** |
|
419 | * Deletes the content stream for the specified document object. |