Hi all,
I'm uploading a new version of a node using CMIS, by following this instructions. I'm using Alfresco 6.2 ootb installation with docker.
I'm able to retrieve nodes' content, and to upload a new version, but I wonder if I can provide a version description, as can be done through the Alfresco ReST API and Alfresco Version2Service.
I've tried adding form data to the http call, but I see no results:
// Post new content to Alfresco as a new version using CMIS API
HttpPut put = new HttpPut(alfrescoBaseUrl + CMIS_URL + "content?id=" + ocrNodeId);
// Create request entity
requestEntityBuilder = MultipartEntityBuilder.create();
requestEntityBuilder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
requestEntityBuilder.addBinaryBody("file", inputStream);
requestEntityBuilder.addPart("versionComment", new StringBody("new version test", ContentType.MULTIPART_FORM_DATA));
// Tried with description, versionComment, versionDescription
requestEntity = requestEntityBuilder.build();
put.setEntity(requestEntity);It's the first time I'm using CMIS, and I've seen that Alfresco documented in a different way CMIS operations for the new 201911 GA version, so I'd like to know:
- Is it possible what I'm trying to do, or should I call other endpoint/s to set version description?
- Should I use "old" CMIS approach (using chemistry for example)? Would it give me the ability to update content and set version description in one call?
- Should I use Alfresco v1 ReST API instead of CMIS? What are the differences, if any / if you know it, about the two approaches, regarding liability/speed/consistency/server load?
I've already looked at the service document as stated here, but I don't get a s***, nor I haven't found any "getting started guide" for OASIS standard but the oasis standard specification, which is too much for me at the moment.
Thanks in advance!