AnsweredAssumed Answered

hidden aspect using cmis

Question asked by jaxtell on Aug 28, 2018
Latest reply on Sep 11, 2018 by jpotts

I'm trying to add a hidden secondary type to a document using CMIS but can't seem to get it to stay.  Here is an example using the groovy console from CMIS Workbench:


import org.apache.chemistry.opencmis.commons.*
import org.apache.chemistry.opencmis.commons.enums.*
import org.apache.chemistry.opencmis.client.api.*
import org.apache.chemistry.opencmis.client.util.*

def cmiso = session.getObjectByPath("/User Homes/JoshWasHere.txt")
def secondaryTypes = cmiso.getPropertyValue("cmis:secondaryObjectTypeIds")
def properties = new HashMap<String, Object>();
properties.put("cmis:secondaryObjectTypeIds", secondaryTypes)

The Result:

Result: [P:dp:restrictable, P:cm:titled, P:cm:generalclassifiable, P:sys:localized, P:cm:taggable, P:cm:author]

So one of the two secondary types I've added stays.  I don't see any errors in the web server logs. The closest thing I see that might be related is

PolicyTypeDefintionWrapper [http-nio-8080-exec-5]: Not a policy: {}aspects 

Are there limitation on what secondary types can be added to specific types?  Why can't I add the hidden secondary type to this document?