AnsweredAssumed Answered

How to create document with more than 1 aspect?

Question asked by doychev on Apr 24, 2013
Latest reply on May 12, 2013 by jpotts
Hello,

I am trying to create a document and add 2 aspects to it on creation. So far, I had only one aspect and it worked something like that:


properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document,P:my:aspect");

//get contentStream, get folder

Document doc = folder.createDocument(properties, contentStream, null);


Now, I am trying to add the second aspect making a change like this:
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document,P:my:aspect1,P:my:aspect2");

but this only adds the my:aspect2 to the document.
I know there is a way to create it with one aspect and then add the second one, but that could cause some problems in my application.

Is there a way to create it with 2+ aspects?

Thank you.

Outcomes