cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing the cmis:changeToken

juicybananas
Champ in-the-making
Champ in-the-making
From what I have gathered from the OpenCmis spec this is how one would go about getting the 'changeToken' for a Document.

      List<CmisExtensionElement> extensions = object.getProperties().getExtensions();
      PropertyData<?> propData = object.getProperties().getProperties().get("cmis:changeToken");

Is there any order to the values 'propData.getValues()' or should I expect just one value when it comes to 'cmis:changeToken'?

I want to create a custom change id using this value(s) the cmis:lastModificationDate and any ACL/permissions in the set. Is this something I need to worry about it order to encapsulate all changes or is this something already accounted for in CMIS?

Still learning the spec!
3 REPLIES 3

fmui
Champ in-the-making
Champ in-the-making
Hi juicybananas,

The change token is a single string and repository specific. You shouldn't use it except for the calls that take a change token. It's actually not used in Alfresco. The last modification date should be sufficient  for your use case.
Btw. You seem to use the OpenCMIS low level API. Any reasons for that? The high level API is much simpler to use.

Florian

juicybananas
Champ in-the-making
Champ in-the-making
Thanks for the response! I guess I'm using it for performance.

fmui
Champ in-the-making
Champ in-the-making
There is no performance difference between the APIs. In fact, if you use the high level API cache it can be faster.
The low level API gives you more control, but you write four times more code to use it.