AnsweredAssumed Answered

CMIS, versions and getObject

Question asked by darionis on Mar 10, 2014
Latest reply on Mar 12, 2014 by darionis
Good day to all,

I was happy CMIS client, fetching documents with
Document doc = (Document)session.getObject("workspace://SpacesStore/d396bcb3-4a12-48bf-a9fd-e314c72a7c15");

It was all well until i created a new version of this document.

Version ID is now 0.1.


When i try again getObject("workspace://SpacesStore/d396bcb3-4a12-48bf-a9fd-e314c72a7c15"), I get

2014-03-10 12:51:50,452  ERROR [impl.atompub.CmisAtomPubServlet] [http-9080-1] Object Info not found for: workspace://SpacesStored396bcb3-4a12-48bf-a9fd-e314c72a7c15;1.0


Obviously, CMIS adds incorrect version id 1.0 to the end of the nodeId. If I explicitelly add version id 0.1, getObject(…) works. Does that mean that I MUST provide version ID to the object's nodeRef when calling getObject()? What if I am not aware of latest version id?

I know about getObjectOfLatestVersion(false), but it requires 'Document' reference first which I can not obtain with getObject().


Document object fetching somehow changed with multiple version but I don't know how to handle it. Can anybody please help, how to call getObject() if version id is uknown.


Thanks to all!

Outcomes