(7.10) (CMIS Atompub) : are the secondarytypes (dynamic facets) settable at all through CMIS ?
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());
}
Answering to myself …..
There is something like that on nuxeo-labs (addFacet operation) :
(https://github.com/nuxeo/nuxeo-labs)/nuxeo-labs-operations/)
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.
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).