@@ 264-292 (lines=29) @@ | ||
261 | * @return string|null Returns the new object id or <code>null</code> if the repository sent an empty |
|
262 | * result (which should not happen) |
|
263 | */ |
|
264 | public function createFolder( |
|
265 | $repositoryId, |
|
266 | PropertiesInterface $properties, |
|
267 | $folderId, |
|
268 | array $policies = array(), |
|
269 | AclInterface $addAces = null, |
|
270 | AclInterface $removeAces = null, |
|
271 | ExtensionDataInterface $extension = null |
|
272 | ) { |
|
273 | $url = $this->getObjectUrl($repositoryId, $folderId); |
|
274 | $url->getQuery()->modify( |
|
275 | array( |
|
276 | Constants::CONTROL_CMISACTION => Constants::CMISACTION_CREATE_FOLDER, |
|
277 | Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false' |
|
278 | ) |
|
279 | ); |
|
280 | ||
281 | $url->getQuery()->modify($this->convertPropertiesToQueryArray($properties)); |
|
282 | ||
283 | $this->appendPoliciesToUrl($url, $policies); |
|
284 | $this->appendAddAcesToUrl($url, $addAces); |
|
285 | $this->appendRemoveAcesToUrl($url, $removeAces); |
|
286 | ||
287 | $responseData = $this->post($url)->json(); |
|
288 | ||
289 | $newObject = $this->getJsonConverter()->convertObject($responseData); |
|
290 | ||
291 | return ($newObject === null) ? null : $newObject->getId(); |
|
292 | } |
|
293 | ||
294 | /** |
|
295 | * Creates an item object of the specified type (given by the cmis:objectTypeId property). |
|
@@ 389-416 (lines=28) @@ | ||
386 | * @return string|null Returns the new item id of the relationship object or <code>null</code> if the repository |
|
387 | * sent an empty result (which should not happen) |
|
388 | */ |
|
389 | public function createRelationship( |
|
390 | $repositoryId, |
|
391 | PropertiesInterface $properties, |
|
392 | array $policies = array(), |
|
393 | AclInterface $addAces = null, |
|
394 | AclInterface $removeAces = null, |
|
395 | ExtensionDataInterface $extension = null |
|
396 | ) { |
|
397 | $url = $this->getRepositoryUrl($repositoryId); |
|
398 | ||
399 | $url->getQuery()->modify( |
|
400 | array( |
|
401 | Constants::CONTROL_CMISACTION => Constants::CMISACTION_CREATE_RELATIONSHIP, |
|
402 | Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false' |
|
403 | ) |
|
404 | ); |
|
405 | ||
406 | $url->getQuery()->modify($this->convertPropertiesToQueryArray($properties)); |
|
407 | $this->appendPoliciesToUrl($url, $policies); |
|
408 | $this->appendAddAcesToUrl($url, $addAces); |
|
409 | $this->appendRemoveAcesToUrl($url, $removeAces); |
|
410 | ||
411 | $responseData = $this->post($url)->json(); |
|
412 | ||
413 | $newObject = $this->getJsonConverter()->convertObject($responseData); |
|
414 | ||
415 | return ($newObject === null) ? null : $newObject->getId(); |
|
416 | } |
|
417 | ||
418 | /** |
|
419 | * Deletes the content stream for the specified document object. |