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