alfrescoalfresco-sharealfresco-webscriptsopencmis

How to get custom type properties and custom aspect properties using CMIS(java)


I am querying alfresco repository documents from alfresco 4.2. and I am getting the document object successfully.

But now I want fetch all the metadata associated with that document. I have some custom content types and some custom aspects Are there. And I want all those properties in CMIS.

At this moment I am able to fetch default properties like document name and document creation date etc.

But I am facing challenges to fetch custom aspect and custom content type related metadata.

Can anyone please help me and tell me whether it is possible in CMIS or not.

Thanks in Advance.


Solution

  • If you are doing a CMIS Query Language query and you want to use aspect-defined properties in a where clause, you have to do a join as shown here.

    If you are using a non-query CMIS call, like you did a query to get the objects you want, and you want to get the properties from the object, you can do that. You do not need to do anything special to retrieve properties from an object that are defined on an aspect (CMIS calls these "secondary types").

    If you are fetching objects from a repository and you have no idea what the properties are you can use getTypeChildren, getTypeDescendants, and getTypeDefinition which are all methods of the CMIS repository service.

    The Apache Chemistry Workbench has a "Types" button which is helpful for figuring out what types and aspects are defined in your repository.