(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 ?


public void SettingSecondaryType () {
    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);
0 votes

3 answers



Answering to myself …..

There is something like that on nuxeo-labs (addFacet operation) :

0 votes

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 :)


0 votes

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).

0 votes

Hi Florent, Apart from CMIS, using some other API, how may I associate a dynamic facet to a (maybe pre-existing) document ? I was not able to find any reference to dynamic facets in the API docs (7.10) ;(. At least this does not seem possible through the rest API ….