@@ 286-310 (lines=25) @@ | ||
283 | * @return string|null Returns the new object id or <code>null</code> if the repository sent an empty |
|
284 | * result (which should not happen) |
|
285 | */ |
|
286 | public function createFolder( |
|
287 | $repositoryId, |
|
288 | PropertiesInterface $properties, |
|
289 | $folderId, |
|
290 | array $policies = array(), |
|
291 | AclInterface $addAces = null, |
|
292 | AclInterface $removeAces = null, |
|
293 | ExtensionDataInterface $extension = null |
|
294 | ) { |
|
295 | $url = $this->getObjectUrl($repositoryId, $folderId); |
|
296 | $queryArray = $this->createQueryArray( |
|
297 | Constants::CMISACTION_CREATE_FOLDER, |
|
298 | $properties, |
|
299 | $policies, |
|
300 | $addAces, |
|
301 | $removeAces, |
|
302 | $extension |
|
303 | ); |
|
304 | ||
305 | $responseData = $this->post($url, $queryArray)->json(); |
|
306 | ||
307 | $newObject = $this->getJsonConverter()->convertObject($responseData); |
|
308 | ||
309 | return ($newObject === null) ? null : $newObject->getId(); |
|
310 | } |
|
311 | ||
312 | /** |
|
313 | * Creates an item object of the specified type (given by the cmis:objectTypeId property). |
|
@@ 403-427 (lines=25) @@ | ||
400 | * @return string|null Returns the new item id of the relationship object or <code>null</code> if the repository |
|
401 | * sent an empty result (which should not happen) |
|
402 | */ |
|
403 | public function createRelationship( |
|
404 | $repositoryId, |
|
405 | PropertiesInterface $properties, |
|
406 | array $policies = array(), |
|
407 | AclInterface $addAces = null, |
|
408 | AclInterface $removeAces = null, |
|
409 | ExtensionDataInterface $extension = null |
|
410 | ) { |
|
411 | $url = $this->getRepositoryUrl($repositoryId); |
|
412 | ||
413 | $queryArray = $this->createQueryArray( |
|
414 | Constants::CMISACTION_CREATE_RELATIONSHIP, |
|
415 | $properties, |
|
416 | $policies, |
|
417 | $addAces, |
|
418 | $removeAces, |
|
419 | $extension |
|
420 | ); |
|
421 | ||
422 | $responseData = $this->post($url, $queryArray)->json(); |
|
423 | ||
424 | $newObject = $this->getJsonConverter()->convertObject($responseData); |
|
425 | ||
426 | return ($newObject === null) ? null : $newObject->getId(); |
|
427 | } |
|
428 | ||
429 | /** |
|
430 | * Deletes the content stream for the specified document object. |