I am able to read the document using its path. I can see that it is the object that I am interested in.
On the folder that this document is, I have created a rule to add the aspect to any thing that comes in.
Now, in share, when I look at this document, by editing its properties, I see all the cm:document properties as well as my aspect properties with values.
I would like to read the properties of the aspect. I am using plain CMIS api, not the OpenCMIS extension.
When I do that, I see the regular properties only (as a result of the call object.getProperties()), not the properties of my aspect.
Similarly, getSecondaryTypes() call gives null.
As I said earlier, in share ui, I am able to see all the aspect properties, when click edit properties on the object.
Following is my code snippet:
Document object =(Document) cmisSession.getObjectByPath(path2Object);if(object !=null){ log.info("\tName ["+ object.getName()+"]"); log.info("\tDescription ["+ object.getDescription()+"]"); List<Property<?>> properties = object.getProperties();if(properties !=null){for(int index=0; index<properties.size(); index++){ Property aProperty = properties.get(index); log.info("/t P QueryName ["+ aProperty.getQueryName()+"]"); log.info("/t P Value ["+ aProperty.getValueAsString()+"]");}} List<SecondaryType> aspects = object.getSecondaryTypes();if(aspects !=null){for(int index=0; index<aspects.size(); index++){ SecondaryType aspect = aspects.get(index); log.info("/t P QueryName ["+ aspect.getQueryName()); log.info("/t P Discription ["+ aspect.getDescription()); }} }
Alfresco 5.0.d. community edition (64-bit) / CMIS / Java 1.7
Libraries used
org.apache.chemistry.opencmis
chemistry-opencmis-client-api
0.12.0
org.apache.chemistry.opencmis
chemistry-opencmis-client-impl
0.12.0
org.alfresco.cmis.client
alfresco-opencmis-extension
0.3