CMIS and addObjectToFolder

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2011 11:33 AM
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 )
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 )
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2011 11:46 AM
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:
In a nutshell, the method simply posts an ATOM entry representing the object to the secondary folder's "getChildren" URL.
Jeff
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
