We have an application in production that manage documents and their properties, and we want to migrate to alfresco,
so we have a database table that contains all documents types, i have a big number of types so i can't add them to a custom model by the classic approach (in mymodel.xml create all types as a subtypes of cm:content, and for every type add properties), but i want to create a java application that create my types and properties via a rest call.
So how to do that and if there is an other way to do it please tell me
thanks in advance
AFAIK, there is no way to do so.
One option would be o create custom Aspects, as this offers you some freedom to play with different sets of properties per document.
But even with that option, you would still need to deploy a custom model every time you need a new Aspect.
Hi:
As a very very basic aprox, you can always upload your XML model (with your aspects) via REST or CMIS in /Data Dictionary/Models directory and then to enable it via Active flag of the content model, in a dynamic way.
On the other side, as far I read (I did not test it) in CMIS 1.1 you have type mutability, so you can do something in that direction.
CMIS 1.1 is now an approved spec; Here's a recap of what's new | ECM Architect
Regards.
--C.
Cesar Capillas Judging by Axel's answer in the link below, I believe that is not possible with the Alfresco's CMIS implementation.
Thanks for the link Douglas, in principle not all features of the CMIS 1.1 standard may be implemented, for any CMIS repository (including Alfresco). After your comment, I just checked CMIS repository information in CMIS workbench for example, but I did not see clearly something related (although I can see some features are not implemented in Alfresco repository: ex, Unfiling supported). Anyway I always saw a create type option in CMIS workbench types, that I thought it was related with this feature.
Regards.
--C.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.