Hi,
i try to add a custom property to a cmis document. The default properties ,like OBJECT_TYPE_ID or NAME, are defined in the PropertyID.class. How can I add a custom property? I tried to simply put a String "my:int.property and a value "42" in the hash map but I've got the exception:
errorMessage":"Property 'my:int.property' is not valid for this type or one of the secondary types!
private Map<String, Object> createCmisDocumentProperties(final AttachmentRef attachment)
{
// properties for the document to store.
final Map<String, Object> documentProps = new HashMap<String, Object>();
documentProps.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
documentProps.put(PropertyIds.NAME, FilenameUtils.getName(attachment.getName()));
documentProps.put(PropertyIds.CONTENT_STREAM_FILE_NAME, FilenameUtils.getName(attachment.getName()));
documentProps.put(PropertyIds.CONTENT_STREAM_LENGTH, attachment.getFileSize());
documentProps.put(PropertyIds.CONTENT_STREAM_MIME_TYPE, attachment.getMimeType());
documentProps.put("my:int.property", 42);
return documentProps;
}
Thanks for helping me.