cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS and addObjectToFolder

sjeandroz
Champ in-the-making
Champ in-the-making
Hi,

I used CMIS to interact with alfresco from Drupal (I used the module CMIS API), but in this module, this isn't the implementation of function "addObjectToFolder"
And when I search an url to use this function on the page "http://myserver:8080/alfresco/service/index/family/CMIS", I don't find…

is it really possible to use this function in CMIS? How can I do ?

Thanks et sorry for my english

(I use Alfresco Community 4.0a finale )
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Yes, this is possible because the Alfresco repository supports the Multifiling capability.

Here's how it looks using cmislib from the Python shell to do it:
>>> sub1 = repo.getObjectByPath("/cmislib/sub1")>>> sub2 = repo.getObjectByPath("/cmislib/sub2")>>> doc = sub1.createDocument("testdoc1")>>> len(sub1.getChildren())1>>> len(sub2.getChildren())0>>> sub2.addObject(doc)>>> len(sub2.getChildren())1>>> sub2.getChildren()[0].nameu'testdoc1'‍‍‍‍‍‍‍‍‍‍‍‍‍‍
The cmislib client API uses the ATOM Pub binding and I believe the PHP API does as well so you could follow the same pattern to implement this method for that API and then contribute it back.

In a nutshell, the method simply posts an ATOM entry representing the object to the secondary folder's "getChildren" URL.

Jeff