hi guys,
I am using OpenCMIS api to create a document into alfresco(4.2 community version). While creating the session, I didn't initialize OBJECT_FACTORY_CLASS as AlfrescoObjectFactoryImpl, because I want to make it a common module, which can connect to other document repositories as well.
Code is something like:
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, CMISConstants.CMIS_DOCUMENT);
properties.put(PropertyIds.NAME, filename);
properties.put(PropertyIds.CHECKIN_COMMENT, "descriptino is here");
properties.put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "txt");
properties.put(PropertyIds.CREATED_BY, "tom");
properties.put(PropertyIds.IS_IMMUTABLE, "true");
Document document = folder.createDocument(properties, contentStream, VersioningState.MAJOR);
The problem is in alfresco, except for OBJECT_TYPE_ID and NAME, all other properties are all treated as Readonly while creating the document. Therefore all these properties cannot be saved with the document.
Any way to solve this problem?