The document I am creating is actually a datalist item which has no content and only metadata. I can create the item but I am not sure how to set the metadata. I get an error when I try.
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, name);
properties.put(PropertyIds.OBJECT_TYPE_ID, "D:mc:maintChit");
//*****************************************************
properties.put("cm:description",description);
//*****************************************************
ObjectId docId = session.createDocument(properties,
session.createObjectId("workspace://SpacesStore/8097bc61-da49-4f2f-aee2-1ecefc58977e"),
null,
VersioningState.MAJOR);
When I add the line properties.put("cm:description",description); I get this error:
java.lang.IllegalArgumentException: Property 'cm:description' is neither an object type property nor an aspect property!
at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(AlfrescoObjectFactoryImpl.java:181)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:716)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:819)
Thanks in advance to anyone who knows how to set metadata properties in OpenCmis.