Just downloaded latest community edition. Installed fine, UI working, documents uploading etc.
Figured out how to use the Model Manager to create a ‘model’ called ‘Document’. Within this model I created a ‘custom type’ called ‘dc
CN’ with a display name of ‘PCN’. Against the custom type I created 2 properties both with a datatype of ‘text’.
In the web UI, in the ‘Repository’ I can upload a file. I can then navigate to the new file, and change the type to the custom type I just created i.e. PCN. I can then see that the properties panel changes and I can populate these metadata fields as needed.
My question relates to how I do this via CMIS. In Java I have been able to code a connector to IBM FileNet and upload a file. For this I use this property something like :-
props.put(PropertyIds.OBJECT_TYPE_ID, “cmis
CN”)
This works fine. However for Alfresco it doesn’t. If I set it to use the returned queryName for the custom type returned in a list from session.getTypeChildren("cmis:document”, true) i.e. dc
CN
props.put(PropertyIds.OBJECT_TYPE_ID, “dc
CN”)
If fails saying CmisObjectNotFoundException Type ‘dc
CN’ is unknown!
However I can get the file to upload successfully if I use the base:-
props.put(PropertyIds.OBJECT_TYPE_ID, “cmis:document”)
Issue is there is no metadata fields associated as this is the base class.
So my question, what props do I need to set for me to be able to set the custom type of my file to PCN and map the metadata properties to it.