cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if object is versionable?

mariusz_pala
Champ in-the-making
Champ in-the-making
Hi,

I want to check if object is versionable. I'm able to create both types of documents, but after that I'm not able to check whether the document is versionable or not.
I thouhgt that maybe if cmis:versionSeriesId is null then it means the document is not versionable, but I was wrong. Once I check-out and check-in not-versioned document, this attribute has a value.
So another way is checking whether the object has applied Versionable aspect.
I checked in Alfresco Explorer:
Aspects
{http://www.alfresco.org/model/content/1.0}auditable
{http://www.alfresco.org/model/system/1.0}referenceable
{http://www.alfresco.org/model/content/1.0}titled
{http://www.alfresco.org/model/content/1.0}lockable
{http://www.alfresco.org/model/content/1.0}versionable

But CMIS returns me only:
P:cm:lockable
P:cm:titled

I want to display a valid checkin dialog, but apparently there is no way to do that Smiley Happy
Can anyone help me?

Thanks in advance,
Mariusz
2 REPLIES 2

nicolasraoul
Star Contributor
Star Contributor
Versionable is an aspect, and CMIS does not support aspects, so it might be available in the <alf:aspects> section of what you receive.
Do you use OpenCMIS or some other library to access CMIS? If you use OpenCMIS, see http://stackoverflow.com/questions/2998364

Hope this helps,
Nicolas

mariusz_pala
Champ in-the-making
Champ in-the-making
Well, I use another API and I use Alfresco extension to get the attached aspects, unfortunately this extension returns me only 2 aspects out of 5 attached. I reported that as a bug.