You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Jeff Potts (JIRA)" <ji...@apache.org> on 2011/02/22 00:24:38 UTC
[jira] Created: (CMIS-313) Multifiling folders returns conflict
Multifiling folders returns conflict
------------------------------------
Key: CMIS-313
URL: https://issues.apache.org/jira/browse/CMIS-313
Project: Chemistry
Issue Type: Bug
Components: opencmis-server-inmemory
Environment: OpenCMIS rev 1073115, Workbench, opencmis-server-inmemory, Tomcat 6, Mac OS X
Reporter: Jeff Potts
If I create the following folder structure:
/cmislib/sub1
/cmislib/sub2
And then try to add sub2 as a child of sub1 using the groovy script below, I get a constraint violation.
Multifiling documents seems to work fine, however.
Jeff
groovy> import org.apache.chemistry.opencmis.commons.*
groovy> import org.apache.chemistry.opencmis.commons.data.*
groovy> import org.apache.chemistry.opencmis.commons.enums.*
groovy> import org.apache.chemistry.opencmis.client.api.*
groovy> cmis = new scripts.CMIS(session)
groovy> Folder folder = cmis.getFolder("/cmislib")
groovy> println folder.id
groovy> Folder sub1 = cmis.getFolder("/cmislib/sub1")
groovy> println sub1.id
groovy> Folder sub2 = cmis.getFolder("/cmislib/sub2")
groovy> println sub2.id
groovy> sub2.addToFolder(sub1, true)
136
137
138
Exception thrown
org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException: Conflict
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:406)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:496)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.MultiFilingServiceImpl.addObjectToFolder(MultiFilingServiceImpl.java:63)
at org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject.addToFolder(AbstractFilableCmisObject.java:151)
at multifile.run(multifile.groovy:20)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CMIS-313) Multifiling folders returns conflict
Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997607#comment-12997607 ]
Florian Müller commented on CMIS-313:
-------------------------------------
Folders are not multi-filable. There is only one path to a folder.
> Multifiling folders returns conflict
> ------------------------------------
>
> Key: CMIS-313
> URL: https://issues.apache.org/jira/browse/CMIS-313
> Project: Chemistry
> Issue Type: Bug
> Components: opencmis-server-inmemory
> Environment: OpenCMIS rev 1073115, Workbench, opencmis-server-inmemory, Tomcat 6, Mac OS X
> Reporter: Jeff Potts
>
> If I create the following folder structure:
> /cmislib/sub1
> /cmislib/sub2
> And then try to add sub2 as a child of sub1 using the groovy script below, I get a constraint violation.
> Multifiling documents seems to work fine, however.
> Jeff
> groovy> import org.apache.chemistry.opencmis.commons.*
> groovy> import org.apache.chemistry.opencmis.commons.data.*
> groovy> import org.apache.chemistry.opencmis.commons.enums.*
> groovy> import org.apache.chemistry.opencmis.client.api.*
> groovy> cmis = new scripts.CMIS(session)
> groovy> Folder folder = cmis.getFolder("/cmislib")
> groovy> println folder.id
> groovy> Folder sub1 = cmis.getFolder("/cmislib/sub1")
> groovy> println sub1.id
> groovy> Folder sub2 = cmis.getFolder("/cmislib/sub2")
> groovy> println sub2.id
> groovy> sub2.addToFolder(sub1, true)
>
> 136
> 137
> 138
> Exception thrown
> org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException: Conflict
> at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:406)
> at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:496)
> at org.apache.chemistry.opencmis.client.bindings.spi.atompub.MultiFilingServiceImpl.addObjectToFolder(MultiFilingServiceImpl.java:63)
> at org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject.addToFolder(AbstractFilableCmisObject.java:151)
> at multifile.run(multifile.groovy:20)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira