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