ALF-20118 "appendContentStream causes VersionServiceException" workaround for bug in Chemistry OpenCMIS libraries means that objectId is not being returned from appendContentStream

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55922 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2013-09-24 21:12:50 +00:00
parent b891428c34
commit 7735720353

View File

@@ -1308,8 +1308,16 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
} }
checkRepositoryId(repositoryId); checkRepositoryId(repositoryId);
// workaround for bug in OpenCMIS libraries
String nodeId = objectId.getValue();
int idx = nodeId.indexOf(";");
if(idx != -1)
{
nodeId = nodeId.substring(0, idx);
}
CMISNodeInfo info = getOrCreateNodeInfo(objectId.getValue(), "Object"); CMISNodeInfo info = getOrCreateNodeInfo(nodeId, "Object");
NodeRef nodeRef = info.getNodeRef(); NodeRef nodeRef = info.getNodeRef();
if (((DocumentTypeDefinition) info.getType().getTypeDefinition(false)).getContentStreamAllowed() == ContentStreamAllowed.NOTALLOWED) if (((DocumentTypeDefinition) info.getType().getTypeDefinition(false)).getContentStreamAllowed() == ContentStreamAllowed.NOTALLOWED)