cancel
Showing results for 
Search instead for 
Did you mean: 

Blog post about accessing aspects via CMIS, feedback needed

nicolasraoul
Star Contributor
Star Contributor
Hello all,

I have been reading the CMIS 1.1 spec a lot lately, and found a point which is not talked about much on the web, so I decided to write a blog post about it, taking Alfresco as an example:

http://aegif-labo.blogspot.jp/2013/04/cmis-what-are-secondary-object-types.html

QUESTION: Is it accurate?
In particular, will secondary object types be accessible via CMIS properties, instead of the current extension mechanism? If yes, any idea from what Alfresco version this will be possible?

Thanks a lot!
Nicolas Raoul
4 REPLIES 4

jpotts
World-Class Innovator
World-Class Innovator
I think the sentence "Most ECM servers also have a "secondary type" concept" is not accurate. The only server I know of that supports something similar is Alfresco. Everyone else, please chime in if you know of other ECM servers that have an aspect/secondary type concept.

If you download the 0.9 beta release of OpenCMIS InMemory Server and the CMIS Workbench, you can actually play with secondary types. The way it works is that there is a property called cmis:secondaryObjectTypeIds. This is a multi-value property that lists the secondary types (aspects) applied to the object. You can add and remove aspects to and from an object simply by changing the value of that property. (Shameless plug: We talk more about this in Chapter 4 of the up-coming CMIS and Apache Chemistry book from Manning).

So, yes, when Alfresco supports CMIS 1.1, you will have native support for aspects and the Alfresco OpenCMIS Extension currently required for aspect support with CMIS 1.0 and Alfresco will be obsolete.

Jeff

bartek
Champ in-the-making
Champ in-the-making
Hi

I am using Alfresco 4.2.f which supports cmis 1.1 and for communication I am using latest Apache Chemistry version 0.11.0.
I tried to add a custom property like "my:uuid" with some value "34tggre3" but it give me and error: java.lang.IllegalArgumentException: Property 'my:uuid' is not valid for this type or one of the secondary types!
In the attachments there is a script from cmisWorkbench console so U can easily reproduce it. For the record I am using new url for connection and workbench repository info tells that it works in cmis 1.1 version.
The only one way to add custom property is to use predefined aspect or create a new one on the alfresco?

Regards,
Bartek

jpotts
World-Class Innovator
World-Class Innovator
Correct, that property must already be defined in one of your types or aspects. Because my:uuid is not a property of either cmis:folder or cm:titled the error is being thrown. If you need to know how to define your own custom content model, see <a href="http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html">this tutorial</a>.

Jeff

mrogers
Star Contributor
Star Contributor
I don't think alfresco supports the online definitions of types (i.e. modifying or creating an aspect) over CMIS.