cancel
Showing results for 
Search instead for 
Did you mean: 

(7.10) (CMIS Atompub) : are the secondarytypes (dynamic facets) settable at all through CMIS ?

J_-M_K_
Champ in-the-making
Champ in-the-making

It seems impossible to set cmis:secondaryTypesId through CMIS. Is it intended behavior ?

I added the following test to nuxeo-opencmis-test. This test is failing. Did I miss something about nuxeo and secondarytypes ?

@Test public void SettingSecondaryType () { assertEquals(BindingType.ATOMPUB,session.getBinding().getBindingType()); Folder folder = FileUtils.getFolder("/testfolder1",session); //properties of new document Map<String, Object> props = new HashMap<String, Object>(); //create a Note called test2 props.put("cmis:objectTypeId", "Note"); props.put("cmis:name", "test2"); //add facet:CustomFacetWithoutSchema as secondarytype props.put("cmis:secondaryObjectTypeIds", Arrays.asList("facet:CustomFacetWithoutSchema")); Document doc = folder.createDocument(props, null, VersioningState.MAJOR); FileUtils.printProperties(doc); assertNotNull(doc.getSecondaryTypes()); }

4 REPLIES 4

Florent_Guillau
World-Class Innovator
World-Class Innovator

Modifying secondary types is an optional feature of CMIS and is currently not supported in Nuxeo (cmis:secondaryObjectTypeIds is exposed as read-only in the object type definitions).

Hi Florent,

J_-M_K_
Champ in-the-making
Champ in-the-making

Florent, thanks for your prompt reply.

I overlooked the read-only attribute for `cmis:secondaryObjectTypeIds'. However there is no CmisConstraintException raised when I try to set the property 🙂

J.-M.

J_-M_K_
Champ in-the-making
Champ in-the-making

Answering to myself .....

There is something like that on nuxeo-labs (addFacet operation) : (https://github.com/nuxeo/nuxeo-labs)/nuxeo-labs-operations/)

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.