Hi
Is it possible to set a document (newly added via web services) to a particular version, even if the document does not contain the previous version numbers?
I'am adding a word document via contentService.uploadContent, afterwards I use the returned node ID to change the version and the name of the document:
Node obj = documentManagement.getNode(objectID);
// set version
NodeVersionInfo version = new NodeVersionInfo();
version.setAdvancedVersionControl(true);
version.setSupportsAdvancedVersionControl(true);
version.setVersionNum(2);
version.setMajor(3);
obj.setVersionInfo(version);
// set name
obj.setName("new name");
documentManagement.updateNode(obj);
Now, the name is successfully changed but the version won't change. It stays 0.1 (when using major/minor versioning) or 1 (when using linear versioning).
Is it possible to achieve this? What am I doing wrong?
Thanks a lot!
Pieter