02-01-2016 04:44 AM
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()); }
02-01-2016 04:59 AM
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).
02-03-2016 08:19 AM
Hi Florent,
02-01-2016 05:44 AM
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.
02-03-2016 09:05 AM
Answering to myself .....
There is something like that on nuxeo-labs (addFacet operation) : (https://github.com/nuxeo/nuxeo-labs)/nuxeo-labs-operations/)
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.