AnsweredAssumed Answered

CMIS, Alfresc 4.2.1, can not update DESCRIPTION and TITLE properties

Question asked by samw on Jul 25, 2015
Dear Alfresco experts,

I am working on a Alfresco repository with existing folders and files - so the task is to update the folder and files with new TITLE and DESCRIPTION properties using Java program.

I am using Alfresco 4.2.1 and tried the normal CMIS way to set TITLE and DESCRIPTION but resulted in null value. So I am using the Alfresco CMIS extension and the following
                        … getting session, obtaining folder by path etc ….

                        Map<String, Object> penProp = new HashMap<String, Object>();
              penProp.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder, P:cm:titled");
              penProp.put(PropertyIds.NAME, subFolder.getName() + "_");
              penProp.put("cm:title", strTitle);
              penProp.put("cm:description", strDesc);             
              
              subFolder.updateProperties(penProp);

And I got the following error:
CFR Folder Meta Data exception: java.lang.IllegalArgumentException: Property 'cm:description' is neither an object type property nor an aspect property!

I read Jeff Potts' posts that this may be a result of the PropertyIds.OBJECT_TYPE_ID can not be changed, so once a folder or file is uploaded, the Content Type can not be changed ? But from the Alfresco share interface we can change Object Content Types - correct ?

Any help will be appreciated.

Thanks.

Sam



Outcomes